List Incidents Associated with a Resource
This use case describes the requirements for listing incidents associated with players or edge servers using Broadsign Control API via REST.
Note: The ID#s we use in these samples are for illustration purposes. They are invalid. Be sure to use your own ID#s for your integrations. Also, in our examples, we use the api-sandbox endpoint and HTTP token.
Depending on your use case, use one of the following methods:
- To list the details of incidents associated with several players or edge servers, use GET and the /incident/v3/by_id method.
- To list the details of incidents associated with a specific player or edge server, whose ID#s you supply as a request parameter, use GET and the /incident/v3 method.
To list the details of incidents associated with several players or edge servers, you will need to provide a comma-delimited list of their ID#s.
curl -X GET
'https://api-sandbox.broadsign.com:10889/rest/incident/v3/by_id?not_modified_since=2017-05-05&domain_id=123456789&ids=13501,14501'
-H 'authorization: Bearer YourAPIKeyHere'
-H 'cache-control: no-cache'
{
"not_modified_since": "2017-10-27T19:43:34Z",
"incident": [
{
"critical_escalation_tm_utc": "",
"domain_id": 123456789,
"escalation_status": 1,
"id": 991,
"last_status_code_change_utc": "2017-10-27T18:41:31",
"occurred_on": "2017-10-27T18:41:31",
"problem_description": "Has not polled since 10/26/17 2:33 PM (UTC).",
"reported_on": "2017-10-27T18:41:31",
"resolved_description": "",
"resolved_on": "",
"resource_id": 13501,
"status_code": 3,
"target_resource_id": 13501,
"type_code": 204,
"warning_escalation_tm_utc": ""
},
{
"critical_escalation_tm_utc": "",
"domain_id": 123456789,
"escalation_status": 1,
"id": 981,
"last_status_code_change_utc": "2017-10-26T14:33:37",
"occurred_on": "2017-10-26T14:33:26",
"problem_description": "Full screen off.",
"reported_on": "2017-10-26T14:33:37",
"resolved_description": "",
"resolved_on": "",
"resource_id": 14501,
"status_code": 4,
"target_resource_id": 0,
"type_code": 3,
"warning_escalation_tm_utc": ""
}
]
}
To list the details of incidents associated with a specific player or edge server, you will need to provide its unique ID# in the parameter resource_id.
curl -X GET
'https://api-sandbox.broadsign.com:10889/rest/incident/v3?not_modified_since=2017-05-05&domain_id=123456789&resource_id=13501'
-H 'authorization: Bearer YourAPIKeyHere'
-H 'cache-control: no-cache'
{
"not_modified_since": "2017-10-27T19:43:34Z",
"incident": [
{
"critical_escalation_tm_utc": "",
"domain_id": 123456789,
"escalation_status": 1,
"id": 991,
"last_status_code_change_utc": "2017-10-27T18:41:31",
"occurred_on": "2017-10-27T18:41:31",
"problem_description": "Has not polled since 10/26/17 2:33 PM (UTC).",
"reported_on": "2017-10-27T18:41:31",
"resolved_description": "",
"resolved_on": "",
"resource_id": 13501,
"status_code": 3,
"target_resource_id": 13501,
"type_code": 204,
"warning_escalation_tm_utc": ""
}
]
}