66
GETTING HELP For more information about installing, configuring, and administering Poly products or services, go to Poly Support. Poly, Inc. 345 Encinal Street Santa Cruz, California 95060 © 2019 Plantronics, Inc. All rights reserved. Poly, the propeller design, and the Poly logo are trademarks of Plantronics, Inc. All other trademarks are the property of their respective owners. Polycom UC Software 5.9.2 Applies to Poly Trio Solutions REST API REFERENCE MANUAL Software 5.9.2 | December 2019 | 3725-85884-004A

Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

  • Upload
    others

  • View
    54

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

GETTING HELP

For more information about installing, configuring, and administering Poly products or services, go to Poly Support.

Poly, Inc.

345 Encinal Street

Santa Cruz, California

95060

© 2019 Plantronics, Inc. All rights reserved. Poly, the propeller design, and the Poly logo are trademarks of Plantronics, Inc. All other trademarks are the property of their respective owners.

Polycom UC Software 5.9.2

Applies to Poly Trio Solutions

REST API REFERENCE MANUAL Software 5.9.2 | December 2019 | 3725-85884-004A

Page 2: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Poly, Inc. 2

Contents

Before You Begin ........................................................................................................................ 4

Prerequisite Information ........................................................................................................................... 4

Audience and Purpose of This Guide ...................................................................................................... 4

Get Help ................................................................................................................................................... 4 The Poly Community .......................................................................................................................................... 5

REST API Commands ................................................................................................................. 6

Configuration Options .............................................................................................................................. 6 Configuration Parameters ................................................................................................................................... 6

Commands and Structure ........................................................................................................................ 7 Management.Restart .......................................................................................................................................... 7 Management.Reboot .......................................................................................................................................... 8 Management.ConfigReset .................................................................................................................................. 9 Management.FactoryReset .............................................................................................................................. 10 Management.NetworkInfo ................................................................................................................................. 11 Management.DeviceInfo ................................................................................................................................... 12 Management.NetworkStatistics ........................................................................................................................ 13 Management.SetConfig .................................................................................................................................... 14 Management.GetConfig .................................................................................................................................... 15 WebCallControl.Dial ......................................................................................................................................... 16 WebCallControl.EndCall ................................................................................................................................... 18 WebCallControl.MuteCall ................................................................................................................................. 19 WebCallControl.TransferCall ............................................................................................................................ 20 WebCallControl.SendDTMF ............................................................................................................................. 21 WebCallControl.CallLogs .................................................................................................................................. 22 WebCallControl.GetCurrentPresence ............................................................................................................... 23 Network.UploadBgCapture ............................................................................................................................... 25 WebCallControl.SipStatus ................................................................................................................................ 26 WebCallControl.HoldCall .................................................................................................................................. 28 WebCallControl.ResumeCall ............................................................................................................................ 29 WebCallControl.AnswerCall ............................................................................................................................. 30 WebCallControl.IgnoreCall ............................................................................................................................... 31 WebCallControl.RejectCall ............................................................................................................................... 32 Management.PollForStatus .............................................................................................................................. 33 Management.GetTransferType ......................................................................................................................... 34 Management.SetTransferType ......................................................................................................................... 35 Management.Uixml ........................................................................................................................................... 36 Management.DeviceStats ................................................................................................................................. 37 Management.RunningConfig ............................................................................................................................ 39 Management.SimulateTouch ............................................................................................................................ 41 Management.SkypeSignIn ................................................................................................................................ 42 Management.SkypeSignOut ............................................................................................................................. 43

Page 3: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Poly, Inc. 3

Management.WebSignIn .................................................................................................................................. 44 Management.WebSignInCancel ....................................................................................................................... 45 Management.CommunicationInfo ..................................................................................................................... 46 Management.LocationInformation .................................................................................................................... 47 Management.ExportConfiguration .................................................................................................................... 49 Management.SessionStats ............................................................................................................................... 50 Management.CallStatus ................................................................................................................................... 52 Management.LineInfo ....................................................................................................................................... 53 Management.LineInfo Version 2 ....................................................................................................................... 55 Management.UpdateConfiguration ................................................................................................................... 57 Management.SimulateTextInput ....................................................................................................................... 58 Management.SimulateKeyEvent....................................................................................................................... 59 Management.SimulateHook ............................................................................................................................. 60 WebCallControl.CallStatus Version 2 ............................................................................................................... 61 Management.DeviceInfo Version 2 ................................................................................................................... 63

Diagnostics ................................................................................................................................ 65

Error Codes ............................................................................................................................................ 65 Error Code and Descriptions ............................................................................................................................ 65

Logging .................................................................................................................................................. 66 Log Levels ........................................................................................................................................................ 66

Page 4: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Before You Begin

The REST (Representational State Transfer) API feature, which provides a convenient, scalable,

portable, and reliable API for interacting with Poly Trio phones, enables users to execute certain functions

and retrieve information.

This manual applies to the following Poly Trio 8300, Poly Trio 8500, and Poly Trio 8800 systems.

Prerequisite Information

Before you begin working with the REST API, note the following:

● The REST API feature is disabled by default.

● You must change the default administrator password before you can use the REST API.

● A post request must send the content-type as application/JSON. If this content-type is not sent by the client, the phone returns an HTTP 400 error.

● The REST API cannot accept more than 20 KB of data. If more than 20 KB of data is sent, the phone returns an HTTP 413 error.

● Parallel processing is not allowed. If one API is being processed and another API is received by the phone, the second request will receive an HTTP 403 error or will be queued for later processing.

Audience and Purpose of This Guide

The primary audience for this manual is the person administering the session initiation protocol (SIP)

server, provisioning server(s), VoIP network, and Poly UC Software that enables configuration and

management of the phone features. This manual is not intended for end users. This manual provides

information primarily for mid-level administrators with experience in networking who understand the

basics of open SIP networks and VoIP endpoint environments.

Get Help

For more information about installing, configuring, and administering Poly products, refer to the

Documents and Downloads section at Poly Support.

To access the latest Poly UC Software Release Notes, refer to Poly Voice Support.

To access the user guide for Poly Trio conferencing phones, refer to the product support page for your

phone at Poly Voice Support.

Some Poly products contain open source software. For details, refer to Poly Support.

To find help or technical support for your phones, search for Poly documentation at the Poly Unified

Communications (UC) Software Resource Center.

Page 5: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Poly, Inc. 5

The Poly Community

The Poly Community gives you access to the latest developer and support information. Participate in

discussion forums to share ideas and solve problems with your colleagues. To register with the Poly

Community, simply create a Poly online account. When logged in, you can access Poly support personnel

and participate in developer and support forums to find the latest information on hardware, software, and

partner solutions topics.

Page 6: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 6

REST API Commands

This section describes the configuration parameters and API commands for Poly UC Software, version

5.8.0.

Configuration Options

The REST API feature is disabled by default. The following parameters support the REST API feature

