Start Now

Monitors


Edit Monitor

Request

PATCH /monitors/uuid

Parameter

NameTypeDescription
uuidstringRequired -- Monitor uuid
namestringName of the Monitor
titlestringTitle of Monitor for Status Page (Optional)
typestringScheme or Protocol
urnstringUrn address
followRedirectsboolIf selected, it will wait until the end of the redirect to get the response
timeoutfloat64Timeout in seconds
intervalint64Interval in seconds
regionsint64[]An array of regions ids
descriptionstringMonitor description
groupsstring[]An array of groups 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)
maintenanceMaintenanceScheduled maintenance of the monitor. (See Maintenance window 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)

Maintenance window Parameters

NameTypeDescription
daysstring[]The days of the week when the monitor will undergo maintenance.
timesMaintenanceTime[]The maintenance hours (See Maintenance Time parameters)
timeZonestringThe Time Zone to set the maintenance hours

Maintenance Time Parameters

NameTypeDescription
startHourintStart hour
startMinuteintStart minute
stopHourintEnd hour
stopMinuteintEnd mnute

Request Payload Example

{
  "name": "Example Monitor",
  "title": "Title for Example Monitor",
  "type": "https",
  "urn": "example.com",
  "description": "Description",
  "interval": "2",
  "regions": [ 1, 5 ],
  "groups": [ "1ca46e77ad704f2894f9c0f73491a72a","2429fc0af1d9437fa770abc94c03341f" ],
  "degradedThreshold": 2,
  "apdexThreshold": 0.75
}

Request Curl Example

curl -X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: Bearer 6880e91a09e40a5d70976257c7dd8df6f6cc0597a5dd447824f2275b7d9fdcff" \
-d \
  '{
      "name":"Example Monitor",
      "title":"Title for Example Monitor",
      "type":"https",
      "urn":"example.com",
      "intervalId":2,
      "description":"Description",
      "regions":[ 1, 5 ],
      "groups":["1ca46e77ad704f2894f9c0f73491a72a", "2429fc0af1d9437fa770abc94c03341f"],
      "degradedThreshold":2,
      "apdexThreshold":0.75
  }' \
"https://api.statsignal.dev/v1/monitors/f1bae3eb67884d49b96573975131b464"

Response Example

Status: 200 updated

{
  "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",
    "updatedAt": "2023-06-27T13:23:17.638411Z"
  }
}

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.