boltZharp Docs
monitor_heartAPI Reference

Monitors

Create, change, pause and delete monitors, read their checks, uptime and response times, send heartbeats from cron jobs and data to push monitors, and organise monitors into groups.

Paths are relative to https://api.zharp.io/api/v1. Reading needs a read key; anything that changes a monitor needs admin, and the key's owner needs the matching permission (monitors:create, monitors:edit, monitors:delete — every role but Read-only). See Authentication.

Statuses

statusMeaning
PENDINGCreated or resumed, not checked yet.
UPThe last check passed.
DOWNChecks fail — an incident is open.
MAINTENANCEIn a maintenance window: checked, but nobody is alerted.
PAUSEDisActive is false.

The status is the checks' to decide: pause and resume with isActive; it can't be set directly.

Monitors

GET/monitors
Scope: readPermission: monitors:view
Every monitor in the workspace with its current state and the last 24 hours of uptime, down monitors first unless you sort otherwise.

dailyHistogram has 24 hourly entries: timestamp in epoch seconds, uptime a percentage, or -1 for an hour without checks. metadata here is a summary — the full settings are on GET /monitors/:id.

Query parameters
search
string
Text in the name, URL or host, ignoring case.
status
string
One of the statuses above.
type
string
tags
string
Monitors with any of these tags: tags=prod,eu or repeated tags=prod&tags=eu.
sortBy
string
name, createdAt, status, isActive, lastCheckedAt or type.
sortOrder
string
asc (default) or desc.
Request
curl "https://api.zharp.io/api/v1/monitors?status=DOWN" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{
  "message": "Monitors retrieved successfully",
  "data": [
    {
      "id": 42,
      "name": "api.acme.io",
      "type": "HTTP",
      "url": "https://api.acme.io/health",
      "interval": 60,
      "status": "DOWN",
      "isActive": true,
      "groupId": 3,
      "groupName": "Production",
      "lastCheckedAt": "2026-10-26T09:59:30.000Z",
      "lastLatency": 182,
      "lastStatusCode": 503,
      "lastMessage": "HTTP 503 Service Unavailable",
      "uptime24h": 99.86,
      "activeIncidentId": 481,
      "dailyHistogram": [{ "timestamp": 1761386400, "uptime": 100 }, …],
      "metadata": { "ssl": { "authorized": true, "validFor": 61 } },
      …
    }
  ]
}
Errors
  • 400An unknown status, type or sortBy.
GET/monitors/:id
Scope: readPermission: monitors:view
One monitor with all its settings, the alert connections it uses and its own maintenance windows.

Credentials — database and mail passwords, HTTP auth, tokens in headers, passwords inside connection strings — come back as ••••••••. Send that value back unchanged on an update and the stored one is kept.

Path parameters
id
integerrequired
The monitor's id.
Request
curl "https://api.zharp.io/api/v1/monitors/57" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{
  "message": "Monitor details retrieved successfully",
  "data": {
    "id": 57,
    "workspaceId": 3,
    "groupId": null,
    "name": "api.acme.io",
    "type": "HTTP",
    "url": "https://api.acme.io/health",
    "target": null,
    "port": null,
    "interval": 60,
    "timeout": 30,
    "retries": 1,
    "retryInterval": 60,
    "status": "UP",
    "isActive": true,
    "regions": ["eu", "us"],
    "metadata": {
      "method": "GET",
      "expectedStatusCodes": [200],
      "headers": { "Authorization": "••••••••", "Accept": "application/json" },
      "tags": ["prod"]
    },
    "immediateAlerts": { "email": true, "push": true },
    "escalationPolicyId": 4,
    "logServiceNames": ["api"],
    "lastCheckedAt": "2026-10-26T09:59:30.000Z",
    "nextCheckAt": "2026-10-26T10:00:30.000Z",
    "upSince": "2026-10-20T08:00:00.000Z",
    "downSince": null,
    "createdAt": "2026-09-01T10:00:00.000Z",
    "updatedAt": "2026-10-26T09:59:30.000Z",
    "workspace": { "id": 3, "name": "Acme", "slug": "acme" },
    "group": null,
    "notificationChannels": [{ "channelId": 41, "delay": 0, "repeat": 0, "repeatInterval": 0 }],
    "maintenanceWindows": [{ "scheduleType": "weekly", "days": ["Sun"], "startTime": "02:00", "endTime": "03:00", "timezone": "UTC" }]
  }
}
Errors
  • 404No such monitor in this workspace.
