User Services¶
Display user’s services¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/
¶ Retrieve the settings of the assigned user service.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/users/foouser/services/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "assignementStatus": true, "summary": true }
- Response JSON Object:
assignementStatus (boolean) – retrieve assignment status.
summary (boolean) – retrieve summary.
Example response:
HTTP/1.1 200 OK { "summary": { "userServices": [ {"active": false, "name": "Call Forwarding Not Reachable"} ], "groupService": [] }, "assignementStatus": { "services": [ {"assigned": false, "name": "Call Forwarding Busy"}, {"assigned": false, "name": "Busy Lamp Field"}, {"assigned": true, "name": "Call Forwarding Not Reachable"}, {"assigned": false, "name": "Call Forwarding Always"}, {"assigned": false, "name": "Do Not Disturb"} ], "servicePacks": [ {"assigned": false, "name": "Basic_CLI"} ] } }
- Response JSON Object:
summary (object) – an object as defined in Services Summary attributes.
assignementStatus (object) – an object as defined in Services Assignment Status attributes.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
Add a user’s services¶
-
POST
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/
¶ Add the settings of the assigned user service.
Example request:
POST /api/v1/tenants/foo/groups/foogroup/users/foouser/services/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "services": [ { "name": "Call Forwarding Busy" } ] }
- Request JSON Object:
services (array) – a list of services objects as defined in Service Assignment Status attributes.
servicePacks (array) – a list of service packs objects as defined in Service Assignment Status attributes.
Example response:
- Response:
Similar to GET list method response.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
400 Bad Request – error during the update
Delete user services¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/
¶ Remove the settings of the assigned user service.
Example request:
DELETE /api/v1/tenants/foo/groups/foogroup/users/foouser/services/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "services": [ { "name": "Call Forwarding Busy" } ] }
- Request JSON Object:
services (array) – a list of services objects as defined in Service Assignment Status attributes.
servicePacks (array) – a list of service packs objects as defined in Service Assignment Status attributes.
Example response:
HTTP/1.1 200 OK {}
- Status Codes:
200 OK – no error
404 Not Found – the service cannot be unassigned