Monitors
Add Monitor
Request
POST /monitors
Body Parameters
| Name | Type | Description | 
|---|
name | string | Required -- Name of the Monitor | 
title | string | Title of Monitor for Status Page (Optional) | 
type | string | Required -- Scheme or Protocol | 
urn | string | Required -- Urn address | 
followRedirects | bool | If selected, it will wait until the end of the redirect to get the response | 
timeout | float64 | Timeout in seconds | 
interval | int64 | Required -- Interval in seconds | 
regions | int64[] | Required -- An array of regions ids | 
description | string | Monitor description | 
groups | string[] | An array of groups uuid | 
alerts | string[] | An array of alerts uuid | 
degradedThreshold | float64 | Degraded value in seconds | 
apdexThreshold | float64 | Apdex value in seconds | 
httpRequest | HttpRequest | Monitor HTTP Request Options (See HttpRequest parameters) | 
httpResponse | HttpResponse | Monitor HTTP Response Options (See HttpResponse parameters) | 
tcpOptions | TcpOptions | Monitor TCP Options (See TcpOptions parameters) | 
maintenance | Maintenance | Scheduled maintenance of the monitor. (See Maintenance window parameters) | 
HttpRequest Parameters
| Name | Type | Description | 
|---|
method | string | HTTP method to send in the request. Options are: GET | POST | PUT | PATCH | DELETE | HEAD | OPTIONS | 
headers | HttpHeader[] | Array of HTTP Header Objects (See HttpHeader paramenters) | 
body | string | Body to send in request | 
HttpResponse Parameters
| Name | Type | Description | 
|---|
status | string[] | Array of number status code in response | 
statusMatches | bool | Status must match or not | 
keywordHeader | string | Keyword in Header (case insensitive) | 
keywordHeaderExists | bool | Keyword in header must exist or not | 
keywordBody | string | Ketword body in Response (case insensitive) | 
keywordBodyExists | bool | Keyword body must exist or not | 
HttpHeader Parameter
| Name | Type | Description | 
|---|
name | string | Name of Header | 
value | string | Value of Header | 
Tcp Options Parameters
| Name | Type | Description | 
|---|
dataRequest | string | Data for sending to the TCP server | 
keywordResponse | string | Keyword in the Data Response (case insensitive) | 
keywordResponseExists | bool | Keyword in the Data Response must exists or not (case insensitive) | 
Maintenance window Parameters
| Name | Type | Description | 
|---|
days | string[] | The days of the week when the monitor will undergo maintenance. | 
times | MaintenanceTime[] | The maintenance hours (See Maintenance Time parameters) | 
timeZone | string | The Time Zone to set the maintenance hours | 
Maintenance Time Parameters
| Name | Type | Description | 
|---|
startHour | int | Start hour | 
startMinute | int | Start minute | 
stopHour | int | End hour | 
stopMinute | int | End mnute | 
Basic Request Payload Example
{
  "name": "Example Monitor",
  "title": "Title for Example Monitor",
  "type": "https",
  "urn": "example.com",
  "followRedirects": true,
  "timeout": 10,
  "interval": "2",
  "regions": [ 1, 5 ],
  "description": "Description",
  "groups": [ "1ca46e77ad704f2894f9c0f73491a72a", "2429fc0af1d9437fa770abc94c03341f" ],
  "alerts": [ "92513543-3s4r-a5h7-a3rf-87hfyt6478ru" ],
  "degradedThreshold": 2,
  "apdexThreshold": 0.75
}
Basic Request Curl Example
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 6880e91a09e40a5d70976257c7dd8df6f6cc0597a5dd447824f2275b7d9fdcff" \
-d \
  '{
    "name":"Example Monitor",
    "title":"Title for Example Monitor",
    "type":"https",
    "urn":"example.com",
		"httpFollowRedirects":false,
    "timeout":10,
    "intervalId":2,
    "regions":[1, 5],
    "description":"Description",
    "groups":["1ca46e77ad704f2894f9c0f73491a72a", "2429fc0af1d9437fa770abc94c03341f"],
    "alerts":["ac76e6cff57645abbd03f3313f8a7d85"],
    "degradedThreshold":2,
    "apdexThreshold":0.75
  }' \
"https://api.statsignal.dev/v1/monitors"
Basic Response Example
Status: 201 Created
{
  "monitor": {
    "uuid": "f1594a7e6c744e6fb51f50c7f3ade858",
    "name": "Example Monitor",
    "title": "Title for Example Monitor",
    "type": "https",
    "urn": "example.com",
    "httpFollowRedirects": false,
    "timeout": 10,
    "intervalId": 2,
    "regions": [
      1,
      5
    ],
    "description": "Description",
    "groups": [
      "1ca46e77ad704f2894f9c0f73491a72a",
      "2429fc0af1d9437fa770abc94c03341f"
    ],
    "alerts": [
      "ac76e6cff57645abbd03f3313f8a7d85"
    ],
    "tcpOptions": null,
    "httpRequest": null,
    "httpResponse": null,
    "degradedThreshold": 2,
    "apdexThreshold": 0.75,
    "maintenance": null,
    "createdAt": "2023-06-27T04:40:05.679135Z"
  }
}
Request Payload Example with Http / Https Options
{
  "name": "Example Monitor",
  "title": "Title for Example Monitor",
  "type": "https",
  "urn": "example.com",
  "followRedirects": true,
  "timeout": 10,
  "interval": "2",
  "regions": [ 1, 5 ],
  "description": "Description",
  "groups": [ "1ca46e77ad704f2894f9c0f73491a72a", "2429fc0af1d9437fa770abc94c03341f" ],
  "alerts": [ "ac76e6cff57645abbd03f3313f8a7d85" ],
  "httpRequest":{
    "method":"POST",
    "headers":[
      {
        "name":"Header name",
        "value":"Value content"
      }
    ],
    "body":"Body content"
  },
  "degradedThreshold": 2,
  "apdexThreshold": 0.75
}
Request Curl Example with Http / Https Options
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 6880e91a09e40a5d70976257c7dd8df6f6cc0597a5dd447824f2275b7d9fdcff" \
-d \
  '{
    "name":"Example Monitor",
    "title":"Title for Example Monitor",
    "type":"https",
    "urn":"example.com",
    "httpFollowRedirects":true,
    "timeout":10,
    "intervalId":2,
    "regions":[ 1, 5 ],
    "description":"Description",
    "groups":["1ca46e77ad704f2894f9c0f73491a72a", "2429fc0af1d9437fa770abc94c03341f"],
    "alerts":["ac76e6cff57645abbd03f3313f8a7d85"],
    "httpRequest":{
      "method":"POST",
      "headers":[
        {
          "name":"Header name",
          "value":"Value content"
        }
      ],
      "body":"Body content"
    },
    "httpResponse":{
      "status":["200-299", "301"],
      "statusMatches":true,
      "keywordHeader":"Keyword Header in Response",
      "keywordHeaderExists":true,
      "keywordBody":"Keyword Body in Response",
      "keywordBodyExists":false
    },
    "degradedThreshold":2,
    "apdexThreshold":0.75
  }' \
"https://api.statsignal.dev/v1/monitors"
Response Example with Http / Https Options
Status: 201 Created
{
  "monitor": {
    "uuid": "8c135bfebe1243dbb5940f2ed5ff0deb",
    "name": "Example Monitor",
    "title": "Title for Example Monitor",
    "type": "https",
    "urn": "example.com",
    "httpFollowRedirects": true,
    "timeout": 10,
    "intervalId": 2,
    "regions": [
      1,
      5
    ],
    "description": "Description",
    "groups": [
      "2429fc0af1d9437fa770abc94c03341f",
      "1ca46e77ad704f2894f9c0f73491a72a"
    ],
    "alerts": [
      "ac76e6cff57645abbd03f3313f8a7d85"
    ],
    "tcpOptions": null,
    "httpRequest": {
      "method": "POST",
      "headers": [
        {
          "name": "Header name",
          "value": "Value content"
        }
      ],
      "body": "Body content"
    },
    "httpResponse": {
      "status": [
        "200-299",
        "301"
      ],
      "statusMatches": true,
      "keywordHeader": "Keyword Header in Response",
      "keywordHeaderExists": true,
      "keywordBody": "Keyword Body in Response",
      "keywordBodyExists": false
    },
    "degradedThreshold": 2,
    "apdexThreshold": 0.75,
    "maintenance": null,
    "createdAt": "2023-06-27T04:55:40.150608Z"
  }
}
Request Payload Example with Tcp Options
{
  "name": "Example Monitor",
  "title": "Title for Example Monitor",
  "type": "tcp",
  "urn": "example.com:1000",
  "followRedirects": true,
  "timeout": 10,
  "interval": "2",
  "regions": [ 1, 5 ],
  "description": "Description",
  "groups": [ "1ca46e77ad704f2894f9c0f73491a72a", "2429fc0af1d9437fa770abc94c03341f" ],
  "alerts": ["ac76e6cff57645abbd03f3313f8a7d85"],
  "tcpOptions":{
    "KeywordResponse":"Keyword Content",
    "KeywordResponseExists":true,
    "DataRequest":"Data Content"
  },
  "degradedThreshold": 2,
  "apdexThreshold": 0.75
}
Request Curl Example with Tcp Options
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 6880e91a09e40a5d70976257c7dd8df6f6cc0597a5dd447824f2275b7d9fdcff" \
-d \
  '{
    "name":"Example Monitor",
    "title":"Title for Example Monitor",
    "type":"tcp",
    "urn":"example.com:1000",
    "timeout":10,
    "intervalId":2,
    "regions":[ 1, 5 ],
    "description":"Description",
    "groups":["1ca46e77ad704f2894f9c0f73491a72a", "2429fc0af1d9437fa770abc94c03341f"],
    "alerts":["ac76e6cff57645abbd03f3313f8a7d85"],
    "httpFollowRedirects":false,
    "tcpOptions":{
      "KeywordResponse":"Keyword Content",
      "KeywordResponseExists":true,
      "DataRequest":"Data Content"
    },
    "degradedThreshold":2,
    "apdexThreshold":0.75
  }' \
"https://api.statsignal.dev/v1/monitors"
Response Example with Tcp Options
Status: 201 Created
{
  "monitor": {
    "uuid": "c2f9b5f3448448cea14f86701969a58f",
    "name": "Example Monitor",
    "title": "Title for Example Monitor",
    "type": "tcp",
    "urn": "example.com:1000",
    "httpFollowRedirects": false,
    "timeout": 10,
    "intervalId": 2,
    "regions": [
      1,
      5
    ],
    "description": "Description",
    "groups": [
      "2429fc0af1d9437fa770abc94c03341f",
      "1ca46e77ad704f2894f9c0f73491a72a"
    ],
    "alerts": [
      "ac76e6cff57645abbd03f3313f8a7d85"
    ],
    "tcpOptions": {
      "keywordResponse": "Keyword Content",
      "keywordResponseExists": true,
      "dataRequest": "Data Content"
    },
    "httpRequest": null,
    "httpResponse": null,
    "degradedThreshold": 2,
    "apdexThreshold": 0.75,
    "maintenance": null,
    "createdAt": "2023-06-27T04:58:39.594336Z"
  }
}
Request Payload Example with Maintenance window
{
  "name": "Example Monitor",
  "title": "Title for Example Monitor",
  "type": "https",
  "urn": "example.com",
  "followRedirects": true,
  "timeout": 10,
  "interval": "2",
  "regions": [ 1, 5 ],
  "description": "Description",
  "groups": [ "1ca46e77ad704f2894f9c0f73491a72a", "2429fc0af1d9437fa770abc94c03341f" ],
  "alerts": ["ac76e6cff57645abbd03f3313f8a7d85"],
  "degradedThreshold": 2,
  "apdexThreshold": 0.75,
  "maintenance":{
    "days": [0, 6],
    "times": [
      {
        "startHour":   12,
        "startMinute": 0,
        "stopHour":    13,
        "stopMinute":  0
      },
      {
        "startHour":   13,
        "startMinute": 30,
        "stopHour":    14,
        "stopMinute":  0
      }
    ],
    "timeZone": "America/Chicago"
  }
}
Request Curl Example with Maintenance window
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 6880e91a09e40a5d70976257c7dd8df6f6cc0597a5dd447824f2275b7d9fdcff" \
-d \
  '{
    "name":"Example Monitor",
    "title":"Title for Example Monitor",
    "type":"https",
    "urn":"example.com",
    "httpFollowRedirects":false,
    "timeout":10,
    "intervalId":2,
    "regions":[ 1, 5 ],
    "description":"Description",
    "groups":["1ca46e77ad704f2894f9c0f73491a72a", "2429fc0af1d9437fa770abc94c03341f"],
    "alerts":["ac76e6cff57645abbd03f3313f8a7d85"],
    "degradedThreshold":2,
    "apdexThreshold":0.75,
    "maintenance":{
      "days":[0, 6],
      "times":[
        {
          "startHour":12,
          "startMinute":0,
          "stopHour":13,
          "stopMinute":0
        },
        {
          "startHour":13,
          "startMinute":30,
          "stopHour":14,
          "stopMinute":0
        }
      ],
      "timeZone":"America/Chicago"
    }
  }' \
"https://api.statsignal.dev/v1/monitors"
Response Example with Maintenance window
Status: 201 Created
{
  "monitor": {
    "uuid": "f1bae3eb67884d49b96573975131b464",
    "name": "Example Monitor",
    "title": "Title for Example Monitor",
    "type": "https",
    "urn": "example.com",
    "httpFollowRedirects": false,
    "timeout": 10,
    "intervalId": 2,
    "regions": [
      1,
      5
    ],
    "description": "Description",
    "groups": [
      "2429fc0af1d9437fa770abc94c03341f",
      "1ca46e77ad704f2894f9c0f73491a72a"
    ],
    "alerts": [
      "ac76e6cff57645abbd03f3313f8a7d85"
    ],
    "tcpOptions": null,
    "httpRequest": null,
    "httpResponse": null,
    "degradedThreshold": 2,
    "apdexThreshold": 0.75,
    "maintenance": {
      "days": [
        0,
        6
      ],
      "times": [
        {
          "startHour": 12,
          "startMinute": 0,
          "stopHour": 13,
          "stopMinute": 0
        },
        {
          "startHour": 13,
          "startMinute": 30,
          "stopHour": 14,
          "stopMinute": 0
        }
      ],
      "timeZone": "America/Chicago"
    },
    "createdAt": "2023-06-27T05:18:19.150642Z"
  }
}