Metrics
The subdomain of your status page.
You can find this under your status page settings, the Subdomain field is found under the "Domain name" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/subdomain).
Used as a cursor for pagination.
Used as a cursor for pagination.
Set the number of metrics to return in the response. This defaults to 20 items, and can be a maximum of 100.
A status page's metrics
Authorization information is missing or invalid.
You lack the necessary permissions to access this resource.
A resource with the provided ID was not found.
Unexpected error.
GET /api/v2/status_pages/{subdomain}/metrics HTTP/1.1
Host: statuspal.io
Authorization: YOUR_API_KEY
Accept: */*
{
"metrics": [
{
"id": 1,
"title": "Website Response Time",
"unit": "ms",
"type": "up",
"enabled": true,
"visible": true,
"remote_id": "9dd9dee9-bf3d-4f2a-9cb6-c8e623b7df5a",
"remote_name": "StatusPal",
"status": "connect_timeout",
"latest_entry_time": 1679314774,
"threshold": 10,
"featured_number": "avg",
"order": 1,
"integration_id": "text"
}
],
"links": {
"next": "{STATUSPAL_HOST}/api/v2/status_pages/subdomain/metrics?after=cUrSoR",
"prev": "{STATUSPAL_HOST}/api/v2/status_pages/subdomain/metrics?before=cUrSoR"
},
"meta": {
"total_count": 100
}
}The subdomain of your status page.
You can find this under your status page settings, the Subdomain field is found under the "Domain name" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/subdomain).
The metric created
Bad request error. Probably JSON syntax is wrong, check with jsonlint.com.
Authorization information is missing or invalid.
You lack the necessary permissions to access this resource.
A resource with the provided ID was not found.
There was a validation error
Unexpected error.
POST /api/v2/status_pages/{subdomain}/metrics HTTP/1.1
Host: statuspal.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 238
{
"metric": {
"title": "Website Response Time",
"unit": "ms",
"type": "up",
"enabled": true,
"visible": true,
"remote_id": "9dd9dee9-bf3d-4f2a-9cb6-c8e623b7df5a",
"remote_name": "StatusPal",
"threshold": 10,
"featured_number": "avg",
"integration_id": "text"
}
}{
"metric": {
"id": 1,
"title": "Website Response Time",
"unit": "ms",
"type": "up",
"enabled": true,
"visible": true,
"remote_id": "9dd9dee9-bf3d-4f2a-9cb6-c8e623b7df5a",
"remote_name": "StatusPal",
"status": "connect_timeout",
"latest_entry_time": 1679314774,
"threshold": 10,
"featured_number": "avg",
"order": 1,
"integration_id": "text"
}
}The subdomain of your status page.
You can find this under your status page settings, the Subdomain field is found under the "Domain name" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/subdomain).
The ID of a custom metric
The metric
Authorization information is missing or invalid.
You lack the necessary permissions to access this resource.
A resource with the provided ID was not found.
Unexpected error.
GET /api/v2/status_pages/{subdomain}/metrics/{metricId} HTTP/1.1
Host: statuspal.io
Authorization: YOUR_API_KEY
Accept: */*
{
"metric": {
"id": 1,
"title": "Website Response Time",
"unit": "ms",
"type": "up",
"enabled": true,
"visible": true,
"remote_id": "9dd9dee9-bf3d-4f2a-9cb6-c8e623b7df5a",
"remote_name": "StatusPal",
"status": "connect_timeout",
"latest_entry_time": 1679314774,
"threshold": 10,
"featured_number": "avg",
"order": 1,
"integration_id": "text"
}
}The ID of a custom metric
The subdomain of your status page.
You can find this under your status page settings, the Subdomain field is found under the "Domain name" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/subdomain).
The metric updated
Bad request error. Probably JSON syntax is wrong, check with jsonlint.com.
Authorization information is missing or invalid.
You lack the necessary permissions to access this resource.
A resource with the provided ID was not found.
There was a validation error
Unexpected error.
PUT /api/v2/status_pages/{subdomain}/metrics/{metricId} HTTP/1.1
Host: statuspal.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 238
{
"metric": {
"title": "Website Response Time",
"unit": "ms",
"type": "up",
"enabled": true,
"visible": true,
"remote_id": "9dd9dee9-bf3d-4f2a-9cb6-c8e623b7df5a",
"remote_name": "StatusPal",
"threshold": 10,
"featured_number": "avg",
"integration_id": "text"
}
}{
"metric": {
"id": 1,
"title": "Website Response Time",
"unit": "ms",
"type": "up",
"enabled": true,
"visible": true,
"remote_id": "9dd9dee9-bf3d-4f2a-9cb6-c8e623b7df5a",
"remote_name": "StatusPal",
"status": "connect_timeout",
"latest_entry_time": 1679314774,
"threshold": 10,
"featured_number": "avg",
"order": 1,
"integration_id": "text"
}
}The subdomain of your status page.
You can find this under your status page settings, the Subdomain field is found under the "Domain name" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/subdomain).
The ID of a custom metric
Metric deleted successfully
Authorization information is missing or invalid.
You lack the necessary permissions to access this resource.
A resource with the provided ID was not found.
Unexpected error.
DELETE /api/v2/status_pages/{subdomain}/metrics/{metricId} HTTP/1.1
Host: statuspal.io
Authorization: YOUR_API_KEY
Accept: */*
No content
The subdomain of your status page.
You can find this under your status page settings, the Subdomain field is found under the "Domain name" section. Alternatively find it in the URL of your admin dashboard (e.g. statuspal.io/admin/subdomain).
The ID of a custom metric
The metric data point was created
Bad request error. Probably JSON syntax is wrong, check with jsonlint.com.
Authorization information is missing or invalid.
You lack the necessary permissions to access this resource.
A resource with the provided ID was not found.
There was a validation error
Unexpected error.
POST /api/v2/status_pages/{subdomain}/metrics/{metricId}/entries HTTP/1.1
Host: statuspal.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"entry": {
"time": 1561318904,
"value": 130
}
}{
"entry": {
"time": 1561318904,
"value": 130
}
}Last updated