Access Device Management¶
Retrieve Access Device list¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/access_devices/
¶ Retrieve the access devices list.
Authorization rights: minimum Group Admin.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/access_devices/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "access_devices": [ { "status": "Online", "deviceName": "APIO Test Device", "version": "", "macAddress": "221100CCBBAA", "netAddress": "", "freePorts": 99999, "deviceType": "Generic SIP Phone" }, { "status": "Online", "deviceName": "DP_ApioUserTest", "version": "pjsip python", "macAddress": "", "netAddress": "", "freePorts": 99999, "deviceType": "Generic SIP Phone" } ] }
- Response JSON Object:
access_devices (array) – a list of access devices. See Access Device list item.
- Status Codes:
200 OK – no error
Retrieve Access Device details¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/access_devices/
(string: instance_name)/
¶ Retrieve the access device details.
Authorization rights: minimum Group Admin.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/access_devices/APIO%20Test%20Device%20New/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "configurationFileName": "", "macAddress": "332211CCBBAA", "useCustomUserNamePassword": false, "protocol": "SIP 2.0", "stunServerNetAddress": "", "numberOfAssignedPorts": 0, "netAddress": "", "version": "", "deviceType": "Generic SIP Phone", "outboundProxyServerNetAddress": "", "status": "Online", "numberOfPorts": -1, "description": "APIO Test Device New", "userName": "", "physicalLocation": "", "transportProtocol": "Unspecified", "serialNumber": "", }
- Response JSON Object:
deviceName (string) – See deviceName from Access Device attributes.
deviceType (string) – See deviceType from Access Device attributes.
protocol (string) – See protocol from Access Device attributes.
netAddress (string) – See netAddress from Access Device attributes.
netPort (integer) – See netPort from Access Device attributes.
outboundProxyServerNetAddress (string) – See outboundProxyServerNetAddress from Access Device attributes.
stunServerNetAddress (string) – See stunServerNetAddress from Access Device attributes.
macAddress (string) – See macAddress from Access Device attributes.
serialNumber (string) – See serialNumber from Access Device attributes.
description (string) – See description from Access Device attributes.
numberOfPorts (integer) – See numberOfPorts from Access Device attributes.
numberOfAssignedPorts (integer) – See numberOfAssignedPorts from Access Device attributes.
status (string) – See status from Access Device attributes.
physicalLocation (string) – See physicalLocation from Access Device attributes.
transportProtocol (string) – See transportProtocol from Access Device attributes.
useCustomUserNamePassword (string) – See useCustomUserNamePassword from Access Device attributes.
userName (string) – See userName from Access Device attributes.
version (string) – See version from Access Device attributes.
- Status Codes:
200 OK – no error
Create an access device¶
-
POST
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/access_devices/
¶ Create a new access device..
Authorization rights: minimum Group Admin.
Example request:
POST /api/v1/tenants/foo/groups/foogroup/access_devices/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "deviceName": "APIO Test Device", "deviceType": "Generic SIP Phone", "protocol": "SIP 2.0", "macAddress": "221100CCBBAA", "description": "APIO Test Device", "transportProtocol": "Unspecified", "useCustomUserNamePassword": false }
- Request JSON Object:
deviceName (string) – See deviceName from Access Device attributes.
deviceType (string) – See deviceType from Access Device attributes.
protocol (string) – See protocol from Access Device attributes.
netAddress (string) – See netAddress from Access Device attributes.
netPort (integer) – See netPort from Access Device attributes.
outboundProxyServerNetAddress (string) – See outboundProxyServerNetAddress from Access Device attributes.
stunServerNetAddress (string) – See stunServerNetAddress from Access Device attributes.
macAddress (string) – See macAddress from Access Device attributes.
serialNumber (string) – See serialNumber from Access Device attributes.
description (string) – See description from Access Device attributes.
physicalLocation (string) – See physicalLocation from Access Device attributes.
transportProtocol (string) – See transportProtocol from Access Device attributes.
useCustomUserNamePassword (string) – See useCustomUserNamePassword from Access Device attributes.
accessDeviceCredentials (string) – See accessDeviceCredentials from Access Device attributes.
Example response:
- Response:
Similar to GET list method response. Should be the instance!
- Status Codes:
200 OK – no error
Update an access device¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/access_devices/
(string: instance_name)/
¶ Update the access device settings.
Authorization rights: minimum Group Admin.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/access_devices/APIO%20Test%20Device%20New/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "macAddress": "110022BBAACC", "description": "APIO Test Device Modified" }
- Request JSON Object:
protocol (string) – See protocol from Access Device attributes.
netAddress (string) – See netAddress from Access Device attributes.
netPort (integer) – See netPort from Access Device attributes.
outboundProxyServerNetAddress (string) – See outboundProxyServerNetAddress from Access Device attributes.
stunServerNetAddress (string) – See stunServerNetAddress from Access Device attributes.
macAddress (string) – See macAddress from Access Device attributes.
serialNumber (string) – See serialNumber from Access Device attributes.
description (string) – See description from Access Device attributes.
physicalLocation (string) – See physicalLocation from Access Device attributes.
transportProtocol (string) – See transportProtocol from Access Device attributes.
useCustomUserNamePassword (string) – See useCustomUserNamePassword from Access Device attributes.
accessDeviceCredentials (string) – See accessDeviceCredentials from Access Device attributes.
Example response:
- Response:
Similar to GET instance method response.
- Status Codes:
200 OK – no error
Remove an access device¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/access_devices/
(string: instance_name)/
¶ Delete an access device from the Group.
Authorization rights: minimum Group Admin.
Example request:
DELETE /api/v1/tenants/foo/groups/foogroup/access_devices/APIO%20Test%20Device%20New/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK
- Status Codes:
200 OK – no error
Retrieve a group device profile file¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/access_devices/
(string: instance_name)/config_files/
(string: sub_instance_name)/
¶ Retrieve a group device profile file.
Authorization rights: minimum Group Admin.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/access_devices/foodevice/config_files/foofile/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "fileSource": "Default", "configurationFileName": "/var/broadworks/IpDeviceConfig/type/CTYealink-T48G/%BWMACADDRESS%.cfg.template", "accessUrl": "http://10.0.12.78:80/dms/CTYealinkT48G/{%25BWMACADDRESS%25}.cfg", "repositoryUrl": "http://fileadmin:1234567@sfocps.netaxis.be:80/CTYealink-T48G/APIO%20Test%20Device%20Buttons%20(Group%20ApioSpTest-ApioGrpTest).cfg", "templateUrl": "http://device_management:d*2m*$ment@10.0.12.74:80/DeviceManagement/type/CTYealink-T48G/%25BWMACADDRESS%25.cfg.template", "extendedCaptureEnabled": false }
- Response JSON Object:
fileSource (string) – See fileSource from Device file attributes.
configurationFileName (string) – See configurationFileName from Device file attributes.
accessUrl (string) – See accessUrl from Device file attributes.
repositoryUrl (string) – See repositoryUrl from Device file attributes.
templateUrl (string) – See templateUrl from Device file attributes.
extendedCaptureEnabled (boolean) – See extendedCaptureEnabled from Device file attributes.
extendedCaptureURL (string) – See extendedCaptureURL from Device file attributes.
- Status Codes:
200 OK – no error
Update a group device profile file¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/access_devices/
(string: instance_name)/config_files/
(string: sub_instance_name)/
¶ Update a group device profile file.
Authorization rights: minimum Group Admin.
Example request:
POST /api/v1/tenants/foo/groups/foogroup/access_devices/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "fileSource": "Custom", "fileContent": "IyBUZXN0IGNvbmZpZyBmaWxlIGZvciBhY2Nlc3MgZGV2aWNlCg==" }
- Request JSON Object:
fileSource (string) – See fileSource from Device file attributes.
fileContent (optional) (string) – The file to upload, base64 encoded.
extendedCaptureEnabled (boolean) – See extendedCaptureEnabled from Device file attributes.
Example response:
- Response:
Similar to GET list method response. Should be the instance!
- Status Codes:
200 OK – no error
Retrieve a list of device files¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/access_devices/
(string: instance_name)/config_files/
¶ Retrieve a list of device files.
Authorization rights: minimum Group Admin.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/access_devices/foodevice/config_files/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "access_devices": [ { "fileFormat": "%BWMACADDRESS%.cfg", "isAuthenticated": "true", "accessUrl": "http://10.0.12.78:80/dms/CTYealinkT48G/{%25BWMACADDRESS%25}.cfg", "repositoryUrl": "http://fileadmin:1234567@sfocps.netaxis.be:80/CTYealink-T48G/APIO%20Test%20Device%20Buttons%20(Group%20ApioSpTest-ApioGrpTest).cfg", "templateUrl": "http://device_management:d*2m*$ment@10.0.12.74:80/DeviceManagement/type/CTYealink-T48G/%25BWMACADDRESS%25.cfg.template" }, { "fileFormat": "y000000000035.cfg", "isAuthenticated": "true", "accessUrl": "http://10.0.12.78:80/dms/CTYealinkT48G/y000000000035.cfg", "repositoryUrl": "http://fileadmin:1234567@sfocps.netaxis.be:80/CTYealink-T48G/y000000000035-2017.10.13%2017:22:40:940%20CEST.cfg", "templateUrl": "http://device_management:d*2m*$ment@10.0.12.74:80/DeviceManagement/type/CTYealink-T48G/y000000000035.cfg.template" } ] }
- Response JSON Object:
fileFormat (string) – See fileFormat from Device file in list attributes.
isAuthenticated (boolean) – See isAuthenticated from Device file in list attributes.
accessUrl (string) – See accessUrl from Device file in list attributes.
repositoryUrl (string) – See repositoryUrl from Device file in list attributes.
templateUrl (string) – See templateUrl from Device file in list attributes.
- Status Codes:
200 OK – no error
Reboot an access device¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/access_devices/
(string: instance_name)/reboot_phone/
¶ This API will ask the phone to reboot (via the Application Server).
Authorization rights: minimum Group Admin.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/access_devices/foodevice/reboot_phone/ HTTP/1.1 Host: example.com Content-Type: "application/json" {}
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error
404 Not Found – device name not found in system
Retrieve List of Users connected to an Access Device¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/access_devices/
(string: instance_name)/connected_users/
¶ Retrieve the access device connected users list.
Authorization rights: minimum Group Admin.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/access_devices/APIO%20Test%20Device/connected_users/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "connected_users": [{ "linePort": "LP_ApioUserTest1@sip.netaxis.be", "lastName": "Test1", "firstName": "Test1", "phoneNumber": "025126778", "userId": "ApioUserTest1@sip.netaxis.be", "userType": "Normal", "endpointType": "Primary", "order": 1, "primary": false, "extension": "5001", "department": { "tenantId": "ApioSpTest", "groupId": "ApioGrpTest", "departmentName": "test_department_initial", "fullPathName": "test_department_initial" }, "emailAddress": "" }, { "linePort": "LP_ApioUserTest2@sip.netaxis.be", "lastName": "Test2", "firstName": "Test2", "phoneNumber": "", "userId": "ApioUserTest2@sip.netaxis.be", "userType": "Normal", "endpointType": "Primary", "order": 3, "primary": false, "extension": "5002", "emailAddress": "" } ], "noLineReOrdering": false, "staticLineReOrdering": true }
- Response JSON Object:
connected_users (array) – a list of access devices connected users. See User connected to a Device attributes.
noLineReOrdering (boolean) – indicate if the line/port reordering feature is disabled or not. It it is disabled then no PUT is allowed for that particular end point/
staticLineReOrdering (boolean) – indicate if the line/port reorderign feature supports static ordering (gaps allowed) or not.
- Status Codes:
200 OK – no error
Update the port (order) of the Users connected to an Access Device¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/access_devices/
(string: instance_name)/connected_users/
¶ Update the port/line/order of the users connected to a phone. This is mainly usefull for DECT phones and phones with multiple lines
This feature is not supported by all type of phones and when not supported not always in the same way:
Virtual Devices, such as Generic SIP Phones, does not support theis feature
Device with dynamic port ordering allow to specify the order but not have gaps between ports (so 1, 2, 3 is supported but not 1,2 4)
Devices with static port ordering allow to specify the exact port (such as port 1, 2 and 4 used but not the 3).
Authorization rights: minimum Group Admin.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/access_devices/APIO%20Test%20Device/connected_users/ HTTP/1.1 Host: example.com { "connected_users": [{ "linePort": "LP_ApioUserTest1@sip.netaxis.be", "userId": "ApioUserTest1@sip.netaxis.be", "order": 2, }, { "linePort": "LP_ApioUserTest2@sip.netaxis.be", "userId": "ApioUserTest2@sip.netaxis.be", "order": 1, } ] } or { "connected_users": ["LP_ApioUserTest2@sip.netaxis.be", "LP_ApioUserTest1@sip.netaxis.be"] } :<json array connected_users: the re-ordered list of the users connected connected to the access device. It can either be an ordered list of strings (the linePort of the connected user) of a list of objects (As defined in :ref:`access_device_connected_user_list_attributes`). If the **connected_users** is a list of strings, the port/order is the index in the list. If the **connected_users** is a list of objects, the port/order is defined by the **order** attribute of the object
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "connected_users": [{ "linePort": "LP_ApioUserTest1@sip.netaxis.be", "lastName": "Test1", "firstName": "Test1", "phoneNumber": "025126778", "userId": "ApioUserTest1@sip.netaxis.be", "userType": "Normal", "endpointType": "Primary", "order": 2, "primary": false, "extension": "5001", "department": { "tenantId": "ApioSpTest", "groupId": "ApioGrpTest", "departmentName": "test_department_initial", "fullPathName": "test_department_initial" }, "emailAddress": "" }, { "linePort": "LP_ApioUserTest2@sip.netaxis.be", "lastName": "Test2", "firstName": "Test2", "phoneNumber": "", "userId": "ApioUserTest2@sip.netaxis.be", "userType": "Normal", "endpointType": "Primary", "order": 1, "primary": false, "extension": "5002", "emailAddress": "" } ] }
- Response JSON Object:
connected_users (array) – the updated list of the users connected to the access device. See User connected to a Device attributes.
- Status Codes:
200 OK – no error
Impossible to reorder the ports. With, among others, the following specific cases:
56: UNSUPPORTED_OPERATION, “This type of device does not support users reordering”
2: INVALID_PARAMETERS, “Each port (order) can only be present once”
2: INVALID_PARAMETERS, “All connected users must he provided in the PUT, no partial update allowed”
2: INVALID_PARAMETERS, “All linePorts in the new values mmust be present in the old values”
2: INVALID_PARAMETERS, “A port (order) can not be bigger than the maximum number of ports of the device”