Device Types Management at Group level¶
The APIs related to Device Types allow to set common properties or define actions for all the devices of a certain type in the Group.
This is an intermediate layer between the common properties defined for the Device Type at System level and the one defined at the level of the Access Device itself.
Group Device Type Properties¶
The Device Type’s Properties are the equivalent for the Device Types of the additional properties of an Access Device. It is an abstraction mechanism (with data types) on top of the real tags. It is based on properties defined in the Phone Type object of the APIO (not described in this guide).
Retrieve list of Phone Types¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/device_types/
¶ Retrieve the list of Phone Types with some filtering.
Authorization rights: minimum Group Admin.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/device_types/Generic_SIP_Phone/advanced_tags/ HTTP/1.1 Host: example.com
- Request JSON Object:
withGroupPropsFiltering (boolean) – (Optional) If true, returns only the Phone Types with Group Properties defined in the APIO DB are returned. If not present, the default value defined in the settings is used (see below).
withAsFiltering (boolean) – (Optional) If true, returns only the Phone Types with alrerady some devices created at Group level are returned. If not present, the default value defined in the settings is used (see below).
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "disableLedMissed": false, "disableLedVm": true }
- Response JSON Object:
phoneTypes (array) – A list of phone types. See Phone Type Attributes.
- Status Codes:
200 OK – no error
Retrieve list of Properties for a Device Type¶
Retrieve the list of Properties currently configured for a Device Type. It must be noted that only the properties already configured (so with a matching tag defined) will be returned.
Authorization rights: minimum Group Admin.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/device_types/Generic_SIP_Phone/advanced_tags/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "disableLedMissed": false, "disableLedVm": true }
- Response:
The response is not defined at Product level as it will fully depend on what has been configured in the corresponding Phone Type object.
- Status Codes:
200 OK – no error
400 Bad Request – with error code 18 (INVALID_OPERATION) it will means there is no Phone Type object corresponding to the device type requested in the url
Modify some Properties of a Device Type¶
Update some properties of a Device Type. If the property was already defined (the corresponding tags exists) it will be modified. If the property was not yet defined (the corresponding tags does not exist) it will be created.
Authorization rights: minimum Group Admin.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/device_types/Generic_SIP_Phone/advanced_tags/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "disableLedMissed": false }
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "disableLedMissed": false, "disableLedVm": true }
- Request JSON Object:
rebuild_files (boolean) – (Optional) Ask to rebuild, or not, the configuration files of all devices of this type if at least 1 tag is touched. If not present the behaviour will be defined by a global configuration parameter.
reboot_files (boolean) – (Optional) Ask to reboot, or not, all devices of this type if at least 1 tag is touched. If not present the behaviour will be defined by a global configuration parameter.
- Request:
The rest of the content is not defined at Product level as it will fully depend on what has been configured in the corresponding Phone Type object. Note that properties not defined are ignored.
- Response:
The response will contain all the properties currently defined. But its content is not defined at Product level as it will fully depend on what has been configured in the corresponding Phone Type object.
- Status Codes:
200 OK – no error
400 Bad Request – with error code 18 (INVALID_OPERATION) it will means there is no Phone Type object corresponding to the device type requested in the url
Remove some Properties from a Device Type¶
Remove some properties from a Device Type. If the property was already defined (the corresponding tags exists) it will be removed. If the property was not yet defined (the corresponding tags does not exist) it will be ignored.
Authorization rights: minimum Group Admin.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/device_types/Generic_SIP_Phone/advanced_tags/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "properties": ["disableLedMissed"] }
- Request JSON Object:
properties (array) – the list of properties to be removed from the Device Type (the values are not defined by product team but depends on what has been configured)
rebuild_files (boolean) – (Optional) Ask to rebuild, or not, the configuration files of all devices of this type if at least 1 tag is touched. If not present the behaviour will be defined by a global configuration parameter.
reboot_files (boolean) – (Optional) Ask to reboot, or not, all devices of this type if at least 1 tag is touched. If not present the behaviour will be defined by a global configuration parameter.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "disableLedMissed": false, "disableLedVm": true }
- Response:
The response will contain all the properties currently defined (after the delete). But its content is not defined at Product level as it will fully depend on what has been configured in the corresponding Phone Type object.
- Status Codes:
200 OK – no error
400 Bad Request – with error code 18 (INVALID_OPERATION) it will means there is no Phone Type object corresponding to the device type requested in the url
Configuration Information for the actions on all devices¶
For adding, removing, updating some of the properties, it will have an impact on Custom Tags. To be effective almost immediately, it could be needed to ask the AS to rebuild the configuration files and then to ask the phones to download it and reboot.
If this is nis not explicitly asked in the input date to do it or not then a default behavior will be applied.
This default behavior is defined by the following parameters:
"GROUP_DEVICE_TYPES_REBUILD_BY_DEFAULT": false,
"GROUP_DEVICE_TYPES_REBOOT_BY_DEFAULT": false,
- Settings description:
GROUP_DEVICE_TYPES_REBUILD_BY_DEFAULT: By default rebuild configuration files or not. Default is false.
GROUP_DEVICE_TYPES_REBOOT_BY_DEFAULT: By default reboot the devices or not. Default is false.
Configuration Information for the list of phone types¶
When asking to get he plist of phone types at Group level, several filters can be applied. If this is nis not explicitly asked in the input date to do it or not then a default behavior will be applied.
This default behavior is defined by the following parameters:
"GROUP_DEVICE_TYPES_GROUP_PROPS_FILTER": true,
"GROUP_DEVICE_TYPES_AS_FILTER": false,
- Settings description:
GROUP_DEVICE_TYPES_GROUP_PROPS_FILTER: Default value for the filter on Group Properties. Default is true.
GROUP_DEVICE_TYPES_AS_FILTER: Default value for the filter on with existing devices. Default is false.
Actions on all device of a Device Type¶
Reboot all access devices of a device type¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/device_types/
(string: device_type_name)/reboot_phone/
¶ This API will ask all the phones of a certain device type to reboot (via the Application Server).
Authorization rights: minimum Group Admin.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/device_types/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
Rebuild config files of all access devices of a device type¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/device_types/
(string: device_type_name)/rebuild_files/
¶ This API will ask to rebuild the config files of all the phones of a certain device type (via the Application Server).
Authorization rights: minimum Group Admin.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/device_types/foodevice/rebuild_files/ 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