POST/monitors
Scope: adminPermission: monitors:create
Create a monitor. Its first check runs within the minute; the key's owner is subscribed to its alerts. How many you can have depends on the plan: 10 on Free, 50 on Pro, unlimited on Business — and 1, 10 and 50 user-journey monitors.

Zharp checks from the internet, so a url or target on a private network (10.x, 192.168.x, localhost…) is refused — monitor those through the Zharp agent instead.

Body (JSON)
type
stringrequired
The kind of check — see Monitor types. Can't be changed later.
name
string
What it's called. Defaults to its host, address or type.
url
string
The address checked. Required for HTTP, API, KEYWORD, SYNTHETIC, BROKEN_LINKS and VULNERABILITY.
target
string
The host or IP checked. Required for PING, PORT, SSL, DNS, DOMAIN, the databases, mail servers and IP_BLACKLIST.
port
integer
1–65535.
interval
integer
Seconds between checks — default 300, at least the plan's fastest: 180 on Free, 30 on Pro and Business; user-journey (SYNTHETIC) monitors 1800 on Free, 300 on Pro, 60 on Business. Cron and push monitors aren't checked on a schedule, so the minimum doesn't apply to them.
timeout
integer
Seconds a check may take, 1–60. Default 30.
retries
integer
Failed checks to confirm before the monitor is declared down, 0–10. Default 1.
retryInterval
integer
Seconds between those confirmations, 5–3600. Default 60.
regions
string[]
Where it's checked from: any of eu, us, as, au. Default all four.
isActive
boolean
false pauses it: no checks, no alerts. Default true.
notificationChannels
object[]
The alert connections it uses: [{ "channelId": 41, "delay": 0, "repeat": 0, "repeatInterval": 0 }]. On update it replaces the list. See Alerting.
escalationPolicyId
integer | null
The escalation policy that pages people when it goes down.
groupId
integer | null
Its monitor group.
immediateAlerts
object
How its subscribers are told: { "email": true, "push": true }.
logServiceNames
string[]
Log services whose lines show next to its incidents.
maintenanceWindows
object[]
Its own maintenance: { "scheduleType": "weekly", "days": ["Sun"], "startTime": "02:00", "endTime": "03:00", "timezone": "UTC" } or { "scheduleType": "once", "startTime": "<ISO>", "endTime": "<ISO>" }. On update it replaces them. Workspace-wide windows are in Maintenance.
metadata
object
The check's own settings — see Monitor types.
Request
curl -X POST "https://api.zharp.io/api/v1/monitors" \
  -H "Authorization: Bearer $ZHARP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "HTTP",
    "name": "API health",
    "url": "https://api.acme.io/health",
    "interval": 60,
    "regions": [
      "eu",
      "us"
    ],
    "escalationPolicyId": 4,
    "metadata": {
      "method": "GET",
      "expectedStatusCodes": [
        200
      ],
      "keyword": "ok"
    }
  }'
Response
{ "message": "Monitor created successfully", "data": { "id": 57, "status": "PENDING", … } }
Errors
  • 400A field fails validation, an alert connection, policy or group from outside the workspace, or a target on a private network (see below).
  • 403The plan's limit — monitors, user-journey monitors or the fastest interval. errorCode is limitExceeded.

Monitor types

type sets what's checked; metadata holds that type's settings. The common ones are below — every setting the dashboard's form offers can be sent, and is shown on each type's page.

