Create user

Create a new console user. This requires a unique email address for the user being created.

Service Endpoint

/users/v2

Optional query string parameters

Example

https://protectapi.cylance.com/users/v2

Method

HTTP/1.1 POST

Request headers

  • Accept: application/json
  • Content-Type: application/json
  • Authorization: Bearer JWT Token returned by Auth API with the user:create encoded.

Request

JSON
{
    "email": "testuser@email.com",
    "user_role": "00000000-0000-0000-0000-000000000001",
    "first_name": "Test",
    "last_name": "User",
    "zones": [
        {
            "id": "d27ff5c4-5c0d-4f56-a00d-a1fb297e440e",
            "role_type": "00000000-0000-0000-0000-000000000002"
        }
    ]
}

Response

Please see the Response status codes for more information.

Request JSON schema

Field Name Description

email

(Required) This is the user's email address, which must be unique.

first_name

(Optional) This is the user's first name, which if specified, must be less than 64 characters.

last_name

(Optional) This is the user's last name, which if specified, must be less than 64 characters.

user_role

(Required) This is the user's role in the console.

  • User: 00000000-0000-0000-0000-000000000001
  • Administrator: 00000000-0000-0000-0000-000000000002
  • Read-Only: 00000000-0000-0000-0000-000000000003

zones

These are the zones that the user has access to as an array of elements:

  • id: Unique identifier for the zone
  • role_type: User's role for this particular zone
    • Zone Manager: 00000000-0000-0000-0000-000000000001
    • User: 00000000-0000-0000-0000-000000000002

If the user is an Administrator, the zones array is not required.

To create a zone manager, set the user_role to User and assign a zone or zones to the user via the zones parameter. Setting the user_role to Read-Only and using the zones parameter will result in a bad request error.

Note that if you are creating a Zone Manager, the 'email' and 'user_role' parameters are mandatory.

Response JSON schema

Field Name Description

date_created

This is the date and time (in UTC) the console user was created.

date_email_confirmed

This is the date and time (in UTC) when the user confirmed the email provided. This should be null because the user account was recently created.

date_last_login

This is the date and time (in UTC) the user last logged in to the console. This should be null because the user account was recently created.

date_modified

This is the date and time (in UTC) the console user information was last updated.

default_zone_role_name

This is the name of the role for the user in the zone.

default_zone_role_type

This is the unique identifier for the user's default role when assigned to a zone:

  • None: 00000000-0000-0000-0000-000000000000
  • Zone Manager: 00000000-0000-0000-0000-000000000001
  • User: 00000000-0000-0000-0000-000000000002

email

This is the user's email address.

first_name

This is the user's first name.

has_logged_in

This should be false because the user account was recently created.

id

This is the user's unique identifier for the console.

last_name

This is the user's last name.

role_name

This is the name of the user's role in the console.

role_type

This is the unique identifier defining the user's role in the console:

  • User: 00000000-0000-0000-0000-000000000001
  • Administrator: 00000000-0000-0000-0000-000000000002
  • Read-Only: 00000000-0000-0000-0000-000000000003
  • Zone Manager: 00000000-0000-0000-0000-000000000004

To create a Zone Manager, set the user_role to User and assign a zone or zones to the user via the zones parameter. Setting the user_role to Read-Only and using the zones parameter will result in a bad request error.

zones

These are the zones that the user has access to as an array of elements:

  • id: Unique identifier for the zone
  • role_type: User's role for this particular zone
    • None: 00000000-0000-0000-0000-000000000000
    • Zone Manager: 00000000-0000-0000-0000-000000000001
    • User: 00000000-0000-0000-0000-000000000002
  • role_name: Name of the user's role in the zone

If the user is an administrator, the zones array will display empty brackets [ ].