3 User Management

3.1 Get Users

GET https://<HOST>:<PORT>/api/users/get?version=0

Returns information about all exitings users.

Required Permissions

  • API

  • User Management Read Access

Response Body Structure

The response body is strutured as an array. The array consists of CustomUserOptions JSON objects. A description for its fields is at section 32.3.1. For the JSON schema refer to section 32.3.2.

Example

GET http://127.0.0.1:8888/api/users/get?version=0
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
[
  {
    "lastLogin": "UTC 2024-04-26 12:52:46",
    "displayName": "anadmin",
    "enabled": true
  },
  {
    "emailAddress": "",
    "displayName": "test",
    "localUserName": "test",
    "roles": [],
    "id": "2387af39-3818-4684-acfd-1930160ca16a",
    "enabled": true,
    "local": {"name": "test"}
  }
]

3.2 Add User

POST https://<HOST>:<PORT>/api/users/add?version=0

Adds a new user that can be used to authenticate against the anynode frontend.

Required Permissions

  • API

  • User Management Read/Write Access

Request Body Structure

The request body is structured as AddUserData JSON object. A description for its fields is at section 32.2.1. For the JSON schema refer to section 32.2.2.

Response Body Structure

The response body is structured as CustomUserOptions JSON object. A description for its fields is at section 32.3.1. For the JSON schema refer to section 32.3.2.

Example

POST http://127.0.0.1:8888/api/users/add?version=0
HTTP Request Body
{
  "ldapLogin": null,
  "loginLocally": true,
  "localPassword": "test1234",
  "roleIds": ["new_role"],
  "localUsername": "test",
  "displayName": "test",
  "enabled": true
}
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
{
  "emailAddress": "",
  "displayName": "test",
  "localUserName": "test",
  "roles": [],
  "id": "eb327cfd-6912-4d97-b34d-9c6474485702",
  "enabled": true,
  "local": {"name": "test"}
}

3.3 Remove User

DELETE https://<HOST>:<PORT>/api/users/remove?version=0

Removes an exiting user

Required Permissions

  • API

  • User Management Read/Write Access

Request parameters

  • user

    The name or id of the user that should be removed.

Response Body Structure

The response body is structured as CustomUserOptions JSON object. A description for its fields is at section 32.3.1. For the JSON schema refer to section 32.3.2.

Example

DELETE http://127.0.0.1:8888/api/users/remove?version=0&user=test
HTTP Response
HTTP/1.1 200 OK

3.4 Submit Password Change

POST https://<HOST>:<PORT>/api/users/changePassword?version=0

Sets a new password for a user.

Required Permissions

  • API

  • User Management Read/Write Access

Request parameters

  • passwordChange

    Define whether and, if so, when the password has to be changed.

    Possible values:

    • NOT_NECESSARY

    • REQUIERED

    • RECOMMENDED

  • oldPassword

    The old password of the selected user.

  • newPassword

    The new password of the selected user.

  • user

    The name of the user which password will be changed.

Example

POST http://localhost:8888/api/users/changePassword?passwordChange=NOT_NECESSARY&oldPassword=test1234&newPassword=1234test&version=0&user=test
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
Successfully changed password for user "testuser"

3.5 Get LDAP Authorities

GET https://<HOST>:<PORT>/api/users/ldapAuthorities/get?version=0

Returns the configured LDAP Authorities

Required Permissions

  • API

  • User Management Read Access

Response Body Structure

The response body is strutured as an array. The array consists of LdapAuthority JSON objects. A description for its fields is at section 32.55.1. For the JSON schema refer to section 32.55.2.

Example

GET http://127.0.0.1:8888/api/users/ldapAuthorities/get?version=0
HTTP Response
HTTP/1.1 200 OK

3.6 Get Password Policy

GET https://<HOST>:<PORT>/api/passwordPolicy/get?version=0

Retrieves the currently active password policy, including all enforced rules such as length, complexity, and expiration settings.

Required Permissions

  • API

  • User Management Read Access

Response Body Structure

The response body is structured as PasswordPolicy JSON object. A description for its fields is at section 32.4.1. For the JSON schema refer to section 32.4.2.

Example

GET http://localhost:13010/api/passwordPolicy/get?version=0
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
{
  "minCharacters": 2,
  "minDigits": 2,
  "minUpperCase": 2,
  "minLength": 8,
  "minLowerCase": 2,
  "patterns": true,
  "blacklist": [{
    "ignoreCase": true,
    "match": "QQQQQ",
    "substring": true
  }],
  "addUsernameToBlacklist": true,
  "maxLength": 20,
  "minSpecial": 5
}

3.7 Set Password Policy

POST https://<HOST>:<PORT>/api/passwordPolicy/set?version=0

Updates the active password policy. All changes take effect immediately and will apply to newly created or updated passwords.

Required Permissions

  • API

  • User Management Read/Write Access

Request Body Structure

The request body is structured as PasswordPolicy JSON object. A description for its fields is at section 32.4.1. For the JSON schema refer to section 32.4.2.

Example

POST http://localhost:13010/api/passwordPolicy/set?version=0
HTTP Request Body
{
  "minCharacters": 2,
  "minDigits": 2,
  "minUpperCase": 2,
  "minLength": 8,
  "minLowerCase": 2,
  "patterns": true,
  "blacklist": [{
    "ignoreCase": true,
    "match": "QQQQQ",
    "substring": true
  }],
  "addUsernameToBlacklist": true,
  "maxLength": 20,
  "minSpecial": 5
}
HTTP Response
HTTP/1.1 200 OK

3.8 Get Login Policy

GET https://<HOST>:<PORT>/api/loginPolicy/get?version=0

Retrieves the currently active login policy, including authentication and security constraints such as retry limits and lockout behavior.

Required Permissions

  • API

  • User Management Read Access

Response Body Structure

The response body is structured as LoginPolicy JSON object. A description for its fields is at section 32.5.1. For the JSON schema refer to section 32.5.2.

Example

GET http://localhost:13010/api/loginPolicy/get?version=0
HTTP Response
HTTP/1.1 200 OK
HTTP Response Body
{
  "attemptsUntilBlocked": 111,
  "passwordExpiration": 111111,
  "passwordUnchangeableMinutes": 2,
  "minLoginDelay": 1,
  "showLoginFailureMessage": true,
  "maxObsoletePasswords": 111111,
  "passwordExpirationWarning": 11111,
  "maxLoginDelay": 11
}

3.9 Set Login Policy

POST https://<HOST>:<PORT>/api/loginPolicy/set?version=0

Updates the active login policy. Changes are applied immediately and affect all subsequent authentication attempts.

Required Permissions

  • API

  • User Management Read/Write Access

Request Body Structure

The request body is structured as LoginPolicy JSON object. A description for its fields is at section 32.5.1. For the JSON schema refer to section 32.5.2.

Example

POST http://localhost:13010/api/loginPolicy/set?version=0
HTTP Request Body
{
  "attemptsUntilBlocked": 111,
  "passwordExpiration": 111111,
  "passwordUnchangeableMinutes": 2,
  "minLoginDelay": 1,
  "showLoginFailureMessage": true,
  "maxObsoletePasswords": 111111,
  "passwordExpirationWarning": 11111,
  "maxLoginDelay": 11
}
HTTP Response
HTTP/1.1 200 OK