typeNeedsMain metadata
HTTPurlmethod, headers, body, auth ({ username, password }), expectedStatusCodes, followRedirects, keyword, keywordShouldExist, jsonAssertions
API, KEYWORDurlAs HTTP.
PINGtargetpacketCount (1–10), slowResponseAlert, slowResponseThreshold
PORTtarget, portprotocol (tcp/udp), portSendString, portExpectedString
SSLtargetsslExpiryWarnDays, sslPort
DOMAINtargetdomainExpiryWarnDays, alertOnRegistrarChange
DNStargetdnsChecks (at least one), dnsRecordType, dnsServer
POSTGRES, MYSQL, MONGODB, REDIStargetdbName, dbUser, dbPassword (or redisPassword), dbQuery — or one dbConnectionString; connectionMode: "internal" with agentDatabaseId for a database the agent reports
SMTP, IMAP, POP3targetemailUser, emailPass, emailEncryption
SYNTHETICurlA user journey: syntheticCode (a Playwright script), synBrowser, synViewport
MULTI_STEP—steps: a chain of API requests
CRON—cronInterval and cronIntervalUnit (required), or cronMode: "expression" with cronExpression and cronTimezone; cronGracePeriod. See Heartbeats.
CUSTOM—customMode: push (you send data — see push) or pull; triggerRules, expectedDataWindow
LOGS—services and patterns (at least one each), logsEnvironments, logsFieldFilters
APPLICATION—apmService, apmOperation, apmMetric (p95, p99, avg, errorRate, throughput), apmThreshold
BROKEN_LINKS, VULNERABILITY, IP_BLACKLISTurl / targetcrawlMaxDepth; scanType, minSeverity

Two settings work on any type: confirmationPeriod and recoveryPeriod, the seconds a failure or a recovery must last before it counts.

PUT/monitors/:id
Scope: adminPermission: monitors:edit
Change a monitor — send only what changes; the same fields as creating one, except type. metadata is merged: keys you send replace, a key sent as null is removed, the rest stay. The result must still meet the type's rules. "isActive": false pauses it; true resumes it.
Path parameters
id
integerrequired
The monitor's id.
Request
curl -X PUT "https://api.zharp.io/api/v1/monitors/57" \
  -H "Authorization: Bearer $ZHARP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "interval": 30,
    "metadata": {
      "keyword": "healthy"
    }
  }'
Response
{ "message": "Monitor updated successfully", "data": { "id": 57, "interval": 30, … } }
Errors
  • 400A field fails validation, or the change leaves the type's settings incomplete.
  • 403The interval is faster than the plan allows.
  • 404No such monitor in this workspace.
DELETE/monitors/:id
Scope: adminPermission: monitors:delete
Delete a monitor, with its check history and incidents.
Path parameters
id
integerrequired
The monitor's id.
Request
curl -X DELETE "https://api.zharp.io/api/v1/monitors/57" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{ "message": "Monitor deleted successfully", "data": null }
Errors
  • 404No such monitor in this workspace.
POST/monitors/bulk-delete
Scope: adminPermission: monitors:delete
Delete several monitors. If any id isn't in the workspace, nothing is deleted.
Body (JSON)
ids
integer[]required
The monitors to delete.
Request
curl -X POST "https://api.zharp.io/api/v1/monitors/bulk-delete" \
  -H "Authorization: Bearer $ZHARP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      57,
      58
    ]
  }'
Response
{ "message": "Monitor deleted successfully", "data": null }
Errors
  • 400ids missing or not a list of ids.
  • 404One of them isn't in this workspace.
POST/monitors/:id/clone
Scope: adminPermission: monitors:create
Copy a monitor as “name (copy)” — settings, alerts, group and its own maintenance, with new heartbeat and push addresses. History isn't copied. Counts toward the plan like any new monitor.
Path parameters
id
integerrequired
The monitor's id.
Request
curl -X POST "https://api.zharp.io/api/v1/monitors/57/clone" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{ "message": "Monitor created successfully", "data": { "id": 61, "name": "API health (copy)", … } }
Errors
  • 403The plan's monitor limit.
  • 404No such monitor in this workspace.
POST/monitors/:id/trigger
Scope: adminPermission: monitors:edit
Run a check now, in every region the monitor uses. The result arrives as a check result a few seconds later.
Path parameters
id
integerrequired
The monitor's id.
Request
curl -X POST "https://api.zharp.io/api/v1/monitors/57/trigger" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{ "message": "Check triggered successfully", "data": null }
Errors
  • 404No such monitor in this workspace.
POST/monitors/:id/toggle-mute
Scope: adminPermission: monitors:edit
Mute the monitor's alerts, or unmute them — it flips each time. A muted monitor is still checked and still opens incidents; nobody is alerted.
Path parameters
id
integerrequired
The monitor's id.
Request
curl -X POST "https://api.zharp.io/api/v1/monitors/57/toggle-mute" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{ "message": "Alerts muted", "data": { "alertsMuted": true } }
Errors
  • 404No such monitor in this workspace.
