Skip to main content
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 NameAPI Role Name
Admincdata_admin
Standardcdata_standard
Job Creatorcdata_job_creator
Job Operatorcdata_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
NameDescription
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
NameDescription
UserSpecifies the user identifier.
Email_AddressSpecifies the email address of the user.
PasswordSpecifies the user password.
Is_ActiveA Boolean value that specifies whether the user is active.
RolesSpecifies 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
NameDescription
user_id (required)Specifies the identifier (Id) of the user that you want to update.
Body Parameters
NameDescription
Email_AddressSpecifies the email address of the user.
PasswordSpecifies the user password.
Is_ActiveA Boolean value that specifies whether the user is active. Set this value to false to disable the user.
RolesSpecifies 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
NameDescription
user_id (required)Specifies the identifier (Id) of the user that you want to delete.