diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 454974fe5..01f4039ea 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -159,7 +159,7 @@ App::post('/v1/databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.namespace', 'databases') ->label('sdk.method', 'create') - ->label('sdk.description', '/docs/references/databases/create-database.md') // create this file later + ->label('sdk.description', '/docs/references/databases/create.md') // create this file later ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_DATABASE) // Model for database needs to be created diff --git a/docs/references/database/create-collection.md b/docs/references/database/create-collection.md index 5896acd68..6f6da13d5 100644 --- a/docs/references/database/create-collection.md +++ b/docs/references/database/create-collection.md @@ -1 +1 @@ -Create a new Collection. \ No newline at end of file +Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console. \ No newline at end of file diff --git a/docs/references/database/create.md b/docs/references/database/create.md new file mode 100644 index 000000000..b60848534 --- /dev/null +++ b/docs/references/database/create.md @@ -0,0 +1 @@ +Create a new Database. diff --git a/docs/references/database/delete.md b/docs/references/database/delete.md new file mode 100644 index 000000000..605fa290d --- /dev/null +++ b/docs/references/database/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/database/get.md b/docs/references/database/get.md new file mode 100644 index 000000000..24183f6f6 --- /dev/null +++ b/docs/references/database/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/database/list-collections.md b/docs/references/database/list-collections.md index 1cf18ef8b..e43767491 100644 --- a/docs/references/database/list-collections.md +++ b/docs/references/database/list-collections.md @@ -1 +1 @@ -Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](/docs/admin). \ No newline at end of file +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/database/list-documents.md b/docs/references/database/list-documents.md index 7c93be3a6..f665bca63 100644 --- a/docs/references/database/list-documents.md +++ b/docs/references/database/list-documents.md @@ -1 +1 @@ -Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](/docs/admin). \ No newline at end of file +Get a list of all the user's documents in a given collection. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of documents belonging to the provided collectionId. [Learn more about different API modes](/docs/admin). \ No newline at end of file diff --git a/docs/references/database/list.md b/docs/references/database/list.md new file mode 100644 index 000000000..ca5ddedcd --- /dev/null +++ b/docs/references/database/list.md @@ -0,0 +1 @@ +Get a list of all the user's databases. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's databases. [Learn more about different API modes](/docs/admin). \ No newline at end of file diff --git a/docs/references/database/update.md b/docs/references/database/update.md new file mode 100644 index 000000000..4e99bf2e0 --- /dev/null +++ b/docs/references/database/update.md @@ -0,0 +1 @@ +Update a database by its unique ID. \ No newline at end of file diff --git a/docs/services/database.md b/docs/services/database.md deleted file mode 100644 index 9d46d38a7..000000000 --- a/docs/services/database.md +++ /dev/null @@ -1,7 +0,0 @@ -The Database service allows you to create structured collections of documents, query and filter lists of documents, and manage an advanced set of read and write access permissions. - -All the data in the database service is stored in structured JSON documents. - -Each database document structure in your project is defined using the Appwrite [collection attributes](/docs/database#attributes). The collection attributes help you ensure all your user-submitted data is validated and stored according to the collection structure. - -Using Appwrite permissions architecture, you can assign read or write access to each collection or document in your project for either a specific user, team, user role, or even grant it with public access (`role:all`). You can learn more about [how Appwrite handles permissions and access control](/docs/permissions). diff --git a/docs/services/databases.md b/docs/services/databases.md new file mode 100644 index 000000000..e5359c18f --- /dev/null +++ b/docs/services/databases.md @@ -0,0 +1,7 @@ +The Databases service allows you to create structured collections of documents, query and filter lists of documents, and manage an advanced set of read and write access permissions. + +All data returned by the Databases service are represented as structured JSON documents. + +The Databases service can contain multiple databases, each database can contain multiple collections. A collection is a group of similarly structured documents. The accepted structure of documents is defined by [collection attributes](/docs/database#attributes). The collection attributes help you ensure all your user-submitted data is validated and stored according to the collection structure. + +Using Appwrite permissions architecture, you can assign read or write access to each collection or document in your project for either a specific user, team, user role, or even grant it with public access (`role:all`). You can learn more about [how Appwrite handles permissions and access control](/docs/permissions). \ No newline at end of file