Monitors
Edit Monitor
Request
PATCH /monitors/uuid
Parameter
Name | Type | Description |
---|
uuid | string | Required -- Monitor uuid |
name | string | Name of the Monitor |
title | string | Title of Monitor for Status Page (Optional) |
type | string | Scheme or Protocol |
urn | string | 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 | Interval in seconds |
regions | int64[] | An array of regions ids |
description | string | Monitor description |
groups | string[] | An array of groups 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) |
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) |
Request Payload Example
{
"name": "Example Monitor",
"title": "Title for Example Monitor",
"type": "https",
"urn": "example.com",
"description": "Description",
"interval": "2",
"regions": [ 1, 5 ],
"groups": [ "93742199-d3d4-4a0a-a7bb-9e66e0a3f83b", "c5623708-3fa4-4598-afc4-d134ca3a2ea8" ],
"degradedThreshold": 2,
"apdexThreshold": 0.75`
}
Request Curl Example
curl -X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: Bearer d3d6763224e8f54ee5aeb08202b7eb101d97081876819cb48833d9f892185917" \
-d \
'{
"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"],
"degradedThreshold":2,
"apdexThreshold":0.75`
}' \
"https://api.statsignal.dev/v1/monitors/3373ceee-9da4-46b4-ab62-212b1b864823"
Response Example
Status: 200 updated
{
"uuid": "3373ceee-9da4-46b4-ab62-212b1b864823",
"name": "Example Monitor",
"title": "Title for Example Monitor",
"type": "http",
"urn": "example.com",
"description": "Description",
"interval": "2",
"regions": [
1,
5
],
"groups": [
"93742199-d3d4-4a0a-a7bb-9e66e0a3f83b",
"c5623708-3fa4-4598-afc4-d134ca3a2ea8"
],
"degradedThreshold": 2,
"apdexThreshold": 0.75,
"createdAt": "2020-11-2rT06:36:31Z",
"updatedAt": "2020-11-2rT06:36:31Z"
}