Service Licenses¶
List services licenses available¶
-
GET
/api/v1/tenants/
(string: tenant_id)/licenses/
¶ List the services licenses available at tenant level.
Example request:
GET /api/v1/tenants/foo/licenses/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "includeServicePacks": true }
- Request JSON Object:
includeServicePacks (boolean) – (Optional) If true, will include in response available service packs for this tenant
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "servicePacks": [ {"name": "All_Services", "description": "", "maximumAllowed": {"unlimited": false, "maximum": 2}, "allocated": {"unlimited": false, "maximum": 2}, "currentlyAllocated": 0} ], "groupServices": [ {"name": "Account/Authorization Codes", "allocated": {"unlimited": true}, "currentlyAllocated": 2}, {"name": "Auto Attendant", "allocated": {"unlimited": false, "maximum": 10}, "currentlyAllocated": 10}, {"name": "Call Park", "allocated": {"unlimited": false, "maximum": 0}} ], "userServices": [ {"name": "3G/4G Continuity", "allocated": {"unlimited": false, "maximum": 0}}, {"name": "Advice Of Charge", "allocated": {"unlimited": true}, "currentlyAllocated": 17, "packsAllocated": 7} ] }
- Response JSON Object:
servicePacks (array) – A list of service packs available for this tenant. See List available service packs.
groupServices (array) – A list of services available at group level. See Service License Management List Item.
userServices (array) – A list of services available at user level. See Service License Management List Item.
- Status Codes:
200 OK – no error
Note
The combination of the flag unlimited set to false and the attribute maximum set to 0 means that the service is not licensed to this tenant.
Update available services licenses¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/licenses/
¶ Update the services licenses available at tenant level. It is a partial update meaning that the licenses not mentioned in the PUT request will not be modified
Example request:
PUT /api/v1/tenants/foo/licenses/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "groupServices" : [ {"name": "Hunt Group", "allocated": {"unlimited": true}}, {"name": "Call Pickup", "allocated": {"unlimited": false, "maximum": 5}} ], "userServices" : [ {"name": "Call Forwarding Always", "allocated": {"unlimited": true}}, {"name": "Call Forwarding Busy", "allocated": {"unlimited": false, "maximum": 7}}, {"name": "Anonymous Call Rejection", "allocated": {"unlimited": false, "maximum": 0}} ] }
- Request JSON Object:
groupServices (object) – (Optional) A list of services at group level which the licensing information must be changed. See Service License Management List Item.
userServices (object) – (Optional) A list of services at user level for which the licensing information must be changed. See Service License Management List Item.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "userServices": [ {"name": "Call Forwarding Always", "status": "updated"}, {"name": "Call Forwarding Busy", "status": "updated"}, {"name": "Anonymous Call Rejection", "status": "updated"} ], "groupServices": [ {"name": "Hunt Group", "status": "updated"}, {"name": "Call Pickup", "status": "updated"} ] }
- Status Codes:
200 OK – request was processed without error
207 Multi Status – request was processed but with some errors
400 Bad Request – request was processed and fully in error
Note
When the flag unlimited is set to false, the attribute maximum is mandatory.
To remove the licensing on a service, its maximum is set to 0 with a unlimited set to false