User Management API
Version 26.1.9516
Version 26.1.9516
User Management API
The User Management API supports the following actions:
The sections below describe each of these actions.
Note: When you create or modify users, you must use the API role name. The following table maps the user roles to their API equivalents.
| User Role Name | API Role Name |
|---|---|
| Admin | cdata_admin |
| Standard | cdata_standard |
| Job Creator | cdata_job_creator |
| Job Operator | cdata_support |
List All Users
The following command lists all users:
GET http://<SyncHost>/api.rsc/v2/users
Retrieve a Specified User
The following command retrieves a specified user:
GET http://<SyncHost>/api.rsc/v2/users/{user-id}
Path Parameters
| Name | Description |
|---|---|
| user_id (required) | Specifies the identifier (Id) of the user that you want to retrieve. |
Create a User
The following command creates a user:
POST http://<SyncHost>/api.rsc/v2/users/
Body Parameters
| Name | Description |
|---|---|
| User | Specifies the user identifier. |
| Email_Address | Specifies the email address of the user. |
| Password | Specifies the user password. |
| Is_Active | A Boolean value that specifies whether the user is active. |
| Roles | Specifies a list of the user’s role. The Id or name of the role is required. |
Example Request
{
"User": "APIUser",
"Active": true,
"Password": "APIUser",
"Roles": "cdata_admin"
}
Update a User
The following command updates a user:
PUT http://<SyncHost>/api.rsc/v2/users/{user_id}
Path Parameter
| Name | Description |
|---|---|
| user_id (required) | Specifies the identifier (Id) of the user that you want to update. |
Body Parameters
| Name | Description |
|---|---|
| Email_Address | Specifies the email address of the user. |
| Password | Specifies the user password. |
| Is_Active | A Boolean value that specifies whether the user is active. Set this value to false to disable the user. |
| Roles | Specifies a list of the user’s role. The contents of the list replaces existing roles. |
Example Request
{
"email_address": "<UserEmailAddress>",
"password": "<password>",
"is_active": true,
"roles": [
{
"id":"cdata_support"
}, {
"name":"my_role"
}
]
}
Delete a User
The following command deletes a user:
DELETE http://<SyncHost>/api.rsc/v2/users/{user_id}
Path Parameter
| Name | Description |
|---|---|
| user_id (required) | Specifies the identifier (Id) of the user that you want to delete. |