Suspension Status¶
The Suspension status feature is based on the usage of the provisioning templates of category group_intercept with default_values mechanism (for further information, see Create Provisioning Template).
The default values definition come from the Group Intercept Update configuration API.
The PUT API will configure that Group Intercept feature of each Groups with these values.
It must be noted that as the Suspension status is based on template name, its name is stored in the APIO DB (Tenant Data object),not in the AS.
Configuration Information for Tenant Suspension Status¶
The APIO behaviour at Tenant level is controlled by the following settings:
"SUSPENSION_STATUS": {
"ENABLED": True
}
Display tenant’s suspension status¶
-
GET
/api/v1/tenants/
(string: tenant_id)/properties/suspension/
¶ Retrieve the settings of the Suspension Status of a Tenant.
Authorization rights: minimum Tenant Admin.
Example request:
GET /api/v1/tenants/foo/properties/suspension/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "suspensionStatus": "bad_payer" }
- Response JSON Object:
suspensionStatus (string) – the name of the suspension status to be set. Empty string for not suspended status.
- Status Codes:
200 OK – no error
404 Not Found – the suspension status feature is not enabled by setting
Update a tenant’s suspension status¶
-
PUT
/api/v1/tenants/
(string: tenant_id)/properties/suspension/
¶ Update the settings of the Suspension Status of a Tenant.
It will update the suspension status of all the Groups of this Tenant to this new value. Whatever their previous value was.
Authorization rights: minimum System Admin.
Example request:
PUT /api/v1/tenants/foo/properties/suspension/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "suspensionStatus": "bad_payer" }
- Request JSON Object:
suspensionStatus (string) – the name of the suspension status to be set. Empty string for not suspended status.
Example response:
- Response:
Similar to GET instance method response.
Example response with partial errors:
HTTP/1.1 207 OK Content-Type: "application/json" { "suspensionStatus": "bad_payer", "result": [ { "groupId": "ApioGrpTest", "status": "success" }, { "groupId": "ApioGrp2Test", "status": "failed", "reason": "Service is not assigned to this subscriber: Intercept Group" } ] }
- Response JSON Object:
result (array) – (conditional) a list of the error statuses. See Tenant Suspension Status Partial Success List Entry.
- Status Codes:
200 OK – no errors
207 Multi Status – partial errors: the suspension status cannot be applied to some Groups
400 Bad Request – full error: the suspension status cannot be applied to all Groups
404 Not Found – the suspension status template does not exist or the feature is not enabled by setting
Tenant Suspension Status Partial Success List Entry¶
Name |
Type |
Method |
Description |
---|---|---|---|
PUT |
|||
groupId |
String |
A |
The unique Group Id. |
status |
String |
A |
The status: success or failed. |
reason |
String |
C |
The reason of the error. |