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 0.13.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 0.14.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/account.md
+11-9
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,6 @@ GET https://HOSTNAME/v1/account
8
8
9
9
** Get currently logged in user data as JSON object. **
10
10
11
-
## Delete Account
12
-
13
-
```http request
14
-
DELETE https://HOSTNAME/v1/account
15
-
```
16
-
17
-
** Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately. **
** 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 and Team Invites, oldPassword is optional. **
63
+
** 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. **
72
64
73
65
### Parameters
74
66
@@ -169,6 +161,8 @@ GET https://HOSTNAME/v1/account/sessions/{sessionId}
** Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to "refresh" the access token. **
| sessionId | string |**Required** Session ID. Use the string 'current' to delete the current device session. ||
192
186
187
+
## Update Account Status
188
+
189
+
```http request
190
+
PATCH https://HOSTNAME/v1/account/status
191
+
```
192
+
193
+
** 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. **
Copy file name to clipboardexpand all lines: docs/avatars.md
+24-9
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,9 @@
6
6
GET https://HOSTNAME/v1/avatars/browsers/{code}
7
7
```
8
8
9
-
** 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 /account/sessions endpoint. Use width, height and quality arguments to change the output settings. **
9
+
** 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](/docs/client/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.
10
+
11
+
When 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. **
10
12
11
13
### Parameters
12
14
@@ -23,7 +25,10 @@ GET https://HOSTNAME/v1/avatars/browsers/{code}
23
25
GET https://HOSTNAME/v1/avatars/credit-cards/{code}
24
26
```
25
27
26
-
** 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. **
28
+
** 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.
29
+
30
+
When 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.
31
+
**
27
32
28
33
### Parameters
29
34
@@ -55,7 +60,10 @@ GET https://HOSTNAME/v1/avatars/favicon
55
60
GET https://HOSTNAME/v1/avatars/flags/{code}
56
61
```
57
62
58
-
** 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. **
63
+
** 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.
64
+
65
+
When 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.
66
+
**
59
67
60
68
### Parameters
61
69
@@ -72,15 +80,18 @@ GET https://HOSTNAME/v1/avatars/flags/{code}
72
80
GET https://HOSTNAME/v1/avatars/image
73
81
```
74
82
75
-
** 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. **
83
+
** 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.
84
+
85
+
When 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.
86
+
**
76
87
77
88
### Parameters
78
89
79
90
| Field Name | Type | Description | Default |
80
91
| --- | --- | --- | --- |
81
92
| url | string |**Required** Image URL which you want to crop. ||
82
-
| width | integer | Resize preview image width, Pass an integer between 0 to 2000. | 400 |
83
-
| height | integer | Resize preview image height, Pass an integer between 0 to 2000. | 400 |
93
+
| width | integer | Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400. | 400 |
94
+
| height | integer | Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400. | 400 |
84
95
85
96
## Get User Initials
86
97
@@ -90,7 +101,10 @@ GET https://HOSTNAME/v1/avatars/initials
90
101
91
102
** 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.
92
103
93
-
You 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. **
104
+
You 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.
105
+
106
+
When 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.
107
+
**
94
108
95
109
### Parameters
96
110
@@ -108,14 +122,15 @@ You can use the color and background params to change the avatar colors. By defa
108
122
GET https://HOSTNAME/v1/avatars/qr
109
123
```
110
124
111
-
** 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. **
125
+
** 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.
126
+
**
112
127
113
128
### Parameters
114
129
115
130
| Field Name | Type | Description | Default |
116
131
| --- | --- | --- | --- |
117
132
| text | string |**Required** Plain text to be converted to QR code image. ||
118
-
| size | integer | QR code size. Pass an integer between 0 to 1000. Defaults to 400. | 400 |
133
+
| size | integer | QR code size. Pass an integer between 1 to 1000. Defaults to 400. | 400 |
119
134
| margin | integer | Margin from edge. Pass an integer between 0 to 10. Defaults to 1. | 1 |
120
135
| download | boolean | 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. ||
Copy file name to clipboardexpand all lines: docs/database.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ POST https://HOSTNAME/v1/database/collections
33
33
| --- | --- | --- | --- |
34
34
| collectionId | string | Unique Id. Choose your own unique ID or pass the string "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. ||
35
35
| name | string | Collection name. Max length: 128 chars. ||
36
-
| permission | string |Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each documentread and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions. ||
36
+
| permission | string |Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection'level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions. ||
37
37
| read | array | An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions. ||
38
38
| write | array | An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions. ||
39
39
@@ -146,7 +146,7 @@ POST https://HOSTNAME/v1/database/collections/{collectionId}/attributes/enum
146
146
| --- | --- | --- | --- |
147
147
| collectionId | string |**Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). ||
148
148
| key | string | Attribute Key. ||
149
-
| elements | array | Array of elements in enumerated type. Uses length of longest element to determine size. ||
149
+
| elements | array | Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 1024 characters long. ||
150
150
| required | boolean | Is attribute required? ||
151
151
| default | string | Default value for attribute when not provided. Cannot be set when attribute is required. ||
152
152
| array | boolean | Is attribute an array? ||
@@ -290,13 +290,13 @@ GET https://HOSTNAME/v1/database/collections/{collectionId}/documents
290
290
| Field Name | Type | Description | Default |
291
291
| --- | --- | --- | --- |
292
292
| collectionId | string |**Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). ||
293
-
| queries | array | Array of query strings. |[]|
293
+
| queries | array | Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long. |[]|
294
294
| limit | integer | Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 |
295
295
| offset | integer | Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)| 0 |
296
296
| cursor | string | ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)||
297
297
| cursorDirection | string | Direction of the cursor. | after |
298
-
| orderAttributes | array | Array of attributes used to sort results. |[]|
299
-
| orderTypes | array | Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order. |[]|
298
+
| orderAttributes | array | Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long. |[]|
299
+
| orderTypes | array | Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order. Maximum of 100 order types are allowed. |[]|
| data | object | Document data as JSON object. | {} |
348
+
| data | object | Document data as JSON object. Include only attribute and value pairs to be updated. | {} |
349
349
| read | array | An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions. ||
350
350
| write | array | An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions. ||
** Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted. **
358
+
** Delete a document by its unique ID. **
359
359
360
360
### Parameters
361
361
@@ -389,8 +389,8 @@ POST https://HOSTNAME/v1/database/collections/{collectionId}/indexes
389
389
| collectionId | string |**Required** Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). ||
390
390
| key | string | Index Key. ||
391
391
| type | string | Index type. ||
392
-
| attributes | array | Array of attributes to index. ||
393
-
| orders | array | Array of index orders. |[]|
392
+
| attributes | array | Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long. ||
393
+
| orders | array | Array of index orders. Maximum of 100 orders are allowed. |[]|
Copy file name to clipboardexpand all lines: docs/functions.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -33,14 +33,14 @@ POST https://HOSTNAME/v1/functions
33
33
| --- | --- | --- | --- |
34
34
| functionId | string | Function ID. Choose your own unique ID or pass the string "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. ||
35
35
| name | string | Function name. Max length: 128 chars. ||
36
-
| execute | array | An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions. ||
36
+
| execute | array | An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions. Maximum of 100 scopes are allowed, each 64 characters long. ||
37
37
| runtime | string | Execution runtime. ||
38
38
| vars | object | Key-value JSON object that will be passed to the function as environment variables. | {} |
39
-
| events | array | Events list. |[]|
39
+
| events | array | Events list. Maximum of 100 events are allowed. |[]|
40
40
| schedule | string | Schedule CRON syntax. ||
41
41
| timeout | integer | Function maximum execution time in seconds. | 15 |
42
42
43
-
## List the currently active function runtimes.
43
+
## List runtimes
44
44
45
45
```http request
46
46
GET https://HOSTNAME/v1/functions/runtimes
@@ -76,9 +76,9 @@ PUT https://HOSTNAME/v1/functions/{functionId}
76
76
| --- | --- | --- | --- |
77
77
| functionId | string |**Required** Function ID. ||
78
78
| name | string | Function name. Max length: 128 chars. ||
79
-
| execute | array | An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions. ||
79
+
| execute | array | An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions. Maximum of 100 scopes are allowed, each 64 characters long. ||
80
80
| vars | object | Key-value JSON object that will be passed to the function as environment variables. | {} |
81
-
| events | array | Events list. |[]|
81
+
| events | array | Events list. Maximum of 100 events are allowed. |[]|
82
82
| schedule | string | Schedule CRON syntax. ||
83
83
| timeout | integer | Maximum execution time in seconds. | 15 |
0 commit comments