Create a monitor or a heartbeat (`config.type: heartbeat`)
curl --request POST \
--url https://api.hebeat.com/monitors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"interval_seconds": 123,
"timeout_ms": 15050,
"degraded_after_ms": 15000,
"max_attempts": 2,
"regions": [],
"config": {
"type": "http",
"url": "<string>",
"request_headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"request_body": "<string>",
"expected_status": [
349
],
"follow_redirects": true,
"max_redirects": 5,
"header_assertions": [
{
"name": "<string>",
"value": "<string>"
}
],
"body_assertions": [
{
"value": "<string>"
}
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
interval_seconds: 123,
timeout_ms: 15050,
degraded_after_ms: 15000,
max_attempts: 2,
regions: [],
config: {
type: 'http',
url: '<string>',
request_headers: [{name: '<string>', value: '<string>'}],
request_body: '<string>',
expected_status: [349],
follow_redirects: true,
max_redirects: 5,
header_assertions: [{name: '<string>', value: '<string>'}],
body_assertions: [{value: '<string>'}]
}
})
};
fetch('https://api.hebeat.com/monitors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hebeat.com/monitors"
payload = {
"name": "<string>",
"description": "<string>",
"interval_seconds": 123,
"timeout_ms": 15050,
"degraded_after_ms": 15000,
"max_attempts": 2,
"regions": [],
"config": {
"type": "http",
"url": "<string>",
"request_headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"request_body": "<string>",
"expected_status": [349],
"follow_redirects": True,
"max_redirects": 5,
"header_assertions": [
{
"name": "<string>",
"value": "<string>"
}
],
"body_assertions": [{ "value": "<string>" }]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"monitor": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"type": "http",
"target": "<string>",
"enabled": true,
"status": "paused",
"interval_seconds": 123,
"selected_regions": [
"us-east"
],
"last_transition_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"timeout_ms": 123,
"degraded_after_ms": 123,
"max_attempts": 123,
"config_version": 123,
"config": {
"type": "http",
"url": "<string>",
"method": "GET",
"request_headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"request_body": "<string>",
"expected_status": [
349
],
"follow_redirects": true,
"max_redirects": 5,
"header_assertions": [
{
"comparison": "equals",
"name": "<string>",
"value": "<string>"
}
],
"body_assertions": [
{
"comparison": "contains",
"value": "<string>"
}
]
},
"regions": [
{
"region_code": "us-east",
"status": "unknown",
"last_checked_at": "2023-11-07T05:31:56Z"
}
],
"in_maintenance": true,
"heartbeat": {
"schedule": {
"kind": "period",
"period_seconds": 1296030
},
"grace_seconds": 123,
"keep_messages": true,
"token_hint": "<string>",
"last_ping_at": "2023-11-07T05:31:56Z",
"last_start_at": "2023-11-07T05:31:56Z",
"next_due_at": "2023-11-07T05:31:56Z"
}
},
"ping_url": "<string>"
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}Monitors
Create a monitor or a heartbeat (`config.type: heartbeat`)
POST
/
monitors
Create a monitor or a heartbeat (`config.type: heartbeat`)
curl --request POST \
--url https://api.hebeat.com/monitors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"interval_seconds": 123,
"timeout_ms": 15050,
"degraded_after_ms": 15000,
"max_attempts": 2,
"regions": [],
"config": {
"type": "http",
"url": "<string>",
"request_headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"request_body": "<string>",
"expected_status": [
349
],
"follow_redirects": true,
"max_redirects": 5,
"header_assertions": [
{
"name": "<string>",
"value": "<string>"
}
],
"body_assertions": [
{
"value": "<string>"
}
]
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
interval_seconds: 123,
timeout_ms: 15050,
degraded_after_ms: 15000,
max_attempts: 2,
regions: [],
config: {
type: 'http',
url: '<string>',
request_headers: [{name: '<string>', value: '<string>'}],
request_body: '<string>',
expected_status: [349],
follow_redirects: true,
max_redirects: 5,
header_assertions: [{name: '<string>', value: '<string>'}],
body_assertions: [{value: '<string>'}]
}
})
};
fetch('https://api.hebeat.com/monitors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hebeat.com/monitors"
payload = {
"name": "<string>",
"description": "<string>",
"interval_seconds": 123,
"timeout_ms": 15050,
"degraded_after_ms": 15000,
"max_attempts": 2,
"regions": [],
"config": {
"type": "http",
"url": "<string>",
"request_headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"request_body": "<string>",
"expected_status": [349],
"follow_redirects": True,
"max_redirects": 5,
"header_assertions": [
{
"name": "<string>",
"value": "<string>"
}
],
"body_assertions": [{ "value": "<string>" }]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"monitor": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"type": "http",
"target": "<string>",
"enabled": true,
"status": "paused",
"interval_seconds": 123,
"selected_regions": [
"us-east"
],
"last_transition_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"timeout_ms": 123,
"degraded_after_ms": 123,
"max_attempts": 123,
"config_version": 123,
"config": {
"type": "http",
"url": "<string>",
"method": "GET",
"request_headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"request_body": "<string>",
"expected_status": [
349
],
"follow_redirects": true,
"max_redirects": 5,
"header_assertions": [
{
"comparison": "equals",
"name": "<string>",
"value": "<string>"
}
],
"body_assertions": [
{
"comparison": "contains",
"value": "<string>"
}
]
},
"regions": [
{
"region_code": "us-east",
"status": "unknown",
"last_checked_at": "2023-11-07T05:31:56Z"
}
],
"in_maintenance": true,
"heartbeat": {
"schedule": {
"kind": "period",
"period_seconds": 1296030
},
"grace_seconds": 123,
"keep_messages": true,
"token_hint": "<string>",
"last_ping_at": "2023-11-07T05:31:56Z",
"last_start_at": "2023-11-07T05:31:56Z",
"next_due_at": "2023-11-07T05:31:56Z"
}
},
"ping_url": "<string>"
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}{
"error": {
"code": "<string>",
"issues": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>",
"params": {}
}
],
"workspaces": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"member_count": 123,
"kind": "shared"
}
]
}
}Headers
Body
application/json
- Option 1
- Option 2
Required array length:
1 - 25 elementsAvailable options:
us-east, us-east-oh, us-west-ca, us-west, ca-qc, ca-ab, sa-br, eu-ie, eu-gb, eu-fr, eu-de, eu-se, eu-es, asia-in, asia-in-hy, asia-sg, asia-id, asia-jp, asia-jp-os, asia-kr, asia-tw, asia-my, asia-th, oc-au, oc-au-me Was this page helpful?