2019-05-09 18:54:39 +12:00
|
|
|
# Users Service
|
|
|
|
|
|
|
|
## List Users
|
|
|
|
|
|
|
|
```http request
|
2019-10-04 18:14:22 +13:00
|
|
|
GET https://https://appwrite.io/v1/users
|
2019-05-09 18:54:39 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
** Get a list of all the project users. You can use the query params to filter your results. **
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
| Field Name | Type | Description | Default |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| search | string | Search term to filter your list results. | |
|
|
|
|
| limit | integer | Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request. | 25 |
|
|
|
|
| offset | integer | Results offset. The default value is 0. Use this param to manage pagination. | 0 |
|
|
|
|
| orderType | string | Order result by ASC or DESC order. | ASC |
|
|
|
|
|
|
|
|
## Create User
|
|
|
|
|
|
|
|
```http request
|
2019-10-04 18:14:22 +13:00
|
|
|
POST https://https://appwrite.io/v1/users
|
2019-05-09 18:54:39 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
** Create a new user. **
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
| Field Name | Type | Description | Default |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| email | string | User account email. | |
|
|
|
|
| password | string | User account password. | |
|
|
|
|
| name | string | User account name. | |
|
|
|
|
|
|
|
|
## Get User
|
|
|
|
|
|
|
|
```http request
|
2019-10-04 18:14:22 +13:00
|
|
|
GET https://https://appwrite.io/v1/users/{userId}
|
2019-05-09 18:54:39 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
** Get user by its unique ID. **
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
| Field Name | Type | Description | Default |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| userId | string | **Required** User unique ID. | |
|
|
|
|
|
|
|
|
## Get User Logs
|
|
|
|
|
|
|
|
```http request
|
2019-10-04 18:14:22 +13:00
|
|
|
GET https://https://appwrite.io/v1/users/{userId}/logs
|
2019-05-09 18:54:39 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
** Get user activity logs list by its unique ID. **
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
| Field Name | Type | Description | Default |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| userId | string | **Required** User unique ID. | |
|
|
|
|
|
|
|
|
## Get User Prefs
|
|
|
|
|
|
|
|
```http request
|
2019-10-04 18:14:22 +13:00
|
|
|
GET https://https://appwrite.io/v1/users/{userId}/prefs
|
2019-05-09 18:54:39 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
** Get user preferences by its unique ID. **
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
| Field Name | Type | Description | Default |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| userId | string | **Required** User unique ID. | |
|
|
|
|
|
|
|
|
## Get User Sessions
|
|
|
|
|
|
|
|
```http request
|
2019-10-04 18:14:22 +13:00
|
|
|
GET https://https://appwrite.io/v1/users/{userId}/sessions
|
2019-05-09 18:54:39 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
** Get user sessions list by its unique ID. **
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
| Field Name | Type | Description | Default |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| userId | string | **Required** User unique ID. | |
|
|
|
|
|
|
|
|
## Delete User Sessions
|
|
|
|
|
|
|
|
```http request
|
2019-10-04 18:14:22 +13:00
|
|
|
DELETE https://https://appwrite.io/v1/users/{userId}/sessions
|
2019-05-09 18:54:39 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
** Delete all user sessions by its unique ID. **
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
| Field Name | Type | Description | Default |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| userId | string | **Required** User unique ID. | |
|
|
|
|
|
|
|
|
## Delete User Session
|
|
|
|
|
|
|
|
```http request
|
2019-10-04 18:14:22 +13:00
|
|
|
DELETE https://https://appwrite.io/v1/users/{userId}/sessions/:session
|
2019-05-09 18:54:39 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
** Delete user sessions by its unique ID. **
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
| Field Name | Type | Description | Default |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| userId | string | **Required** User unique ID. | |
|
|
|
|
| sessionId | string | User unique session ID. | |
|
|
|
|
|
2019-06-09 23:44:58 +12:00
|
|
|
## Update user status
|
2019-05-09 18:54:39 +12:00
|
|
|
|
|
|
|
```http request
|
2019-10-04 18:14:22 +13:00
|
|
|
PATCH https://https://appwrite.io/v1/users/{userId}/status
|
2019-05-09 18:54:39 +12:00
|
|
|
```
|
|
|
|
|
|
|
|
** Update user status by its unique ID. **
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
| Field Name | Type | Description | Default |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| userId | string | **Required** User unique ID. | |
|
|
|
|
| status | string | User Status code. To activate the user pass 1, to blocking the user pass 2 and for disabling the user pass 0 | |
|
|
|
|
|