Copy of Asterisk Extension Group Viewers

Version 4.1 by michaely on 2016/05/31 14:27
Warning
For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

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 Asterisk extension group viewers REST resource allows access to the users that are marked as viewers of the group. This resource allows adding and removing of viewer users to and from the group.

 

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/asterisk/{coreServerId}/extensionGroups/{extensionGroupId}/viewers

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.

permissionId

String

Permission id of the user.

Resource Paths

communication_manager/rest/config/asterisk/{coreServerId}/extensionGroups/{extensionGroupId}/viewers

Description

Accesses all the users that are marked as viewers of the group.

GET 

Gets all the configuration for all the users that are makred as viewers of the group.

POST

Adds a user as a viewer of the extension group.

Errors:

  • 409 'The specified viewer already exists in the extension group.': Returned if the user is already a viewer in the extension group.

 

communication_manager/rest/config/asterisk/{coreServerId}/extensionsGroups/{extensionGroupId}/viewers/{userId}

Description

Accesses the configuration of a specific viewer in the extension group.

Parameters:

  • userId: The configuration id of the user.

GET

Gets the configuration of the specified viewer in the extension group.

Errors:

  • 404 'A viewer with the given id does not exist': Returned if no viewer exists in the extension group with the given id.

DELETE

Removes a specific viewer from the extension group.

Errors:

  • 404 'A viewer with the given id does not exist': Returned if no viewer exists in the extension group with the given id.

Curl Examples

Get all viewers in an extension group

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

Get the configuration for a specific viewer in an extension group

curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroup/56cf70a3-1ee0-4b09-8f40-297430eeeddf/viewers/e05a9e3c-c306-4bba-abd7-4fe1034fe9f6

Add a viewer to an extension group

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/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroup/56cf70a3-1ee0-4b09-8f40-297430eeeddf/viewers

Remove a viewer from an extension group

curl --user manager:manag3rpa55word -k -i -X DELETE http://localhost:58080/communication_manager/rest/asterisk/ee828da8-5ee6-412d-82ac-1273f598659d/extensionGroup/56cf70a3-1ee0-4b09-8f40-297430eeeddf/viewers/e05a9e3c-c306-4bba-abd7-4fe1034fe9f6

 

viewers