Priority Alert¶
Display users’s list of criteria¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/priority_alert/
¶ Retrieve the list of priority alert criteria of the user.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/users/foouser/services/priority_alert/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "criteria": [ { "active": true, "name": "test_criteria_1", "timeSchedule": "APIO Test Time Schedule(Group)", "callsFrom": "All External Calls", "doNotPerformAction": false, "holidaySchedule": "None", "fromDnCriteria": { "selection": "Specified Only", "includeAnonymousCallers": true, "includeUnavailableCallers": true, "phoneNumbers": [ "+32123456790", "+32123456791" ] } }, { "active": true, "name": "test_criteria_2", "timeSchedule": "APIO Test Time Schedule(Group)", "callsFrom": "All External Calls", "doNotPerformAction": false, "holidaySchedule": "Every Easter", "fromDnCriteria": { "selection": "Any External", "includeAnonymousCallers": false, "includeUnavailableCallers": false, "phoneNumbers": [] } } ] }
- Response JSON Object:
criteria (array) – a list of criteria objects as defined as Criteria in list.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
Update a user’s priority alert criteria list¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/
(string: user_id)/services/priority_alert/
¶ Update a user’s priority alert criteria list. This API alows to create/modify/delete several criteria at one time.
Example request:
PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/services/priority_alert/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "criteria": [ { "name": "test_criteria_1", "active": true }, { "name": "test_criteria_2", "active": false, "doNotPerformAction": false, "fromDnCriteria": { "selection": "Any External", "includeAnonymousCallers": false, "includeUnavailableCallers": false, "phoneNumbers": [] } }, { "name": "test_criteria_3", "delete": true } ] }
- Request JSON Object:
criteria (array) –
a list of criteria objects. Ech object defining the operation to be done on a criteria
If the criteria does not exist yet, it will be created and the object is defined as in the request of Add a user’s priority alert criteria.
If the criteria already exists, it will be updated and the object is defined as in the request of Modify attributes of a criteria, except if the flag “delete”:true is present.
-if the object contains the “name” field and the “delete” field set to true, then it will delerte the criteria
Example response:
HTTP/1.1 200 OK
- Status Codes:
200 OK – no error
400 Bad Request – bad request
404 Not Found – the service is not assigned to the user
Add a user’s priority alert criteria¶
-
POST
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/foouser/services/priority_alert/criteria/
¶ Add a user’s priority alert criteria.
Example request:
POST /api/v1/tenants/foo/groups/foogroup/users/foouser/services/priority_alert/criteria/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "active": "true", "name": "test_criteria_3", "timeSchedule": { "level": "Group", "name": "APIO Test Time Schedule" }, "holidaySchedule": { "level": "User", "name": "APIO Test Holiday Schedule" }, "doNotPerformAction": false, "fromDnCriteria": { "selection": "Specified Only", "includeAnonymousCallers": true, "includeUnavailableCallers": true, "phoneNumbers": [ "+32123456790", "+32123456791" ] } }
- Request JSON Object:
active (boolean) – the status of the criteria.
name (string) – the name of the criteria.
timeSchedule (object) – (Optional) an object as defined as Schedule attributes.
holidaySchedule (object) – (Optional) an object as defined as Schedule attributes.
doNotPerformAction (boolean) – a boolean flag to indicate to not preform the priority alerting. It allows to define a global rule with one criteria and then some exceptions with additional criteria having this flag enabled.
fromDnCriteria (object) – an object as defined as Criteria From DN attributes.
Example response:
HTTP/1.1 201 CREATED
- Status Codes:
201 Created – no error
400 Bad Request – invalid data
404 Not Found – the service is not assigned to the user
Get informations of a single criteria¶
-
GET
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/foouser/services/priority_alert/criteria/
(string: instance_name)/
¶ Get informations of a single criteria.
Example request:
GET /api/v1/tenants/foo/groups/foogroup/users/foouser/services/priority_alert/criteria/fooCriteria/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "name": "test_criteria_2", "timeSchedule": { "level": "Group", "name": "APIO Test Time Schedule", "type": "Time" }, "holidaySchedule": { "level": "Group", "name": "APIO Test Holiday Schedule", "type": "Holiday" }, "doNotPerformAction": false, "fromDnCriteria": { "selection": "Any External", "includeAnonymousCallers": false, "includeUnavailableCallers": false, "phoneNumbers": [] }, "active": true }
- Response JSON Object:
name (string) – the name of the criteria.
timeSchedule (object) – an object as defined as Schedule attributes.
holidaySchedule (object) – an object as defined as Schedule attributes.
doNotPerformAction (boolean) – a boolean flag indicating that the priority alerting will not be applied. It allows to define a global rule with one criteria and then some exceptions with additional criteria having this flag enabled.
fromDnCriteria (object) – an object as defined as Criteria From DN attributes.
active (boolean) – the status of the criteria.
- Status Codes:
200 OK – no error
404 Not Found – the service is not assigned to the user
Modify attributes of a criteria¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/foouser/services/priority_alert/criteria/
(string: instance_name)/
¶ Modify the attributes of a criteria.
Example request:
PUT /api/v1/tenants/footenant/groups/foogroup/users/foouser/services/priority_alert/criteria/fooCriteria/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "active": true, "newName": "test_criteria_4", "timeSchedule": { "level": "Group", "name": "APIO Test Time Schedule" }, "doNotPerformAction": false, "fromDnCriteria": { "selection": "Any External", "includeAnonymousCallers": false, "includeUnavailableCallers": false, "phoneNumbers": [ "+32123456790", "+32123456791" ] } }
- Request JSON Object:
active (boolean) – (Optional) the status of the criteria.
newName (string) – (Optional) the name of the criteria.
timeSchedule (object) – (Optional) an object as defined as Schedule attributes. An empty object will delete the actual schedule.
holidaySchedule (object) – (Optional) an object as defined as Schedule attributes. An empty object will delete the actual schedule.
doNotPerformAction (boolean) – (Optional) a boolean flag to indicate to not preform the priority alerting. It allows to define a global rule with one criteria and then some exceptions with additional criteria having this flag enabled.
fromDnCriteria (object) – (Optional) an object as defined as Criteria From DN attributes.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error
400 Bad Request – bad request
404 Not Found – the service is not assigned to the user
Remove a criteria¶
-
DELETE
/api/v1/tenants/
(string: tenant_id)/groups/
(string: group_id)/users/foouser/services/priority_alert/criteria/
(string: instance_name)/
¶ Remove a single criteria.
Example request:
DELETE /api/v1/tenants/foo/groups/foogroup/users/foouser/services/priority_alert/criteria/fooCriteria/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – no error