PUT/monitors/:id/tags
Scope: adminPermission: monitors:edit
Replace the monitor's tags. Up to 20, each up to 40 characters; duplicates are dropped. An empty list removes them all.
Path parameters
id
integerrequired
The monitor's id.
Body (JSON)
tags
string[]required
The tags it should have.
Request
curl -X PUT "https://api.zharp.io/api/v1/monitors/57/tags" \
  -H "Authorization: Bearer $ZHARP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tags": [
      "prod",
      "api"
    ]
  }'
Response
{ "message": "Tags updated", "data": { "tags": ["prod", "api"] } }
Errors
  • 404No such monitor in this workspace.
POST/monitors/:id/test-notifications
Scope: adminPermission: monitors:edit
Send a test alert, labelled as one, through every connection that alerts for the monitor. Nobody is paged and no incident opens.

sent means queued for delivery — the connection's recent deliveries say whether it arrived.

Path parameters
id
integerrequired
The monitor's id.
Body (JSON)
sendToIntegrations
boolean
Through its alert connections. Default true.
sendToSubscribers
boolean
Also e-mail its subscribers. Default false.
Request
curl -X POST "https://api.zharp.io/api/v1/monitors/57/test-notifications" \
  -H "Authorization: Bearer $ZHARP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sendToSubscribers": false
  }'
Response
{
  "message": "Test notification sent successfully",
  "data": {
    "connections": [
      { "channelId": 41, "name": "#ops", "type": "SLACK", "result": "sent" },
      { "channelId": 52, "name": "On-call", "type": "PAGERDUTY", "result": "skipped", "reason": "Paused" }
    ],
    "people": []
  }
}
Errors
  • 404No such monitor in this workspace.
POST/monitors/:id/reset-stats
Scope: adminPermission: monitors:edit
Start the monitor's statistics again: its check history and uptime are deleted, and earlier incidents stop counting toward uptime. The incidents themselves stay. This can't be undone.
Path parameters
id
integerrequired
The monitor's id.
Request
curl -X POST "https://api.zharp.io/api/v1/monitors/57/reset-stats" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{ "message": "Statistics reset", "data": { "statsResetAt": "2026-10-26T10:00:00.000Z" } }
Errors
  • 404No such monitor in this workspace.

Checks, uptime and response times

GET/monitors/:id/logs
Scope: readPermission: monitors:view
The most recent check results, newest first.
Path parameters
id
integerrequired
The monitor's id.
Query parameters
limit
integer
1–1000. Default 100.
Request
curl "https://api.zharp.io/api/v1/monitors/57/logs?limit=20" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{
  "message": "Check results retrieved",
  "data": [
    {
      "id": 991,
      "monitorId": 57,
      "status": "UP",
      "latency": 180,
      "statusCode": 200,
      "message": "OK",
      "region": "eu",
      "responseHeaders": { "content-type": "application/json" },
      "metadata": { "timings": { "dns": 4, "connect": 21, "tls": 38, "firstByte": 112 } },
      "timestamp": "2026-10-26T09:59:30.000Z"
    }
  ]
}
Errors
  • 404No such monitor in this workspace.
GET/monitors/:id/stats
Scope: readPermission: monitors:view
Uptime over a range, plus the last 7, 30 and 365 days with their incident counts and downtime.

Percentages run from 0 to 100. dailyHistogram has 24 hourly entries for 24h only.

Path parameters
id
integerrequired
The monitor's id.
Query parameters
range
string
24h (default), 7d or 30d.
Request
curl "https://api.zharp.io/api/v1/monitors/57/stats?range=7d" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{
  "message": "Monitor statistics retrieved",
  "data": {
    "total": 10080,
    "up": 10066,
    "percentage": 99.86,
    "dailyHistogram": [],
    "stats7d": { "percentage": 99.9, "incidents": 1, "downtime": "4m" },
    "stats30d": { "percentage": 99.95, "incidents": 2, "downtime": "12m" },
    "stats365d": { "percentage": 99.97, "incidents": 5, "downtime": "2h" }
  }
}
Errors
  • 404No such monitor in this workspace.
