The SIGNL4 REST API is very powerful and allows you for example to use the following functionalities:
- Send alerts to SIGNL4 teams
- Acknowledge, close and annotate alerts
- Set users on-duty and off-duty
- Manage duty schedules
- Manage users
- Manage categories
- And more ...
You can find a detailed description of the SIGNL4 API functions here.
For triggering or sending alerts you have the following options:
1. Trigger an Alert: /v2/alerts
This method triggers an alert directly and without a previous event. It also supports attachments, e.g. images or audio files. In order to use this method you need the team ID, i.e. the ID of the team you want to send the alert to. You can get the team ID by using the method /v2/alerts (Get infos of all teams) without team ID. This will provide you with a list of all teams along with their names and team IDs.
2. Trigger an Event: /v2/events/{teamSecret}
This method is compliant to the SIGNL4 inbound webhook API. You can send any JSON (Content-Type: application/json) or even multi part mime (Content-Type: multipart/form-data) content. The {teamSecret) parameter is your SIGNL4 team secret or integration secret. The method will trigger an event and within SIGNL4 you can handle the event unter Integration -> Distribution Rules in order to trigger an alert.
Sample request:
POST https://connect.signl4.com/api/v2/events/{your-signl4-team-or-integration-secret}
X-S4-Api-Key: {your-signl4-api-key}
Content-Type: application/json
{
"Title": "Test Alert",
"Message": "This is a test.",
"Temperature": "10",
"X-S4-Service": "Temperature",
"X-S4-Location": "52.3984235,13.0544149",
"X-S4-AlertingScenario": "single_ack",
"X-S4-Filtering": false,
"X-S4-ExternalID": "test101",
"X-S4-Status": "",
"X-S4-SourceSystem": "",
"Link": https://www.signl4.com
}
3. Trigger an Event: /v2/events/{teamSecret} via team ID
This is the same as 2. but instead of the team secret / integration secret you use the team ID in the parameter {teamSecret}. This directly sends the alert to the respective team without using any distribution rules. You can get the team ID as described under 1.
Comments
0 comments
Please sign in to leave a comment.