Skip to content

User account resources

The user management service employs the native identity management feature of Zenoss Cloud to create and manage user accounts.

Resource list

POST /v1/user-mgmt/end-user-accounts

Creates one user account.

Fields

Field Required? Type Description
user Yes Object

One user account specification.

The remaining fields of this table specify a user account.

email Yes String

An email address.

The address must be unique to your Zenoss Cloud environment.

password Yes String

A password. Passwords must be a minimum of 8 characters, with no more than two identical characters in a row, and must include at least one character from three of the following classes:

  • Special characters (! @ # $ % ^ & *)
  • Lower-case letters (a-z)
  • Upper-case letters (A-Z)
  • Digits (0-9)
firstName No String

A first name.

lastName No String A last name.
groups No Array

A list of one or more existing groups.

A user account must have at least one group before it can be used to log in to Zenoss Cloud. To add a group to an existing account, use the Update account resource.

Status codes

  • 200 (success)
  • 400 (bad request)
  • 401 (unauthorized; missing or invalid authentication key)

Example

curl https://YOUR-API-ENDPOINT/v1/user-mgmt/end-user-accounts \
  -H "content-type: application/json" \
  -H "zenoss-api-key: YOUR-API-KEY" \
  -X POST -s -S -d \
'{
  "user": {
    "email": "user_fake@example.com",
    "password": "YOUR-USER-PASSWORD",
    "lastName": "Doe",
    "firstName": "John",
    "groups": [
      "group1",
      "group2"
    ]
  }
}'
{ 
    "user": {
        "createdAt": "2021-07-08T18:46:31.060Z",
        "createdBy": "unknown",
        "email": "user_fake@example.com",
        "firstName": "John",
        "groups": [
            "group1",
            "group2"
        ],
        "id": "YOUR-USER-ID",
        "lastName": "Doe",
        "updatedAt": "2021-07-08T18:46:31.060Z"
    }
}

GET /v1/user-mgmt/end-user-accounts/{user-ID}

Gets an account. The password field is not returned..

Use the get user IDs resource to get a specific user ID.

Status codes

  • 200 (success)
  • 401 (unauthorized; missing or invalid authentication key)
  • 404 (not found)

Example

curl https://YOUR-API-ENDPOINT/v1/user-mgmt/end-user-accounts/YOUR-USER-ID \
  -H "content-type: application/json" \
  -H "zenoss-api-key: YOUR-API-KEY" \
  -X GET
{
  "user": {
    "id": "YOUR-USER-ID",
    "email": "user_fake@example.com",
    "lastName": "Doe",
    "firstName": "John",
    "groups": [
      "group1",
      "group2"
    ],
    "createdBy": "unknown",
    "createdAt": "2021-07-08T18:46:31.060Z",
    "updatedAt": "2021-07-08T18:46:31.060Z"
  }
}

PUT /v1/user-mgmt/end-user-accounts/{user-ID}

Updates an existing account.

Use the get user IDs resource to get a specific user ID.

Fields

Field Required? Type Description
user Yes Object

One user account specification.

The remaining fields of this table specify a user account. Each field you specify replaces the existing field of the user account to update.

Although each field is optional, requests fail if none is specified.

email No String An email address.
password No String

A password. Passwords must be a minimum of 8 characters, with no more than two identical characters in a row, and must include at least one character from three of the following classes:

  • Special characters (! @ # $ % ^ & *)
  • Lower-case letters (a-z)
  • Upper-case letters (A-Z)
  • Digits (0-9)
firstName No String A first name.
lastName No String A last name.
groups No Array

A list of one or more groups.

If you specify an empty list, all groups are removed from the account, which prevents the user from logging in.

Status codes

  • 200 (success)
  • 400 (bad request)
  • 401 (unauthorized; missing or invalid authentication key)

Example

curl https://YOUR-API-ENDPOINT/v1/user-mgmt/end-user-accounts/YOUR-USER-ID \
  -H "content-type: application/json" \
  -H "zenoss-api-key: YOUR-API-KEY" \
  -X PUT -s -S -d \
'{
  "user": {
    "groups": [
      "group3",
      "group4"
    ]
  }
}'
{
    "user": {
        "createdAt": "2021-07-08T18:46:31.060Z",
        "createdBy": "unknown",
        "email": "user_fake@example.com",
        "firstName": "John",
        "groups": [
            "group3",
            "group4"
        ],
        "id": "YOUR-USER-ID",
        "lastName": "Doe",
        "updatedAt": "2021-07-08T20:08:49.200Z",
    }
}
{
    "code": 3,
    "message": "Group from the request doesn't exist"
}

DELETE /v1/user-mgmt/end-user-accounts/{user-ID}

Deletes a user account.

Use the get user IDs resource to get a specific user ID.

Status codes

  • 200 (success)
  • 401 (unauthorized; missing or invalid authentication key)
  • 404 (not found)

Example

curl https://YOUR-API-ENDPOINT/v1/user-mgmt/end-user-accounts/YOUR-USER-ID \
  -H "content-type: application/json" \
  -H "zenoss-api-key: YOUR-API-KEY" \
  -X DELETE
{}

POST /v1/user-mgmt/end-user-account-ids

Gets an array of user IDs of accounts that match the search criteria.

Only full matches are returned (no partial matches).

Fields

Each field is optional, but requests fail if none is specified.

Field Required? Type Description
email No String An email address
firstName No String A first name
lastName No String A last name

Status codes

  • 200 (success)
  • 400 (bad request)
  • 401 (unauthorized; missing or invalid authentication key)

Example

curl https://YOUR-API-ENDPOINT/v1/user-mgmt/end-user-account-ids \
  -H "content-type: application/json" \
  -H "zenoss-api-key: YOUR-API-KEY" \
  -X POST -s -S -d \
'{
  "email": "user_fake@example.com",
  "lastName": "Doe",
  "firstName": "John"
}'
{
    "ids": [
        "YOUR-USER-ID"
    ]
}
{
  "code": 3,
  "message": "invalid input, empty request or some fields"
}