Start Now

Monitors


Add Monitor

Request

POST /monitors

Parameters

NameTypeDescription
namestringRequired -- Name of the Monitor
titlestringTitle of Monitor for Status Page (Optional)
typestringRequired -- Scheme or Protocol
urnstringRequired -- Urn address
followRedirectsboolIf selected, it will wait until the end of the redirect to get the response
timeoutfloat64Timeout in seconds
intervalint64Required -- Interval in seconds
regionsint64[]Required -- An array of regions ids
descriptionstringMonitor description
groupsstring[]An array of groups uuid
alertsstring[]An array of alerts uuid
degradedThresholdfloat64Degraded value in seconds
apdexThresholdfloat64Apdex value in seconds
httpRequestHttpRequestMonitor HTTP Request Options (See HttpRequest parameters)
httpResponseHttpResponseMonitor HTTP Response Options (See HttpResponse parameters)
tcpOptionsTcpOptionsMonitor TCP Options (See TcpOptions parameters)

HttpRequest Parameters

NameTypeDescription
methodstringHTTP method to send in the request.
Options are: GET | POST | PUT | PATCH | DELETE | HEAD | OPTIONS
headersHttpHeader[]Array of HTTP Header Objects (See HttpHeader paramenters)
bodystringBody to send in request

HttpResponse Parameters

NameTypeDescription
statusstring[]Array of number status code in response
statusMatchesboolStatus must match or not
keywordHeaderstringKeyword in Header (case insensitive)
keywordHeaderExistsboolKeyword in header must exist or not
keywordBodystringKetword body in Response (case insensitive)
keywordBodyExistsboolKeyword body must exist or not

HttpHeader Parameter

NameTypeDescription
namestringName of Header
valuestringValue of Header

Tcp Options Parameters

NameTypeDescription
dataRequeststringData for sending to the TCP server
keywordResponsestringKeyword in the Data Response (case insensitive)
keywordResponseExistsboolKeyword in the Data Response must exists or not (case insensitive)

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": [ "93742199-d3d4-4a0a-a7bb-9e66e0a3f83b", "c5623708-3fa4-4598-afc4-d134ca3a2ea8" ],
  "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 d3d6763224e8f54ee5aeb08202b7eb101d97081876819cb48833d9f892185917" \
-d \
  '{
    "name":"Example Monitor",
    "title":"Title for Example Monitor",
    "type":"https",
    "urn":"example.com",
    "timeout":10,
    "intervalId":2,
    "description":"Description",
    "regions":[ 1, 5 ],
    "groups":["93742199-d3d4-4a0a-a7bb-9e66e0a3f83b", "c5623708-3fa4-4598-afc4-d134ca3a2ea8"],
    "httpFollowRedirects":true,
    "alerts":["92513543-3s4r-a5h7-a3rf-87hfyt6478ru"],
    "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",
    "intervalId": 2,
    "description": "Description",
    "regions": [
      1,
      5
    ],
    "groups": [
      "93742199-d3d4-4a0a-a7bb-9e66e0a3f83b",
      "c5623708-3fa4-4598-afc4-d134ca3a2ea8"
    ],
    "alerts": [
      "92513543-3s4r-a5h7-a3rf-87hfyt6478ru"
    ],
    "degradedThreshold": 2,
    "apdexThreshold": 0.75,
    "createdAt": "2023-03-05T03:52:45.763322Z",
    "httpFollowRedirects": true,
    "timeout": 10,
    "httpRequest": null,
    "httpResponse": null,
    "tcpOptions": null
  }
}

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": [ "93742199-d3d4-4a0a-a7bb-9e66e0a3f83b", "c5623708-3fa4-4598-afc4-d134ca3a2ea8" ],
  "alerts": [ "92513543-3s4r-a5h7-a3rf-87hfyt6478ru" ],
  "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 d3d6763224e8f54ee5aeb08202b7eb101d97081876819cb48833d9f892185917" \
-d \
  '{
    "name":"Example Monitor",
    "title":"Title for Example Monitor",
    "type":"https",
    "urn":"example.com",
    "timeout":10,
    "intervalId":2,
    "description":"Description",
    "regions":[ 1, 5 ],
    "groups":["93742199-d3d4-4a0a-a7bb-9e66e0a3f83b", "c5623708-3fa4-4598-afc4-d134ca3a2ea8"],
    "httpFollowRedirects":true,
    "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": "f1594a7e6c744e6fb51f50c7f3ade858",
    "name": "Example Monitor",
    "title": "Title for Example Monitor",
    "type": "https",
    "urn": "example.com",
    "intervalId": 2,
    "description": "Description",
    "regions": [
      1,
      5
    ],
    "groups": [
      "93742199-d3d4-4a0a-a7bb-9e66e0a3f83b",
      "c5623708-3fa4-4598-afc4-d134ca3a2ea8"
    ],
    "alerts": null,
    "degradedThreshold": 2,
    "apdexThreshold": 0.75,
    "createdAt": "2023-03-05T03:52:45.763322Z",
    "httpFollowRedirects": true,
    "timeout": 10,
    "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
    },
    "tcpOptions": null
  }
}

Request Payload Example with Tcp 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": [ "93742199-d3d4-4a0a-a7bb-9e66e0a3f83b", "c5623708-3fa4-4598-afc4-d134ca3a2ea8" ],
  "alerts": [ "92513543-3s4r-a5h7-a3rf-87hfyt6478ru" ],
  "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 d3d6763224e8f54ee5aeb08202b7eb101d97081876819cb48833d9f892185917" \
-d \
  '{
    "name":"Example Monitor",
    "title":"Title for Example Monitor",
    "type":"https",
    "urn":"example.com:1000",
    "timeout":10,
    "intervalId":2,
    "description":"Description",
    "regions":[ 1, 5 ],
    "groups":["93742199-d3d4-4a0a-a7bb-9e66e0a3f83b", "c5623708-3fa4-4598-afc4-d134ca3a2ea8"],
    "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": "df7620b0feb94d27bbc7ec8d6795fdd2",
    "name": "Example Monitor",
    "title": "Title for Example Monitor",
    "type": "tcp",
    "urn": "example.com:1000",
    "intervalId": 2,
    "description": "Description",
    "regions": [
      1,
      5
    ],
    "groups": [
      "93742199-d3d4-4a0a-a7bb-9e66e0a3f83b",
      "c5623708-3fa4-4598-afc4-d134ca3a2ea8"
    ],
    "alerts": null,
    "degradedThreshold": 2,
    "apdexThreshold": 0.75,
    "createdAt": "2023-03-05T03:58:47.627032Z",
    "httpFollowRedirects": false,
    "timeout": 10,
    "httpRequest": null,
    "httpResponse": null,
    "tcpOptions": {
      "keywordResponse": "Keyword Content",
      "keywordResponseExists": true,
      "dataRequest": "Data Content"
    }
  }
}
Statsignal - Uptime monitoring and status page | Product Hunt
Statsignal is designed and built by 19 Signals LLC. Copyright ©2021 19 Signals LLC. All rights reserved.