You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**This SDK is compatible with Appwrite server version 1.6.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).**
9
+
**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).**
10
10
11
11
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
Copy file name to clipboardExpand all lines: docs/databases.md
+64-2Lines changed: 64 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -606,8 +606,7 @@ GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionI
606
606
POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents
607
607
```
608
608
609
-
** 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.
610
-
**
609
+
** 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. **
611
610
612
611
### Parameters
613
612
@@ -620,6 +619,68 @@ POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collection
620
619
| permissions | array | An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). ||
621
620
622
621
622
+
```http request
623
+
POST https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents
624
+
```
625
+
626
+
** 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. **
| collectionId | string |**Required** 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. ||
634
+
| documents | array | Array of documents data as JSON objects. |[]|
635
+
636
+
637
+
```http request
638
+
PUT https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents
639
+
```
640
+
641
+
** 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.
** 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. **
| data | object | Document data as JSON object. Include only attribute and value pairs to be updated. | {} |
666
+
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. |[]|
| collectionId | string |**Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). ||
681
+
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. |[]|
682
+
683
+
623
684
```http request
624
685
GET https://cloud.appwrite.io/v1/databases/{databaseId}/collections/{collectionId}/documents/{documentId}
625
686
```
@@ -700,6 +761,7 @@ Attributes can be `key`, `fulltext`, and `unique`. **
700
761
| type | string | Index type. ||
701
762
| attributes | array | Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. ||
702
763
| orders | array | Array of index orders. Maximum of 100 orders are allowed. |[]|
764
+
| lengths | array | Length of index. Maximum of 100 |[]|
0 commit comments