and are editable by using the configuration file and system web interface only.

Configuration Parameters

Attribute Permitted Values Default Value

apps.restapi.enabled 0 or 1 0

log.level.change.restapi 0 – 6 4

Page 7: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 7

Commands and Structure

Management.Restart

Description This API executes a safeReboot on the phone. safeReboot ensures that all calls

on the phone are ended before initiating phone reboot.

Protocol, Method & Path Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/mgmt/safeRestart

Input / Output Format JSON

Access Level Admin

Input None

Output Success Response:

{

“Status”: “2000”

}

Failure Response:

{

“Status”: “5000”

}

Applicable return codes 2000, 5000

Page 8: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 8

Management.Reboot

Description This API executes a safeReboot on the phone. safeReboot ensures that all calls

on the phone are ended before initiating phone reboot.

Protocol, Method & Path Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/mgmt/safeReboot

Input and Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

“Status”: “2000”

}

Failure Response:

{

“Status”: “5000”

}

Applicable return codes 2000, 5000

Page 9: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 9

Management.ConfigReset

Description This API resets the configurations.

Protocol, Method & Path Protocol: HTTP/HTTPS

Method: POST

Path:

/api/v1/mgmt/configReset (resets local, web and device settings)

/api/v1/mgmt/configReset/local

/api/v1/mgmt/configReset/web

/api/v1/mgmt/configReset/device

Input and Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

“Status”: “2000”

}

Failure Response:

{

“Status”: “5000”

}

Applicable return codes 2000, 5000

Page 10: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 10

Management.FactoryReset

Description This API factory-resets the phone.

Protocol, Method & Path Protocol: HTTP/HTTPS

Method: POST

Path:

/api/v1/mgmt/factoryReset

Input and Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

“Status”: “2000”

}

Failure Response:

{

“Status”: “5000”

}

Applicable return codes 2000, 5000

Page 11: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 11

Management.NetworkInfo

Description This API provides details about the phone’s network information.

Protocol, Method & Path Protocol: HTTP/HTTPS

Method: GET

Path: /api/v1/mgmt/network/info

Input and Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

“Status”: “2000”,

“data”: {

"DHCP": "<Enabled/Disabled>",

"DHCPServer": "<DHCP_SERVER_ADDRESS>",

"DHCPBootServerUseOption": "<BOOT_SERVER_USE_OPTION>",

"DHCPBootServerOption": "<BOOT_SERVER_OPTION>",

"DHCPBootServerOptionType": "<BOOT_SERVER_OPTION>",

"DHCPOption60Format": "<DHCP_OPTION60_FORMAT>",

"IPV4Address": "<IP_ADDRESS>",

"IPV6Address": "<IP_ADDRESS>",

"DefaultGateway": "<GATEWAY>",

"DNSServer": "<DNS_SERVER>",

"AlternateDNSServer": "<DNS_SERVER>",

"DNSDomain": "<DNS_DOMAIN>",

"SNTPAddress": "<SNTP_ADDRESS>",

"SubnetMask": "<SUBNET_MASK>",

"LANPortStatus": "<Active/Inactive>",

"LANSpeed": "<LAN_SPEED>",

"VLANID": "<VLAN_ID>",

"LLDP": "<Enabled/Disabled>",

"CDPCompability": "<Enabled/Disabled>",

"VLANDiscoveryMode": "<Disabled/Fixed/Custom>",

"VLANIDOption": "<VLAN_ID_OPTION_VALUE>",

"ProvServerAddress": "<PROV_SERVER_ADDRESS>",

"ProvServerUser": "<PROV_SERVER_USER>",

"ProvServerType": "<PROV_SERVER_TYPE>",

"UpgradeServer": "<UPGRADE_SERVER>",

"ZTPStatus": "<ZTP_STATUS>"

}

}

Failure Response:

{

“Status”: “5000”

}

Applicable return codes 2000, 5000

Page 12: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 12

Management.DeviceInfo

Description This API provides details about the phone’s information.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path: /api/v1/mgmt/device/info

Input and Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

“Status”: “2000”,

“data”:

{

"ModelNumber ": "<MODEL_NUMBER>",

"FirmwareRelease": "<FIRMWARE_RELEASE>",

"DeviceType": "HardwareEndPoint",

"DeviceVendor": "Poly",

"UpTimeSinceLastReboot": "<DAYS_HOURS_MINUTES_SECONDS>",

"IPV4Address": "<IP_ADDRESS>",

"IPV6Address": "<IP_ADDRESS>",

"MACAddress": "<MAC_ADDRESS>",

"AttachedHardware": [

"Camera":“<true/false>”,

"EM": [

{

”type”: “<paper/LCD>”,

“version”: “<VERSION>”},

]

]

}

}

Failure Response:

{

“Status”: “5000”

}

Applicable return codes 2000, 5000

Page 13: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 13

Management.NetworkStatistics

Description This API provides the phone’s network statistics information.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path:

/api/v1/mgmt/network/stats

Input and Output Syntax JSON

Access Level Admin

Input None

Output Success Response for Path: /api/mgmt/network/stats

{

"Status": “2000”,

"data":

{

"UpTime": "<NETWORK_UPTIME>",

"RxPackets": <NUM_OF_RX_PACKETS>

"TxPackets": <NUM_OF_TX_PACKETS>

}

}

Failure Response:

{

“Status”: “5000”

}

Applicable return codes 2000, 5000

Page 14: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 14

Management.SetConfig

Description This API provides the interface to set the configuration allowing a maximum of 20

parameters and up to 20 KB of content length for a given request.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/mgmt/config/set

Input and Output Syntax JSON

Access Level Admin

Input {

"data":

{

"<CONFIG_PARAM_NAME>": "<CONFIG_PARAM_VALUE>",

"<CONFIG_PARAM_NAME>": "<CONFIG_PARAM_VALUE>",

}

}

At least one parameter has to be provided.

Output Success Response:

