Jump to: navigation, search

Devices API

Operations

The following operations are available for the /devices URI:

Operation Description Permissions
GET Retrieves a list of all devices for the specified grouping (for example, /users/{id}/devices will retrieve a list of devices assigned to the specified user).
  • Contact Center Admin
  • Agent (only for objects owned by this agent)


In addition, the following operations are supported for individual devices specified by the /devices/{id} URI:

Operation Description Permissions
GET Retrieves information about the specified device.
  • Contact Center Admin
  • Agent (only for objects owned by this agent)

List Devices

The devices can be listed with the following groupings:

  • all devices in contact center. The path to be used is .../api/v2/devices and the Contact Center Admin role is required.
  • all devices assigned to given user. The path to be used is ..api/v2/users/{userid}/devices and the Contact Center Admin role is required.
  • all devices assigned to current user. The path to be used is ...api/v2/me/devices and the Contact Center Agent or Login role is required.

The request can return the list of device URIs or the list of devices. To list URIs:

GET .../devices
return sample:
{
   "statusCode":0,
   "uris":[
      "http://172.21.16.123:8080/api/v2/devices/0c754c1f-7a65-4a7f-9a2b-c5bb5c983653",
      "http://172.21.16.123:8080/api/v2/devices/406ff680-63c8-4eeb-8c23-f39f538059d1",
      "http://172.21.16.123:8080/api/v2/devices/d6186ffc-af3d-4925-835e-a9e8dad98051"
   ]
}

To list devices, use the fields=* query parameter:

GET .../devices?fields=*

return sample:
{
   "statusCode":0,
   "devices":[
      {
         "id":"0c754c1f-7a65-4a7f-9a2b-c5bb5c983653",
         "deviceState":"Inactive",
         "phoneNumberUri":"http://172.21.16.123:8080/api/v2/phone-numbers/6658d431-9195-4184-a462-b8a6fd901de8",
         "telephonyNetwork":"Public",
         "model":"CloudDevice",
         "vendor":"Genesys",
         "phoneNumber":"+16509870000",
         "country":{
            "name":"United States",
            "code":"US",
            "callingCode":"1"
         },
         "location":"California",
         "e164Number":"+16509870000",
         "voiceEnvironmentUri":"http://172.21.16.123:8080/api/v2/voice-environments/b40eb01e-199d-4db3-a91f-a0cf104ab2bf"
      },
      {
         "id":"1fd21300-303d-401f-9b4c-0d9c2801433e",
         "deviceState":"Inactive",
         "phoneNumberUri":"http://172.21.16.123:8080/api/v2/phone-numbers/812a7b7b-0e5b-4025-9443-79363b85773c",
         "telephonyNetwork":"Public",
         "model":"CloudDevice",
         "vendor":"Genesys",
         "phoneNumber":"3001",
         "country":{
            "name":"",
            "code":"",
            "callingCode":""
         },
         "e164Number":"3001",
         "voiceEnvironmentUri":"http://172.21.16.123:8080/api/v2/voice-environments/b40eb01e-199d-4db3-a91f-a0cf104ab2bf"
      },
      ...
   ]
}

Attributes

Attribute Type Description Access Level
model String Optional. The device model. GET, POST
phoneNumber String Mandatory. The phone number assigned to this device. GET, POST
userState AgentState The current contact center state of the user to whom the device is assigned represented by an agent state object as described in Agent_States. link to be updated GET
country String The phone number country information:

"country":{"name":"United States","code":"US","callingCode":"1"}

GET
location String The geographical location of this phone number. GET
localNumber String The phone number in the format of its home country. GET
e164number String The phone number in E.164 format. GET
doNotDisturb String The do not disturb state on this device. Valid values are "On" and "Off". GET
forwardTo String The number to which calls are forwarded (if forwarding is enabled). GET
capabilities String Array A list of operations currently available on the device. Possible values for users with role ROLE_AGENT:

DoNotDisturbOn, DoNotDisturbOff, ForwardCallsOn, ForwardCallsOff

In addition, users who have the role ROLE_SUPERVISOR may see one or more of the following:

ListenIn, BargeIn, Coach, CancelSupervisorMonitoring

The exact combination depends on the particular contact center configuration as well as the current supervisorMonitoringState and supervisorMonitoringMode (see below) set for the device. In addition, if another supervisor is already monitoring the device, these functions will not be available as only one supervisor at a time may monitor a given device.

GET
supervisorMonitoringState String The current supervisor monitoring state on this device. Possible values are "ListenIn", "BargeIn", and "Coach". If monitoring is not in progress, this attribute is not present in the response. GET
supervisorMonitoringMode String Possible values:

NextCall—Supervisor will monitor the next call to arrive on this device.

AllCalls—Supervisor will monitor all calls on this device

GET
supervisorMonitoringScope String Call: Calls arriving on this device will be monitored by the supervisor from beginning to end, even when the call is transferred

Agent: Only calls handled by this agent are monitored. If the call is transferred, the supervisor will no longer be monitoring it.

GET
telephonyNetwork String This property denotes the type of telephony network the device is associated with. Valid values are "Public" or "Private".

Public—this would be set for a device that is connected over the PSTN via SIP Server.

Private—other deployment scenarios such as local endpoints or IP phones connected to SIP Server or PBX hardphones connected to Avaya.

If no value is provided for this property on device creation, the default value "Private" is assigned.

GET, POST
This page was last edited on October 31, 2023, at 13:29.
Comments or questions about this documentation? Contact us for support!