GET/monitors/:id/uptime-histogram
Scope: readPermission: monitors:view
Uptime per day (UTC), oldest first.

timestamp is the day's start in epoch seconds; uptime a percentage, or -1 for a day without checks.

Path parameters
id
integerrequired
The monitor's id.
Query parameters
days
integer
1–90. Default 30.
Request
curl "https://api.zharp.io/api/v1/monitors/57/uptime-histogram?days=7" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{ "message": "…", "data": [{ "timestamp": 1761004800, "uptime": 99.93 }, { "timestamp": 1761091200, "uptime": -1 }, …] }
Errors
  • 404No such monitor in this workspace.
GET/monitors/:id/latency
Scope: readPermission: monitors:view
Response times, one point per check from every region, oldest first.
Path parameters
id
integerrequired
The monitor's id.
Query parameters
range
string
1h (default), 6h or 24h.
Request
curl "https://api.zharp.io/api/v1/monitors/57/latency?range=6h" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{ "message": "Response times retrieved", "data": [{ "timestamp": 1761472800, "latency": 182 }, …] }
Errors
  • 404No such monitor in this workspace.
GET/monitors/:id/incidents
Scope: readPermission: monitors:view
The monitor's incidents, newest first. For the full timeline of one, use GET /incidents/:id.
Path parameters
id
integerrequired
The monitor's id.
Query parameters
limit
integer
1–100. Default 50.
Request
curl "https://api.zharp.io/api/v1/monitors/57/incidents?limit=10" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{ "message": "Monitor incidents retrieved", "data": [{ "id": 481, "title": "api.acme.io is down", "status": "RESOLVED", "startedAt": "…", "resolvedAt": "…", … }] }
Errors
  • 404No such monitor in this workspace.
GET/monitors/global-statistics
Scope: readPermission: monitors:view
How many monitors are up, down and paused, how many the plan allows, and the average response time over the last hour.

monitorsPaused includes monitors in maintenance; totalPlanMonitors is 9999 for unlimited.

Request
curl "https://api.zharp.io/api/v1/monitors/global-statistics" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{
  "message": "Global statistics retrieved successfully",
  "data": { "monitorsUp": 12, "monitorsDown": 1, "monitorsPaused": 2, "totalPlanMonitors": 50, "totalUsedMonitors": 15, "avgLatency": 211 }
}
GET/monitors/uptime-metrics
Scope: readPermission: monitors:view
The workspace's uptime and incidents over a range.
  • totalTimeWithoutIncidents is seconds since the last incident ended, 0 while one is open.
  • incidentsByDay covers this week, Sunday first.
Query parameters
range
string
24h (default), 7d or 30d.
Request
curl "https://api.zharp.io/api/v1/monitors/uptime-metrics?range=30d" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{
  "message": "Uptime statistics retrieved successfully",
  "data": { "overallUptime": 99.87, "totalIncidents": 3, "activeIncidents": 0, "totalTimeWithoutIncidents": 43200, "affectedMonitors": 2, "incidentsByDay": [0, 1, 0, 0, 2, 0, 0] }
}

Heartbeats

A CRON monitor waits for your job to ping it; if no ping comes in time, it goes down. Its address is https://api.zharp.io/api/v1/ping/<pingToken>, with the token in the monitor's metadata.pingToken. No API key — the token is the credential. See Cron Jobs & Heartbeats.

GET/ping/:token
Scope: token in the URL
The job finished. POST works the same and keeps the request body (JSON or plain text) as the run's output — its last 4,000 characters. A paused monitor answers 200 and records nothing.
Path parameters
token
stringrequired
The monitor's pingToken.
Query parameters
host
string
The machine that ran it, shown on the run. Also read from an X-Host header.
Request
# Last line of the job
curl -fsS --retry 3 "https://api.zharp.io/api/v1/ping/m_8f2c41d09ab3e5f7"
Response
{ "message": "Heartbeat received and queued for processing", "data": { "nextExpected": "2026-10-26T11:05:00.000Z", "status": "UP" } }
Errors
  • 404No monitor has that token.
GET/ping/:token/:signal
Scope: token in the URL
Report how the job went: when it started, that it failed, or its exit code.