{

“Status”: “2000”

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return codes 2000, 4000, 4001, 4009, 5000

4000 → Invalid Parameters,

4001 → Device busy (In case of lync web ticket generation or registration any

setConfig returns this error code)

4009 → Parameter count exceeded limit of 20 parameters

Page 15: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 15

Management.GetConfig

Description This API provides running configuration value for given configuration parameters.

The maximum is 20 parameters. The maximum content length for a request is 20

KB.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/mgmt/config/get

Input and Output Syntax JSON

Access Level Admin

Input {

"data":

[

"<CONFIG_PARAM_NAME_1>",

"<CONFIG_PARAM_NAME_2>",

]

}

At least one parameter has to be provided.

Output Success Response:

{

"Status": “2000”,

"data":

{

"<CONFIG_PARAM_NAME_1>":

{

"value": "<VALUE>",

"source": "<LOCAL/WEB/CONFIG/DEFAULT>"

},

"<CONFIG_PARAM_NAME_2>":

{

"value": "<VALUE>",

"source": "<LOCAL/WEB/CONFIG/DEFAULT/DEVICE>"

}

}

}

Failure Response:

{

“Status”: “5000”

}

Applicable return codes 2000, 4000, 4009, 5000

4009 → Parameter count exceeded limit of 20 parameters

Page 16: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 16

WebCallControl.Dial

Description This API enables a user to initiate a call to a given number. Moreover, this API

initiates the call and returns a response as an acknowledgment of request

received.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/callctrl/dial

Input and Output Syntax JSON

Access Level Admin

Input {

"data":

{

"Dest": "<NUMBER/SIP_URI>”,

"Line": “<LINE_NUMBER>”,

“Type”:”<SIP/TEL/H323>”

}

}

Dest – Mandatory Parameter

Line – Optional.If Line is omitted from the input data the Trio will attempt to dial

the Dest from a matching line when multiple lines and dialplan line switching are

configured. Otherwise line 1 will be used to dial.

Type – Optional. Default type is TEL

Output Success Response:

{

"Status": “2000”

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return codes 2000, 4000, 5000

Page 17: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 17

Note The format is as indicated below where two parameters are required. The

[email protected] is the SIPURI of the person that sent the invite. Item in blue is

the Skype meeting ID.

{

"data":

{

"Dest": " “[email protected];gruu;opaque=app:conf:focus:id:ZTMVDGBH“,

"Line": "1"

"Type":"SIP"

}

}

Page 18: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 18

WebCallControl.EndCall

Description This API ends an active call.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path:

/api/v1/callctrl/endCall

Input and Output Syntax JSON

Access Level Admin

Input {

"data":

{

"Ref": "<CALL_REFERENCE>”

}

}

Ref is a mandatory parameter.

Output Success Response:

{

"Status": “2000”

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return codes 2000, 4000, 4003, , 4007, 5000

4003 Operation not allowed. Like in case of call is on hold.

4007 When call does not exist.

Page 19: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 19

WebCallControl.MuteCall

Description This API enables a user to mute the phone, if applicable.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/callctrl/mute

Input and Output Syntax JSON

Access Level Admin

Input {

"data":

{

“state”: "<0/1>”

}

}

State is a mandatory parameter.

Output Success Response:

{

"Status": “2000”

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return codes 2000, 4000, 4003, , 4007, 5000

4003 → Operation not allowed. Like in case of call is on hold.

4007→ When call does not exist.

Page 20: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 20

WebCallControl.TransferCall

Description This API enables a user to transfer a call. In addition, this API always executes a

blind transfer.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/callctrl/transferCall

Input and Output Syntax JSON

Access Level Admin

Input {

"data":

{

"Ref": "<CALL_REFERENCE>",

“TransferDest”: “<NUMBER>”

}

}

Ref is mandatory parameter.

TransferDest is mandatory parameter.

Output Success Response:

{

“Status”: “2000”

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return codes 2000, 4000, 4007, 5000

4007→ When call does not exist.

Page 21: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 21

WebCallControl.SendDTMF

Description This API enables a user to send DTMF tones during an active call.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/callctrl/sendDTMF

Input and Output Syntax JSON

Access Level Admin

Input {

"data":

{

“Digits": "<DIGITS>"

}

}

Digits: mandatory parameter.

Output “Response”:

{

“Status”: “2000”

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return codes 2000, 4000, 4007, 5000

4007→ When call does not exist.

Page 22: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 22

WebCallControl.CallLogs

Description This API provides the phone’s call logs.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path:

/api/v1/mgmt/callLogs

/api/v1/mgmt/callLogs/missed

/api/v1/mgmt/callLogs/received

/api/v1/mgmt/callLogs/placed

Input and Output

Syntax

JSON

Access Level Admin

Input None

Output Success Response for Path: /api/v1/callctrl/callLogs

{

"Status": “2000”,

"data":

{

“missed”: [

{

"LineNumber": "<LINE NUMBER>",

"StartTime": "<START_TIME>",

“RemotePartyName”: “<REMOTE_PARTY_NAME>”,

"RemotePartyNumber": <REMOTE_PARTY_NUMBER>,

“Duration”:”<DURATION>”

},

{

“LineNumber”: "<LINE NUMBER>",

"StartTime": "<START_TIME>",

“RemotePartyName”: “<REMOTE_PARTY_NAME>”,

"RemotePartyNumber": <REMOTE_PARTY_NUMBER>,

“Duration”:”<DURATION>”

},

...

...

...

],

“received”: [

{

"LineNumber": "<LINE NUMBER>",

"StartTime": "<START_TIME>",

“RemotePartyName”: “<REMOTE_PARTY_NAME>”,

"RemotePartyNumber": <REMOTE_PARTY_NUMBER>,

“Duration”:”<DURATION>”

},

{

"LineNumber": "<LINE NUMBER>",

Page 23: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 23

"StartTime": "<START_TIME>",

“RemotePartyName”: “<REMOTE_PARTY_NAME>”,

"RemotePartyNumber": <REMOTE_PARTY_NUMBER>,

“Duration”:”<DURATION>”

},

...

...

...

],

“placed”: [

{

“LineNumber": "<LINE NUMBER>",

"StartTime": "<START_TIME>",

“RemotePartyName”: “<REMOTE_PARTY_NAME>”,

"RemotePartyNumber": <REMOTE_PARTY_NUMBER>,

“Duration”:”<DURATION>”

},

{

"LineNumber": "<LINE NUMBER>",

"StartTime": "<START_TIME>",

“RemotePartyName”: “<REMOTE_PARTY_NAME>”,

"RemotePartyNumber": <REMOTE_PARTY_NUMBER>,

“Duration”:”<DURATION>”

},

...

]

}

}

Applicable return

codes

2000, 4400, 4403, 5000, 5500

WebCallControl.GetCurrentPresence

Description This API provides the phone’s presence and is supported only for Skype for

Business.

Protocol, Method & Path Protocol: HTTP/HTTPS

Method: GET

Path: /api/v1/mgmt/getPresence

Input and Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

"Status": “2000”

"data" :

{

Page 24: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 24

"Presence":"<Presence State>"

}

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return codes 2000, 4004, 5000

4004 → This is supported on any other call servers.

Page 25: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 25

Network.UploadBgCapture

Description This API uploads the phone’s captured network packets to a specified URL. If

no URL is provided, then the API uploads the captured network packets to the

default upload URL which is the provisioning server.

Protocol, Method & Path Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/mgmt/network/uploadBgCapture

Input and Output Syntax JSON

Access Level Admin

Pre-condition Packet capture configuration must be enabled to allow background packet

capturing on the phone. URL must be configured or has to be passed as an

argument with the API call.

Input {

"data":

{

"url": "<Absolute URL>"

}

}

URL: optional parameter.

Output Success Response:

{

"Status": “2000”

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

If diags.pcap.enabled and/or diags.pcap.background.enabled configurations

are not enabled, then the phone will reply with HTTP error code 404.

You cannot execute this API within 10 seconds of a previous uploadBgCapture

command. A 4001 status code will be returned.

Applicable return codes 2000, 4000, 4001, 5000

Page 26: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 26

WebCallControl.SipStatus

Description This API provides the phone’s SIP level details for the user.

Protocol, Method & Path Protocol: HTTP/HTTPS

Method: GET

Path: /api/v1/webCallControl/sipStatus

Input and Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

"data":

{

"User":

[

{

"Name": "3339940674"

"TotalEvents": "2"

"LineNumber": "1"

"Events":

[

{

"Type": "Register"

"Overlap": "120"

"CallID": "b8c9a1cb-

[email protected]"

"RegistrationState":

"Registered"

"Expires": "6965"

},

{

"Type": "BLF"

"CallID": "7a8900cb-

[email protected]"

}

],

"TotalCalls": "2"

"Calls":

[

{

"CallState": "Hold"

"CallID": "f64900cb-

[email protected]"

},

{

"CallState": "Connected"

"CallID": "d64900cb-

[email protected]"

}

Page 27: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 27

]

},

],

"TotalUser": "2"

}

"Status": "2000"

}

Failure Response:

{

“Status”: “5000”

}

Applicable return codes 2000, 5000

Page 28: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 28

WebCallControl.HoldCall

Description This API allows the user to hold an active call.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path:

/api/v1/callctrl/holdCal

Input and Output

Syntax

JSON

Access Level Admin

Input {

"data":

{

"Ref": "<CALL_REFERENCE>"

}

}

Output Success Response:

{

"Status": “2000”

}

Failure Response:

{

Status”: “<4xxx/5xxx>”

}

Applicable return

codes

2000, 4003, , 4007, 5000

Notes Input is optional. If input is not provided, the active call or conference will be put on

hold.

If the call represented by “Ref” in input is in a conference, the conference will be put on

hold.

Page 29: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 29

WebCallControl.ResumeCall

Description This API resumes the call which was previously on hold.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path:

/api/v1/callctrl/resumeCall

Input and Output

Syntax

JSON

Access Level Admin

Input {

"data":

{

"Ref": "<CALL_REFERENCE>"

}

}

Ref is a mandatory parameter

Output Success Response:

{

"Status": “2000”

}

Failure Response:

{

"Status": “<4xxx/5xxx>”

}

Applicable return

codes

2000, 4003, 4007, 5000

Notes Input is optional. If input is not provided, the active call will be resumed if it’s on hold.

If the call represented by “Ref” in input is in a conference, the conference will be

resumed if it’s on hold.

Page 30: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 30

WebCallControl.AnswerCall

Description This API answers an incoming call.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path:

/api/v1/callctrl/answerCall

Input and Output

Syntax

JSON

Access Level Admin

Input {

"data":

{

"Ref": "<CALL_REFERENCE>"

}

}

Output Success Response:

{

"Status": “2000”

}

Failure Response:

{

"Status": “<4xxx/5xxx>”

}

Applicable return

codes

2000, 4000, 4003, , 4007, 5000

4003 → Operation not allowed. Like in case, call is not in an incoming state.

4007→ When call does not exist.

Notes Input is optional. The incoming call represented by “Ref” will be answered only if it’s an

active call.

Page 31: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 31

WebCallControl.IgnoreCall

Description This API allows the user to ignore an incoming call.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path:

/api/v1/callctrl/ignoreCall

Input and Output

Syntax

JSON

Access Level Admin

Input {

"data":

{

"Ref": "<CALL_REFERENCE>"

}

}

Output Success Response:

{

"Status": “2000”

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return

codes

2000, 4003, 4007, 5000

Notes Input is optional. The call represented by “Ref” will be ignored only if it’s an active call.

Page 32: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 32

WebCallControl.RejectCall

Description This API allows the user to reject an incoming call.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path:

/api/v1/callctrl/rejectCall

Input and Output

Syntax JSON

Access Level Admin

Input {

"data":

{

"Ref": "<CALL_REFERENCE>"

}

}

Output Success Response:

{

"Status": “2000”

}

Failed Response:

{

"Status": “<4xxx/5xxx>”

}

Applicable return

codes 2000, 4003, 4007, 5000

Notes Input is optional. The call represented by “Ref” will be rejected only if it’s the active

call.

Page 33: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 33

Management.PollForStatus

Protocol, Method & Path Protocol: HTTPS

Method: GET

Path: /api/v1/mgmt/pollForStatus

Input and Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

“Status”: “2000”,

“data”:

{

“State”: “<Idle|Active|Error>”,

//// If State = Idle

“StateData”: “<Time of last call 2015-04-07T19:11:07“

//// If State = Active

“StateData”:”<Active call duration>”

//// If State = Error

“StateData”:”<Any available Error information>”

//// e.g. “All Phone applications are not ready.”

}

}

Failure Response”

{

“Status”: “5000”

}

Applicable return codes 2000, 5000

Page 34: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 34

Management.GetTransferType

Description This API returns the current transfer type set on the phone.

Protocol, Method &

Path

Protocol: HTTP/HTTPS

Method: GET

Path: /api/v1/mgmt/transferType/get

Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

"data": {

"Type": "<Consultative/Blind/Safe/Unknown>"

},

“Status”: “2000”

}

Failure Response:

{

“Status”: “5000”

}

Applicable return

codes

2000, 5000

Page 35: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 35

Management.SetTransferType

Description This API sets the transfer type on the phone.

Protocol, Method &

Path

Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/mgmt/transferType/set

Output Syntax JSON

Access Level Admin

Input {

"data": {

“Type”: "<Consultative/Blind/Safe>"

}

}

Output Success Response:

{

“Status”: “2000”

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return

codes

2000, 4000, 5000

Page 36: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 36

Management.Uixml

Description This API provides an XML representation of phone’s user interface.

Protocol, Method &

Path

Protocol: HTTP/HTTPS

Method: GET

Path: /api/v1/mgmt/uixml

Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

"data": "<XML_DATA>",

“Status”: “2000”

}

Failure Response:

{

“Status”: “5000”

}

Applicable return

codes

2000, 5000

Note For soft keys involving “More”, user must take the view-offset (view-offset="0:0" for the

first set of keys, view-offset="320:0" for the second set of keys and so on) in UIXML

into consideration. To get the actual coordinates of a softkey on the screen, user

should subtract the x value of view-offset from the x value of softkey coordinate.

Page 37: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 37

Management.DeviceStats

Description This API provides details about phone’s CPU and memory usage.

Protocol, Method &

Path

Protocol: HTTP/HTTPS

Method: GET

Path: /api/v1/mgmt/device/stats

Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

"data": {

"CPU": {

"Current": "<CURRENT_CPU_LOAD>",

"Average": "<AVERAGE_CPU_LOAD>"

},

"dbs": {

"uordblks": "<SIZE_IN_BYTES>",

"hblkhd": "<SIZE_IN_BYTES>",

"arena": "<SIZE_IN_BYTES>",

"fordblks": "<SIZE_IN_BYTES>"

},

"ec": {

"uordblks": "<SIZE_IN_BYTES>",

"hblkhd": "<SIZE_IN_BYTES>",

"arena": "<SIZE_IN_BYTES>",

"fordblks": "<SIZE_IN_BYTES>"

},

"pgui": {

"uordblks": "<SIZE_IN_BYTES>",

"hblkhd": "<SIZE_IN_BYTES>",

"arena": "<SIZE_IN_BYTES>",

"fordblks": "<SIZE_IN_BYTES>"

},

"brow": {

"uordblks": "<SIZE_IN_BYTES>",

"hblkhd": "<SIZE_IN_BYTES>",

"arena": "<SIZE_IN_BYTES>",

"fordblks": "<SIZE_IN_BYTES>"

},

"osd": {

"uordblks": "<SIZE_IN_BYTES>",

"hblkhd": "<SIZE_IN_BYTES>",

"arena": "<SIZE_IN_BYTES>",

"fordblks": "<SIZE_IN_BYTES>"

},

"em": {

Page 38: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 38

"uordblks": "<SIZE_IN_BYTES>",

"hblkhd": "<SIZE_IN_BYTES>",

"arena": "<SIZE_IN_BYTES>",

"fordblks": "<SIZE_IN_BYTES>"

},

"em": {

"uordblks": "<SIZE_IN_BYTES>",

"hblkhd": "<SIZE_IN_BYTES>",

"arena": "<SIZE_IN_BYTES>",

"fordblks": "<SIZE_IN_BYTES>"

},

},

"RAMDiskSize": "<SIZE_IN_BYTES>"

},

“Status”: “2000”

}

Failure Response:

{

“Status”: “5000”

}

Applicable return

codes

2000, 5000

Page 39: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 39

Management.RunningConfig

Description This API provides information about running configuration on phone.

Protocol, Method &

Path

Protocol: HTTP/HTTPS

Method: GET

Path: /api/v1/mgmt/device/runningConfig

Output Syntax JSON

Access Level Admin

Input None

Output Success Response:

{

"data": {

"Network": {

"IPAddress": "<PHONE_IP_ADDRESS>",

"SubnetMask": "<SUBNET_MASK>",

"IPGateway": "<IP_GATEWAY>",

"IPStack": "IPv4 Only/IPv6 Only/(Dual IPv4/IPv6 stack)",

"IPv6Address": "<PHONE_IPV6_ADDRESS>",

"IPv6Gateway": "<IPV6_GATEWAY>",

"IPv6AddressDiscovery": "<DHCP/Static/SLAAC>",

"IPv6LinkAddress": "<LINK_LOCAL_IPV6_ADDRESS>",

"IPv6ULAAddress": "<UNIQUE_LOCAL_IPV6_ADDRESS>",

"PreferredNetwork": "<IPv4/IPv6>",

"VLAN": "<VLAN_IDENTIFIER>",

"VLANFiltering": "<Enabled/Disabled>",

"CDP": "<Enabled/Disabled>"

"LLDP": "<Enabled/Disabled>",

"StormFilterPPS": "<STORM_FILTER_PPS_VALUE>",

"StormFiltering": "<Enabled/Disabled>",

},

"DHCP": {

"Feature": "<Enabled/Disabled>",

"Option60Format": "<RFC3925 Binary/ASCII String>",

"BootServerOptionType": "<IP/String>",

"BootServerUseOption": "<BOOT_SERVER_USE_OPTION>",

"BootServerOption": "<BOOT_SERVER_OPTION_NUMBER>",

"OfferTimeout": "<DHCP_OFFER_TIMEOUT>",

"VLANDiscovery": "<Disabled/Default/Custom>"

"VLANDiscoveryOption": "<DHCP_OPTION_FOR_VLAN_DISC>",

},

"DNS": {

"Feature": "<Enabled/Disabled>",

"PrimaryServer": "<PRIMARY_DNS_SERVER>",

"SecondaryServer": "<SECONDARY_DNS_SERVER>",

"Domain": "<DNS_DOMAIN>"

},

"Provisioning": {

Page 40: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 40

"Server": "<PROVISIONING_SERVER_ADDRESS>",

"ServerType": "<FTP/Trivial FTP/FTPS/HTTP/HTTPS>",

"User": "<PROVISIONING_USERNAME>",

"FileTxTries": "<MAX_ATTEMPTS_FOR_FILE_TRANSFER>",

"RetryWait": "<FILE_TRANSFER_RETRY_WAIT_TIME>",

"MaxServers": "<MAX_NUMBER_OF_IP_TO_USE_FROM_DNS>",

"NetworkEnv": "Dial-up/(Cable/DSL)/LAN",

"TagSerialNo": "<Enabled/Disabled>"

},

"Syslog": {

"Server": "<SYSLOG_SERVER_ADDRESS>",

"Transport": "<None/TCP/UDP/TLS>"

"RenderLevel": "<SYSLOG_RENDER_LEVEL>",

"Facility": "<SYSLOG_FACILITY>",

"PrependMAC": "<Enabled/Disabled>",

},

"SNTP": {

"Server": "<SNTP_SERVER_ADDRESS>",

"GMTOffsetSeconds": "<GMT_OFFSET_IN_SECONDS>",

"GMTOffsetHours": "<GMT_OFFSET_IN_HOURS>"

},

"TR069": {

"Feature": "<Enabled/Disabled>",

"ACSURL": "<ACS_SERVER_URL>",

"ACSUsername": "<ACS_USERNAME>",

"CPEUsername": "<CPE_USERNAME>",

"PeriodicInform": "<Enabled/Disabled>",

"InformInterval": "<PERIODIC_INFORM_INTERVAL>",

"UpgradeManagement": "<Enabled/Disabled>"

}

},

“Status”: “2000”

}

Failure Response:

{

“Status”: “5000”

}

Applicable return

codes

2000, 5000

Page 41: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 41

Management.SimulateTouch

Description This API simulates touch events on phone.

Protocol, Method &

Path

Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/mgmt/simulateTouch

Input and Output

Syntax

JSON

Access Level Admin

Input {

"data": {

"Type": "<Tap/Press/Release/Swipe>",

"Positions": [

{

"X": "<X_CO-ORDINATE>",

"Y": "<Y_CO-ORDINATE>"

}

],

"Duration": "<DURATION_IN_MILLISECONDS>",

"Easing": "<0-40>"

}

}

Output Success Response:

{

“Status”: “2000”

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return

codes

2000, 4000, 4009, 5000

Note • For “Tap/Press/Release” events, only one position object is accepted.

• For “Swipe” event, a minimum of two and a maximum of five events are accepted.

• “Duration” is the time in milliseconds over which the event is simulated. This is an

optional parameter.

• “Easing” represents the type of easing curve applied for the simulation. This is an

optional parameter. Please refer to http://doc.qt.io/qt-4.8/qeasingcurve.html#Type-

enum for more information on the accepted values.

• This API will not work if the position provided is outside the screen boundary.

• For soft keys involving “More”, user must take the view-offset (view-offset="0:0"

for the first set of keys, view-offset="320:0" for the second set of keys and so on)

in UIXML into consideration. To get the actual coordinates of a softkey on the

screen, user should subtract the x value of view-offset from the x value of softkey

coordinate.

Page 42: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 42

Management.SkypeSignIn

Description This API allows user to sign in to Skype for Business on phone.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path:

/api/v1/mgmt./skype/signIn

Input and Output

Syntax

JSON

Access Level Admin

Input {

"data": {

"Address": "<SIGN_IN_ADDRESS>",

"User": "<USERNAME>",

"Password": "<PASSWORD>",

"Domain": "<DOMAIN>",

“LockCode”: "<LOCK_CODE>"

}

}

Output Success Response:

{

“Status”: “2000”

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return

codes

2000, 4000, 4002, 4003, 4004, 5000

Notes • Response will be returned only after the sign in operation succeeds or fails or

times out (150 seconds).

• For accounts where domain is optional, empty string must be passed as value for

“Domain”.

• “LockCode” is an optional parameter.

Page 43: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 43

Management.SkypeSignOut

Description This API allows user to sign out of Skype for Business on phone

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path:

/api/v1/mgmt/skype/signOut

Input and Output

Syntax

JSON

Access Level Admin

Input None

Output Success Response:

{

“Status”: “2000”

}

Failure Response:

{

“Status”: "<4xxx/5xxx>”

}

Applicable return

codes

2000, 4003, 4004, 5000

Page 44: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 44

Management.WebSignIn

Description This API allows the user to sign in to Skype for Business via the web.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path:

/api/v1/mgmt/webSignIn

Input and Output

Syntax

JSON

Access Level Admin

Input None

Output Success Response:

{

"data": {

"Url": "http://aka.ms/sphone",

"Code": "bpd9m42ul"

}

},

"Status": "2000"

}

Failure Response:

{

“Status”: “5000”

}

Applicable return

codes

2000, 5000

Page 45: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 45

Management.WebSignInCancel

Description This API cancels a previous attempt to sign in a user to Skype for Business via the

web.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path:

/api/v1/mgmt/webSignInCancel

Input and Output

Syntax

JSON

Access Level Admin

Input None

Output Success Response:

{

"data": {

"result": "Canceled"

}

},

"Status": "2000"

}

Failure Response:

{

“Status”: “5000”

}

Applicable return

codes

2000, 5000

Page 46: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 46

Management.CommunicationInfo

Description This API provides information about any ongoing communication on phone.

Note: This API provides RxTx port open information only. For actual packets

sent/received API “mgmt/media/sessionStats” should be used.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path:

/api/v1/mgmt/media/communicationInfo

Input and Output

Syntax

JSON

Access Level Admin

Input None

Output Success Response:

{

"data": {

"CommunicationType": [

"<RxOnly/TxOnly/RxTx/None/Idle>",

"<RxOnly/TxOnly/RxTx/None/Idle>"

],

"FarEndMuteState": [

"<CONFERENCE_LEG_PHONE_NUMBER>",

...

],

“PhoneMuteState”: "<True/False>”

},

“Status”: “2000”

}

Failure Response:

{

“Status”: “5000”

}

Applicable return

codes

2000, 5000

Page 47: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 47

Management.LocationInformation

Description This API provides the location information of the phone.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path: /api/v1/mgmt/location/info

Input and Output

Syntax

JSON

Access Level Admin

Input None

Output Success Response:

{

"data": {

"Country": "<Value>"

"StreetGroup": "<Value>"

"House Number": "<Value>"

"State": "<Value>"

"Place Type ": "<Value>"

"District": "<Value>"

"Add. Info": "<Value>"

"Road SubSection": "<Value>"

"City": "<Value>"

"Neighbourhood Block": "<Value>"

"Landmark": "<Value>"

"Post Box": "<Value>"

"Division": "<Value>"

"Street": "<Value>"

"Road Section": "<Value>"

"Street1": "<Value>"

"Street2": "<Value>"

"Place Name": "<Value>"

"House Num. Suff.": "<Value>"

"Zip Code": "<Value>"

"Road Pre Modifier": "<Value>"

"Building": "<Value>"

"Unit": "<Value>"

"Floor": "<Value>"

"Additional Code": "<Value>"

"Room": "<Value>"

"Postal Name": "<Value>"

"Seat": "<Value>"

"Road": "<Value>"

"Road Branch": "<Value>"

"Road Post Modifier": "<Value>"

},

"Status": 2000

}

Failure Response:

Page 48: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 48

{

Status: “5000”

}

Applicable return

codes

2000, 5000

Page 49: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 49

Management.ExportConfiguration

Description REST Server within the phone receives a POST request with the URL in the data,

and then exports the requested configuration to the provided URL.

Protocol and Method Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/mgmt/config/export

Input and Output

Syntax

JSON

Access Level Admin

Input {

"data":

{

“Url”: "<Absolute URL>”

“ConfigType”:”<ConfigFiles|Local|Web|Device|All>”

}

}

URL: Mandatory parameter

ConfigType: Mandatory parameter

Output Response:

{

"Status": “2000”,

}

Failed Response:

{

“Status”: “<4xxx/5xxx>”

}

Configuration would be sent to provided URL. In case of ConfigType “All”, all the

configuration would be uploaded except device. For device configuration, separate

API has to be executed with ConfigType as “Device”.

Applicable return

codes

2000, 5000

Page 50: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 50

Management.SessionStats

Description This API provides statistics of active media sessions on phone.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path:

/api/v1/mgmt/media/sessionStats

Input and Output

Syntax

JSON

Access Level Admin

Input None

Output Success Response:

{

"data": [

{

"Ref": "<SESSION_REFERENCE>",

"SRTPCall": "<True/False>",

"H235Call": "<True/False>",

"H235DHKey": "<H235_SHARED_SECRET_KEY>"

"Streams": [

{

"Ref": "<AUDIO_STREAM_REFERENCE>",

"Category": "0:Voice",

"PacketsReceived": "<RECEIVED_PACKETS>",

"PacketsSent": "<SENT_PACKETS>",

"OctetsReceived": "<RECEIVED_OCTETS>",

"OctetsSent": "<SENT_OCTETS>",

"PacketsExpected": "<EXPECTED_PACKETS>",

"PacketsLost": "<LOST_RX_PACKETS>",

"Jitter": "<RX_JITTER>",

"MaxJitter": "<MAX_JITTER>",

"Latency": "<LATENCY>",

"RxPayloadSize": "<RX_PAYLOAD_SIZE>",

"TxPayloadSize": "<TX_PAYLOAD_SIZE>",

"RxCodec": "<RX_CODEC>",

"TxCodec": "<TX_CODEC>",

"RxMOSCQ":

"<REMOTE_CONVERSATIONAL_QUALITY_MOS_SCORE>",

"TxMOSCQ":

"<LOCAL_CONVERSATIONAL_QUALITY_MOS_SCORE>",

"RxMOSLQ": "<REMOTE_LISTENING_QUALITY_MOS_SCORE>"

"TxMOSLQ": "<LOCAL_LISTENING_QUALITY_MOS_SCORE>",

},

{

{

"Ref": "<VIDEO_STREAM_REFERENCE>",

"Category": "1:Video",

"PacketsReceived": "<RECEIVED_PACKETS>",

Page 51: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 51

"PacketsSent": "<SENT_PACKETS>",

"OctetsReceived": "<RECEIVED_OCTETS>",

"OctetsSent": "<SENT_OCTETS>",

"PacketsExpected": "<EXPECTED_PACKETS>",

"PacketsLost": "<LOST_RX_PACKETS>",

"Jitter": "<RX_JITTER>",

"MaxJitter": "<MAX_JITTER>",

"Latency": "<LATENCY>",

"RxPayloadSize": "v",

"TxPayloadSize": "v",

"RxCodec": "<RX_CODEC>",

"TxCodec": "<TX_CODEC>",

"VideoRxFramerate": "<VIDEO_RX_FRAMERATE>",

"VideoRxFrameWidth": "<VIDEO_RX_FRAMEWIDTH>",

"VideoRxFrameHeight": "<VIDEO_RX_FRAMEHEIGHT>",

"VideoRxFastUpdateReqCnt":

<VIDEO_RX_FAST_UPDATE_REQUEST_COUNT>",

"VideoRxActBitrateKbps": "<VIDEO_ACTUAL_BITRATE>",

"VideoTxFramerate": "<VIDEO_TX_FRAMERATE>",

"VideoTxFrameWidth": "<VIDEO_TX_FRAMEWIDTH>",

"VideoTxFrameHeight": "<VIDEO_TX_FRAMEHEIGHT>",

"VideoTxConfigBitrateKbps": "<VIDEO_CONFIGURED_BITRATE>",

"VideoTxFastUpdateReqCnt":

<VIDEO_RX_FAST_UPDATE_REQUEST_COUNT>",

"VideoTxActBitrateKbps": "<VIDEO_RX_FRAMERATE>",

}

]

},

...

],

“Status”: “2000”

}

Failure Response:

{

“Status”: “5000”

}

Applicable return

codes

2000, 5000

Page 52: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 52

Management.CallStatus

Description This API provides all the information of calls on the phone.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path:/api/v1/webCallControl/callStatus

Input and Output

Syntax

JSON

Access Level Admin

Input None

Output Success Response:

{

“Status”: “2000“,

“data”:

{

“CallHandle”: “<9577dd30>”,

“Type”: “<Incoming >”,

“Protocol”: “<SIP >”,

“CallState”: “<Connected >”,

“LineID”: “<1>”,

“RemotePartyName”: “<3339941432>”,

“RemotePartyNumber”: “sip:[email protected]”,

“DurationInSeconds”: “<7>”

}

}

Failure Response:

{

“Status": “<4xxx/5xxx>”

}

Applicable return

codes

2000, 4007,5000

Page 53: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 53

Management.LineInfo

Description This API provides details about the phone’s line information.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path:/api/v1/mgmt/lineInfo

Input and Output

Syntax

JSON

Access Level Admin

Input None

Output Success Response:

{

"Status": “2000”,

"data": [

{

"LineNumber": "<LINE_NUMBER>",

"Protocol": "<SIP/H323>",

"SIPAddress": "<SIP_ADDRESS>",

"ProxyAddress": "<PROXY_ADDRESS>",

"UserID": "<USER_ID>",

"Label": "<LABEL>",

"LineType": "<Shared/Private>",

"RegistrationStatus": "<Registered/Unregistered>",

"Port": "<PORT>"

},

{

"LineNumber": "<LINE_NUMBER>",

"Protocol": "<SIP/H323>",

"SIPAddress": "<SIP_ADDRESS>",

"ProxyAddress": "<PROXY_ADDRESS>",

"AutoDiscovery": "<Enabled/Disabled>"

"UserID": "<USER_ID>",

"Label": "<LABEL>",

"LineType": "<Shared/Private>",

"RegistrationStatus": "<Registered/Unregistered>",

"Port": "<PORT>"

},

...

...

...

]

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Page 54: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 54

Applicable return

codes

2000, 5000

Page 55: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 55

Management.LineInfo Version 2

Description This API provides details about the phone’s line information.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path: /api/v2/mgmt/lineInfo

Input Syntax Query parameters

Output Syntax JSON

Access Level Admin

Input

The following query parameters are accepted: line=<1> Example queries: <PHONE_IP>/api/v2/ mgmt/lineInfo?line=1

Output Success Response:

{

"data": [

{

"ID": "<LINE_NUMBER>",

"Label": "<LABEL>",

"Username": "<USERNAME>",

"Assigned": "<True/False>",

"RegistrationStatus": "<Registered/Unregistered>",

"Type": "<Private/Shared>",

"Active": "<True/False>",

"DoNotDisturb": "<True/False>",

"CallAppearances": [

"<CALL_REFRENCE>",

"<CALL_REFRENCE>",

...

],

"CallServers": [

{

"ID": "<SERVER_INDEX>",

"Address": "<SERVER_ADDRESS>",

"RegistrationStatus": "<Registered/Unregistered>",

"Port": "<SERVER_PORT>",

"Expires": "<REGISTRATION_PERIOD>",

"Transport": "<DNSnaptr/TcpPreferred/TcpOnly/UdpOnly/TLS/Invalid>"

"Working": "<True/False>"

}

],

"ForwardingConfig": {

"Always": "<CONTACT_NUMBER>",

"DoNotDisturb": "<CONTACT_NUMBER>",

"Busy": "<CONTACT_NUMBER>",

"NoAnswer": "<CONTACT_NUMBER>"

},

Page 56: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 56

}

],

"Status": "2000"

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return

codes

2000, 5000

Page 57: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 57

Management.UpdateConfiguration

Description This API allows the user to sync phone’s configuration with the provisioning server.

Protocol and

Method

Protocol: HTTP/HTTPS

Method: POST

Path: /api/v1/mgmt/updateConfiguration

Input and Output

Syntax

JSON

Access Level Admin

Input None

Output Success Response:

{

"Status": “2000”,

"data": {

"ProvisioningState": "<Provisioning status code>"

}

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return

codes

2000, 4001, 4400, 4403, 5000, 5500

Page 58: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 58

Management.SimulateTextInput

Description This API allows the user to input text into text fields in phone UI.

Protocol and

Method

Protocol: HTTP/HTTPS

Method: POST

Path:/api/v1/mgmt/simulateTextInput

Input and Output

Syntax

JSON

Access Level Admin

Input {

"data":

{

"Value": "<Input text >",

“ReplaceText”: “<true/false>”

}

}

ReplaceText is optional. If set to true, it replaces any existing text in phone UI’s text field

with the value provided.

Output Success Response:

{

"Status": “2000”,

}

Failure Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return

codes

2000, 4000, 4400, 4403, 5000, 5500

Page 59: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 59

Management.SimulateKeyEvent

Description This API allows the user to simulate a tap event on phone UI.

Protocol and

Method

Protocol: HTTP/HTTPS

Method: POST

Path:/api/v1/mgmt/simulateKeyEvent

Input and Output

Syntax

JSON

Access Level Admin

Input {

"data":

{

"Type": "Tap ",

“KeyName”: “<Key Label>”

}

}

Accepted values for <Key Label>:

• MicMute

• VolDown

• VolUp

Output Success Response:

{

"Status": “2000”,

}

Failure Response:

{

“Status”: “4000”

}

Applicable return

codes

2000, 4000, 4400, 4403, 5000, 5500

Page 60: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 60

Management.SimulateHook

Description This API allows the user to simulate off/on hook on phone.

Protocol and

Method

Protocol: HTTP/HTTPS

Method: POST

Path:/api/v1/mgmt/simulateHook

Input and Output

Syntax

JSON

Access Level Admin

Input {

"data":

{

"Type": "<Up/Down >"

}

}

Type is a mandatory parameter.

Output Success Response:

{

"Status": “2000”

}

Failure Response:

{

“Status”: “4000”

}

Applicable return

codes

2000, 4000, 4400, 4403, 5000, 5500

Page 61: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 61

WebCallControl.CallStatus Version 2

Description This API provides information about all the calls present on phone.

Protocol, Method &

Path

Protocol: HTTP/HTTPS

Method: GET

Path: /api/v2/webCallControl/callStatus

Output Syntax JSON

Access Level Admin

Input The following query parameters are accepted:

handle=<9577dd30>

line=<1>

sequence=<1>

API accepts only:

* handle or

* line or

* line and sequence

Example queries:

<PHONE_IP>/api/v2/webCallControl/callStatus

<PHONE_IP>/api/v2/webCallControl/callStatus?handle=b5576ff8

<PHONE_IP>/api/v2webCallControl/callStatus?line=1

<PHONE_IP>/api/v2/webCallControl/callStatus?line=1&sequence=1

Output {

"Status": “2000”,

"data": [

{

"CallHandle": "b5576ff8",

"Type": "Incoming",

"RemotePartyName": "Test 1171",

"RemotePartyNumber": "1171",

"CallState": "Connected",

"Protocol": "SIP",

"StartTime": "2017-08-24T12:07:49",

"DurationSeconds": "25",

"LineID": "1",

"CallSequence": "1",

"UIAppearanceIndex": "1*"

"Ringing": "0",

"Muted": "0",

"RTPPort": "2262",

"RTCPPort": "2263",

},

{

"CallHandle": "8901078",

"RemotePartyNumber": "",

"Type": "Outgoing",

"UIAppearanceIndex": "0",

Page 62: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 62

"CallState": "Connected",

"Ringing": "0",

"Muted": "0",

"CallSequence": "1",

"RemotePartyName": "",

"RTCPPort": "2227",

"Protocol": "PTT",

"DurationInSeconds": "2",

"RTPPort": "2226",

"StartTime": "2017-08-24T11:56:33",

"LineID": "0",

"Channel": {

"Mode": "Ptt",

"Number": "1",

"Label": "Channel",

“State”: “WAITING”

}

}

]

}

Failed Response:

{

“Status”: “<4xxx/5xxx>”

}

Applicable return

codes

2000, 4000, 4007, 5000

Note During an active call, a "*" will be appended to UIAppearanceIndex number.

The following case is applicable for Paging/PTT calls:

• Channel object will be present only if it's a Paging/PTT call.

Page 63: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 63

Management.DeviceInfo Version 2

Description This API provides general device information.

Protocol and Method Protocol: HTTP/HTTPS

Method: GET

Path:

/api/v2/mgmt/device/info

Input and Output

Syntax

JSON

Access Level Admin

Input None

Output Success Response:

{

"data": {

"ModelNumber": "<PHONE_MODEL>",

"DeviceVendor": "Poly",

"DeviceType": "HardwareEndpoint",

"MACAddress": "<MAC_ADDRESS>",

"Firmware": {

"Application": "<APPLICATION_VERSION>",

"Updater": "<UPDATER_VERSION>",

"BootBlock": "<BOOTBLOCK_VERSION>"

},

"IPAddress": "<PHONE_IP_ADDRESS>",

"IPStack": "IPv4 Only/IPv6 Only/(Dual IPv4/IPv6 stack)",

"PreferredNetwork": "<IPv4/IPv6>",

"IPv6Address": "<PHONE_IPV6_ADDRESS>",

"IPv6LinkAddress": "<LINK_LOCAL_IPV6_ADDRESS>",

"IPv6ULAAddress": "<UNIQUE_LOCAL_IPV6_ADDRESS>",

"UpTime": {

"Days": "<NUMBER>"

"Hours": "<NUMBER>",

"Minutes": "<NUMBER>",

"Seconds": "<NUMBER>",

},

"AttachedHardware": {

"Camera": "<True/False>"

"EM": [

"Type": "<Paper/LCD>"

"Version": "<EM_VERSION>"

]

},

"CanApplyShutdownRequest": "<True/False>",

"IntendToShutdown": "<True/False>",

"AppState": "<PHONE_STATE>",

"ReadyToUse": "<True/False>"

},

"Status": "2000"

}

Page 64: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 64

Failure Response:

{

“Status”: “5000”

}

Applicable return

codes

2000, 5000

Page 65: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 65

Diagnostics

This section describes REST API error codes and logging information.

Error Codes

Error Code and Descriptions

Error Code Number Code Description

Success 2000 API executed successfully.

Failed 4000 Invalid input parameters.

4001 Device busy.

4002 Line not registered.

4003 Operation not allowed.

4004 Operation Not Supported

4005 Line does not exist.

4006 URLs not configured.

4007 Call Does Not Exist

4008 Configuration Export Failed

4009 Input Size Limit Exceeded

4010 Default Password Not Allowed

5000 Failed to process request.

Page 66: Polycom UC Software 5.9€¦ · Rest API Commands Poly, Inc. 7 Commands and Structure Management.Restart Description This API executes a safeReboot on the phone. safeReboot ensures

Rest API Commands

Poly, Inc. 66

Logging

The following table provides examples of the type of logging available at each level.

Log Levels

Level Description

0 Debug

1 Detailed events

2 Flow events

3 High-level flow events

4 Minor, recoverable events

5 Major, eventually fatal errors

6 Immediately fatal events