To submit an event to SIGNL4, the webhook can be called via an HTTP request.
All details are available in this article.
HTTP characteristics
The following table lists the HTTP support of the webhook.
Feature | Description | Required |
Request methods |
|
yes |
Request URL |
https://connect.signl4.com/webhook/{Secret} Example request URL: |
yes |
Request parameters | Further details about optional query parameters for status mapping can be found here. | no |
Request Header (Content-type) |
Content types supported by the webhook are
You can use multipart/form-data to post not only text, but also media attachments such as images or sound. Further details can be found here. |
yes |
Response Body |
One of the greatest strengths of the webhook is its flexibility. See "Payload schema" for further details. |
no |
Response Code (201) |
The transmitted event was received and processed. The response body contains an event ID that can be used to query further details via the SIGNL4 REST API. Example response body: { |
|
Response Code (400) |
The submitted body is invalid and not in the format specified in the content-type. Example response body: { |
|
Response Code (404) |
Webhook URL is wrong. Example response body: { |
|
Response Code (405) |
The request method used was not POST | |
Response Code (429) |
Too many requests were sent and subsequent requests are blocked for a while. Example response body: { |
Sample request and response
A sample HTTP request / response pair for a successfully triggered event to the webhook is displayed below. The JSON payload in the request body is an example only and does not follow a fixed schema. You can send any JSON you want. The next section describes how the JSON is parsed.
Request
POST https://connect.signl4.com/webhook/g93sdfm2843 HTTP/1.1
Host: connect.signl4.com
Connection: keep-alive
Content-Length: 362
Pragma: no-cache
Cache-Control: no-cache
Content-Type: application/json
{
"Title": "Critical production failure",
"Message": "Check line machine C immediately",
"Severity": "High",
"Business Details": {
"Impact": "Major",
"Scope": "Unlimited"
}
}
HTTP/1.1 201 Created
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Request-Context: appId=cid-v1:d7865de8-ff22-4cec-8b2d-6e39fb5802f7
X-RateLimit-Limit: 150
X-RateLimit-Remaining: 149
X-RateLimit-Reset: 1675249602
Date: Wed, 01 Feb 202311:06:27 GMT
{
"eventId": "2517270512120237019_63270570-e8cb-4174-afbb-d09155eb6ec0"
}
Request throttling
The SIGNL4 webhook applies request throttling to prevent event spamming. The throttling mechanism allows to submit a certain number of HTTP requests within a specific time period (so called request time period). If the amount is reached in the current time period, you are blocked for subsequent requests until the current request time period ends. Additionally, you are moved up to a longer request time period meaning that you would be blocked for a longer time in case your request throughput remains the same.
The following table explains all response headers related to the throttling mechanism and which are returned with each HTTP response.
Header |
Meaning |
X-RateLimit-Limit |
The number of messages you are allowed to send in your current request time period. |
X-RateLimit-Remaining |
The remaining number of messages you are allowed to send in your current request time period. |
X-RateLimit-Reset |
Time when the current request time period ends (in epoch time). |
In case there are no more requests left in the current request time period, the webhook will start returning 429 responses (see HTTP details table above).
There are different request time periods based on your SIGNL4 plan.
The following request limits apply for non-commercial SIGNL4 plans:
- 10 events per 15 seconds
- 240 events per 1 minute
- 1200 events per 1 hour
- 4800 events per 1 day
The following request limits apply for all commercial SIGNL4 plans:
- 150 events per 15 seconds
- 600 events per 1 minute
- 36000 events per 1 hour
- 864000 events per 1 day
Comments
0 comments
Please sign in to leave a comment.