User Configuration

Last modified by ryanp on 2021/09/10 23:34

Warning

This page is currently being written. Although the information below is probably accurate, it may not be complete or may have errors.

Information

The information on this page applies to iSymphony 3.1+.

Description

The user REST resource allows access to the configuration for users in the system. This resource allows adding, removing, and updating of users in the system.

 

On this page:

The [toc] macro is a standalone macro and it cannot be used inline. Click on this message for details.
 

Root Resource Path

communication_manager/rest/config/core/{coreServerId}/users

JSON Representation

{
 "id": "56cf70a3-1ee0-4b09-8f40-297430eeeddf",
 "username": "4224",
 "password": "e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4",
 "enabled": true,
 "full": true,
 "displayName": "Steve S",
 "lastPasswordChangedAt": null,
 "permissionDisplayName": "Steve S",
 "permissionId": "56cf70a3-1ee0-4b09-8f40-297430eeeddf"
}

Property

Type

Description

id

String

Configuration id of the user.

username

String

Username of the user.

password

String

SHA-1 hash of the user's password.

enabled

Boolean

Flag specifying if the user is enabled.

full

Boolean

Flag specifying if the user is a full or lite user.

displayName

String

The display name for the user.

lastPasswordChangedAt

Long

The last time the user changed their password from the client interface. Represented as a Unix timestamp in milliseconds. Can be null.

permissionDisplayName

String

Display name of the user in the permission system. This value is read only.

permissionId

String

Permission id of the user. This value is read only.

Resource Paths

communication_manager/rest/config/core/{coreServerId}/users

Description

Accesses all the users in the core server.

GET 

Gets all the users in the core server.

POST

Adds a user to the configuration.

Information

This resource URL will take in a plain text password for the user and create a SHA-1 hashed version of it in the configuration.

If you want to pass in a pre-hashed version of the password that will be stored without modification you can use the following URL instead:

communication_manager/rest/config/core/{coreServerId}/users/noHash

Errors:

  • 409 'A user with the given id already exists.': Returned if a user with the given id already exists.
  • 409 'A user with the given username already exists.': Returned if a user with the given username already exists.
  • 412 'No username provided.': Returned if no username was provided.
  • 412 'No password provided.': Returned if no password was provided.

 

communication_manager/rest/config/core/{coreServerId}/users/{userId}

Description

Accesses the configuration of a specific user.

Parameters:

  • userId: The configuration id of the user.

GET

Gets the configuration of the specified user.

Errors:

  • 404 'A user with the given id does not exist': Returned if no user exists with the given id.

PUT

Updates the specified user configuration.

Information

This resource URL will take in a plain text password for the user and create a SHA-1 hashed version of it in the configuration.

If you want to pass in a pre-hashed version of the password that will be stored without modification you can use the following URL instead:

communication_manager/rest/config/core/{coreServerId}/users/noHash/{userId}

Errors:

  • 404 'A user with the given id does not exist': Returned if no user exists with the given id.
  • 409 'A user with the given username already exists.': Returned if a user with the given username already exists.
  • 412 'No username provided.': Returned if no username was provided.
  • 412 'No password provided.': Returned if no password was provided.

DELETE

Deletes the specified user configuration.

Errors:

  • 404 'A user with the given id does not exist': Returned if no user exists with the given id.

Sub/Child Resource Paths

communication_manager/rest/config/core/{coreServerId}/users/{userId}/userStatusColors

Description

Access the sub/child resource for the colors the user has set for call status in the client.

Parameters:

  • userId: The configuration id of the user.

Errors:

  • 404 'A user with the given id does not exist': Returned if no user exists with the given id.

See User Status Color Configuration for more information.

Curl Examples

Get all users in a core server

curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/users

Get the configuration for a specific user

curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/users/56cf70a3-1ee0-4b09-8f40-297430eeeddf

Add a new user

curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"56cf70a3-1ee0-4b09-8f40-297430eeeddf","username":"4224","password":"mypassword","enabled":true,"full":true,"displayName":"Steve S","lastPasswordChangedAt":null,"permissionDisplayName":"Steve S","permissionId":"56cf70a3-1ee0-4b09-8f40-297430eeeddf"}' http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/users

Delete a user

curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/users/56cf70a3-1ee0-4b09-8f40-297430eeeddf

Update a user

curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X PUT -d '{"id":"56cf70a3-1ee0-4b09-8f40-297430eeeddf","username":"4224","password":"mynewpassword","enabled":true,"full":true,"displayName":"Steve S","lastPasswordChangedAt":null,"permissionDisplayName":"Steve S","permissionId":"56cf70a3-1ee0-4b09-8f40-297430eeeddf"}' http://localhost:58080/communication_manager/rest/config/core/ee828da8-5ee6-412d-82ac-1273f598659d/users/56cf70a3-1ee0-4b09-8f40-297430eeeddf