Webhook Notification
Notification sent via a webhook URL
Webhook Notifications
A webhook notification is a way for StatusCast to trigger a script with data to help with advanced alert handling, sent via a URL when an incident is created or updated.
{
"CurrentComponentStatus": [
{
"ComponentId": 456570,
"Status": "Unavailable",
"DateChanged": "2023-03-21T20:33:47"
},
{
"ComponentId": 501142,
"Status": "Unavailable",
"DateChanged": "2023-03-21T20:33:47"
}
],
"PreviousComponentStatus": [
{
"ComponentId": 456570,
"Status": "Unavailable",
"DateChanged": "2023-03-21T20:33:47"
},
{
"ComponentId": 501142,
"Status": "Unavailable",
"DateChanged": "2023-03-21T20:33:47"
}
],
"Id": 417149,
"DateCreated": "2023-03-21T20:34:11.18",
"IncidentType": "ServiceUnavailable",
"Status": "InProgress",
"Title": "The Ring is Missing",
"StartDate": "2023-03-21T20:33:47",
"EndDate": null,
"ShortUrl": null,
"ExternalId": "",
"EstimatedDurationMinutes": null,
"Posts": [
{
"Id": 896335,
"Text": "<p>We need help finding it<br></p>",
"Date": "2023-03-21T20:33:47",
"IsPublished": true,
"PostType": "Informational",
"NewComponentStatus": "Unavailable",
"CustomFieldList": []
}
],
"AffectedComponents": [
{
"ComponentId": 501142,
"ComponentName": "The One Ring",
"IconImageSrc": null,
"DirectlyEffected": true
},
{
"ComponentId": 456570,
"ComponentName": "Three Rings for Elven Lords",
"IconImageSrc": null,
"DirectlyEffected": false
}
],
"CustomFieldList": [],
"Groups": [
131636,
132052,
132063
]
}
Webhook Elements List
Here is a list of the elements and arrays that are included in the webhook:
Elements
Element | Definition | Format | Example |
---|---|---|---|
Id | Incident identifier | Numeric | 417149 |
DateCreated | Date the event was created in StatusCast(not the start date of the event) | yy-mm-ddThh:mm:ss | 2023-03-21T20:34:11.18 |
IncidentType | The type of event that was created; Incident, Informational, or Maintenance | String | "ScheduledMaintenance" "ServiceUnavailable" "Informational" |
Status | Status of the incident. | String | "InProgress" "Closed" "Future" |
Title | The title or subject of the incident. | String | "Performance Degradation Notification" |
AutoGeneratedId | The custom ID if using custom incident IDs. Null if feature is disabled | Numeric | |
StartDate | The date the incident started. | yy-mm-ddThh:mm:ss | "2022-02-16T16:27:28" |
EndDate | The date the incident ended. Value may be NULL if incident is ongoing. | yy-mm-ddThh:mm:ss | "2022-02-17T16:27:28" |
ShortUrl | A shortened URL pointing to the incident details page of the event in question. | String | |
ExternalId | The external identifier of the incident. Used by default when beacons generate incidents from outside resources. | Numeric | 756326 |
EstimatedDurationMinutes | The entered value for estimated time if the event is a maintenance. Will be NULL for non-maintenance events. | Numeric | 30 |
CustomFieldList | List of the custom fields included in the incident. Value may be NULL if incident is ongoing or if custom field values have not been entered. | Array | |
Groups | A list of impacted group names if subscriber has access. May be NULL if no groups are used within an event or account. | Array | [ 131948, 132052] |
Note: all these elements are included in every webhook, but not all my have data depending on the status of the incident.
CurrentComponentStatus/ PreviousComponentStatus - Array
Element | Description | Format | Example |
---|---|---|---|
ComponentId | ID of the service component | Numeric | 456570 |
Status | Status of the component | String | "Unavailable" "DegradedPerformance" "Maintenance" "Informational" "Investigating" "Monitoring" "Identified" |
DateChanged | Date the component status has changed | yy-mm-ddThh:mm:ss | "2023-03-21T20:54:45" |
Posts - Array
Element | Description | Format | Example |
---|---|---|---|
ID | Update Post ID | number | 896335 |
Text | Text of the post | String | "The API is degraded" |
Date | Date of Post | yy-mm-ddThh:mm:ss | "2023-03-21T20:54:45" |
IsPublished | State of Post | boolean | true;false |
PostType | Incident State during Post | String | "Informational" "Investigating" "Monitoring" "Identified" "RootCause" "Closed" |
NewComponentStatus | State of the Service Component | String | "Unavailable" "DegradedPerformance" "Maintenance" "Informational" "Investigating" "Monitoring" "Identified" "Available" |
CustomFieldList | Custom Tags | String |
Affected Components - Array
Element | Description | Format | Example |
---|---|---|---|
ComponentId | ID of the service component | Numeric | 456570 |
ComponentName | Name of Component | String | "Test Server" |
IconImageSrc | URL of image | String | "https://statuscastsaprdeast.blob.core.windows.net/pages/21300" |
DirectlyEffected | How the component has been affected | boolean | true;false |
Webhook Signatures
As an added method of security StatusCast can add a signatures to the header of webhook notifications. This is only available in the Settings > Integrations > Webhook feature and is not accessible to subscribers who subscribed via webhook. To enable this integration click Install on the Webhook card.
![webhook.png 909](https://files.readme.io/0e79871-webhook.png)
Enter your Webhook URL endpoint and select the Use Signature Header box. Your integration will include a Public Key and Private Key. StatusCast follows the HMAC authentication workflow by adding the following header pattern:
"X-StatusCast-Signature" Header in format "{PublicKey}:{Signature}:{Nonce}:{timestamp}"
Using SHA256 your server will need to extract the values (Public Key, Signature, Nonce and Request Time stamp) from the Authorization header to validate its authenticity.
Updated over 1 year ago