A failure takes the monitor down at once, with “Job failed with exit code N”, rather than waiting for the deadline.

Path parameters
token
stringrequired
The monitor's pingToken.
signal
stringrequired
start — it started (the next ping is timed against this); fail — it failed; success — it succeeded; or an exit code 0–255, where 0 is success.
Request
curl -fsS "https://api.zharp.io/api/v1/ping/m_8f2c41d09ab3e5f7/start"
./backup.sh
curl -fsS "https://api.zharp.io/api/v1/ping/m_8f2c41d09ab3e5f7/$?"
Response
{ "message": "Heartbeat received and queued for processing", "data": { "nextExpected": "…", "status": "DOWN" } }
Errors
  • 400Not one of those signals.
  • 404No monitor has that token.
POST/push/:token
Scope: token in the URL
Send data to a push monitor (CUSTOM with customMode: "push"). Its trigger rules run on the data straight away and may take it down or bring it back up. Its address uses metadata.pushToken.

A paused monitor answers 200 with "status": "PAUSED" and evaluates nothing. With expectedDataWindow set, data that stops arriving counts as a failure.

Path parameters
token
stringrequired
The monitor's pushToken.
Body (JSON)
(any JSON)
object
Whatever your trigger rules read — up to 10 MB.
Request
curl -X POST "https://api.zharp.io/api/v1/push/m_51c0be7a2d94f816" \
  -H "Content-Type: application/json" \
  -d '{ "queueDepth": 1240, "workers": 3 }'
Response
{ "message": "Payload received and evaluated", "data": { "status": "DOWN", "firedTriggers": [ … ] } }
Errors
  • 404No push monitor has that token.

Monitor groups

GET/monitor-groups
Scope: read
The workspace's groups in display order, with how many monitors each holds.
Request
curl "https://api.zharp.io/api/v1/monitor-groups" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{
  "message": "Monitor groups retrieved successfully",
  "data": [{ "id": 3, "workspaceId": 3, "name": "Production", "description": "Customer-facing", "order": 0, "createdAt": "…", "updatedAt": "…", "_count": { "monitors": 8 } }]
}
POST/monitor-groups
Scope: adminPermission: resources:manage
Create a group. Put monitors in it with their groupId.
Body (JSON)
name
stringrequired
1–100 characters.
description
string
Up to 255 characters.
order
integer
Its position, from 0. Default 0.
Request
curl -X POST "https://api.zharp.io/api/v1/monitor-groups" \
  -H "Authorization: Bearer $ZHARP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production",
    "description": "Customer-facing"
  }'
Response
{ "message": "Monitor group created successfully", "data": { "id": 3, "name": "Production", … } }
Errors
  • 400A field fails validation, or an unknown field.
PUT/monitor-groups/:id
Scope: adminPermission: resources:manage
Rename a group, or change its description or position. The same fields as creating one.
Path parameters
id
integerrequired
The group's id.
Request
curl -X PUT "https://api.zharp.io/api/v1/monitor-groups/3" \
  -H "Authorization: Bearer $ZHARP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Prod"
  }'
Response
{ "message": "Monitor group updated successfully", "data": { "id": 3, "name": "Prod", … } }
Errors
  • 404No such group in this workspace.
POST/monitor-groups/reorder
Scope: adminPermission: resources:manage
Put the groups in this order. Ids from another workspace are ignored.
Body (JSON)
groupIds
integer[]required
The groups, first to last.
Request
curl -X POST "https://api.zharp.io/api/v1/monitor-groups/reorder" \
  -H "Authorization: Bearer $ZHARP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "groupIds": [
      5,
      3,
      9
    ]
  }'
Response
{ "message": "Monitor groups reordered", "data": null }
Errors
  • 400groupIds isn't a list of ids.
DELETE/monitor-groups/:id
Scope: adminPermission: resources:manage
Delete a group. Its monitors stay, ungrouped.
Path parameters
id
integerrequired
The group's id.
Request
curl -X DELETE "https://api.zharp.io/api/v1/monitor-groups/3" \
  -H "Authorization: Bearer $ZHARP_API_KEY"
Response
{ "message": "Monitor group deleted successfully", "data": null }
Errors
  • 404No such group in this workspace.

Related