Skip to content

Users

Get User Details

/api/v2/users/{id} 📋 Copied! ▼

Role: Admin.

Parameters

Name Description
id * Numeric ID of the User.
Type: integer (path)

Responses

Code Description
200

User data.

Media type: application/json

Example Value:

{
"id": 0,
"email": "user@example.com",
"roles": [
    "STANDARD",
    "GUEST"
]
}
404

Resource was not found.

Update a User

/api/v2/users/{id} 📋 Copied! ▼

Role: Admin.

Changes the user's role. role is ADMIN, STANDARD or GUEST (AGENT is reserved for Test Node agents). Roles include the ones below them, so roles in a response lists every group the user is in; see Roles.

Parameters

Name Description
id * Numeric ID of the User.
Type: integer (path)

Request body *

{
"role": "STANDARD"
}

Responses

Code Description
200

User was updated successfully. The new role applies to the user's next request.

400

The user was deleted, or the body is invalid.

404

Resource was not found.

Delete a User

/api/v2/users/{id}/delete 📋 Copied! ▼

Role: Admin.

newUser (required) is the ID of the user who takes over everything the deleted user created. It must be a Standard or Admin user.

Parameters

Name Description
id * Numeric ID of the User.
Type: integer (path)

Request body *

{
"newUser": 0
}

Responses

Code Description
200

User was deleted successfully.

400

newUser is deleted or is not a Standard or Admin user.

404

Resource was not found.

Get Current List

/api/v2/users 📋 Copied! ▼

Role: Admin.

Parameters

Name Description
page Zero-based page number. Default 0.
Type: integer (query)
size Page size. Default 20.
Type: integer (query)
sort <field>,asc or <field>,desc.
Type: string (query)
filterName text to search by e-mail.
Type: string (query)
filterValue The search text.
Type: string (query)

Responses

Code Description
200

A page of users.

Media type: application/json

Example Value:

{
"content": [
    {
        "id": 0,
        "email": "user@example.com",
        "roles": [
            "STANDARD",
            "GUEST"
        ]
    }
],
"totalElements": 0,
"totalPages": 0,
"number": 0,
"size": 20
}

Create a User

/api/v2/users 📋 Copied! ▼

Role: Admin.

email (a valid address), role and tempPassword are required. The password needs at least 8 characters with a number, a lowercase letter, an uppercase letter and a special character. role is ADMIN, STANDARD or GUEST (AGENT is reserved for Test Node agents). Roles include the ones below them, so roles in a response lists every group the user is in; see Roles.

Request body *

{
"email": "user@example.com",
"role": "STANDARD",
"tempPassword": "string"
}

Responses

Code Description
201

ID of the User.

Media type: application/json

Example Value:

{
"id": 0
}
400

The body is invalid, for example an invalid e-mail address or a missing role.

409

A user with this e-mail already exists, or the temporary password does not meet the password policy.

Get Current User Info

/api/v2/users/me 📋 Copied! ▼

Role: Guest and above.

Responses

Code Description
200

The signed-in user or API client: its e-mail, its authorities (roles as ROLE_… plus individual permissions) and its tenant.

Media type: application/json

Example Value:

{
"email": "user@example.com",
"authorities": [
    "ROLE_STANDARD",
    "ROLE_GUEST"
],
"tenant": "string"
}