URL Monitoringv7.0.20
Manage the appliance’s website monitors — each a URL fetched on a fixed interval and a pattern it expects to find — recording latency, HTTP status, SSL certificate expiry, and match/no-match on every check.
A URL tracker names three things — the URL, the check interval, and a text pattern the response should contain. Every check records latency, HTTP status, the SSL certificate expiry date, and whether the pattern matched; that history feeds the URL tracker report under Reports (GET /api/urlTracker).
These endpoints belong to the urls functional area. Note that there is no dedicated mcp:urls token scope — URL monitoring is reached through the broader mcp:tools scope on an MCP or OAuth token, and the calling user needs the urls Laravel permission shown on each block.
urls is an operator-level permission with no tag anchor, so URL monitoring is intentionally not tag-scoped: a user with the urls permission sees and manages every URL tracker on the appliance, regardless of any tag restriction that would narrow their device visibility. URL monitors are not tied to a device, so there is nothing to scope them against.
Error envelope. These endpoints return HTTP 200 even on failure and signal the outcome in the body: {"status":false,"hasError":true,"message":"…"} on error. Each block below shows the success envelope.
URL trackers
List URL trackers
GET/api/getUrlsurls
Returns every URL tracker with its configuration, the latest check result (latency, status, message, certificate expiry), and any alert triggers attached to it. This is the read used by the URL monitoring management page.
Response 200
data is an array of trackers; alerts is null when no alert trigger is attached.
{
"status": 201,
"data": [
{
"id": 1,
"url": "https://example.com",
"interval": 300,
"pattern": "Welcome",
"timestamp": 1749945600,
"latency": 142,
"message": "OK",
"status": 200,
"ssldate": "2026-09-01",
"alerts": null
}
]
}
Example
curl -sS https://APPLIANCE/api/getUrls \
-H "Authorization: Bearer $TOKEN"
Create or update a URL tracker
POST/api/saveUrlurls
Creates a new URL tracker, or updates an existing one when the nested object carries an id. The check interval, target URL, and expected pattern are persisted; the appliance begins (or resumes) polling on its next cycle.
Request body
The tracker fields are nested under a newtracker object.
| Field | Type | Required | Notes |
|---|---|---|---|
newtracker.url | string | yes | The URL to monitor. Scheme must be http:// or https:// — any other scheme is rejected. Internal/RFC1918 hosts are allowed. |
newtracker.pattern | string | yes | Text expected in the response body; a check fails if the pattern is absent. |
newtracker.interval | integer | no | Seconds between checks. Defaults to 300. |
newtracker.id | integer | no | Provide to update an existing tracker; omit to create a new one. |
Response 201
The saved tracker row is echoed back under message.
{
"status": 201,
"message": { "id": 1, "url": "https://example.com", "pattern": "Welcome", "interval": 300 }
}
Errors
| Status | Body | When |
|---|---|---|
200 | {"status":false,"hasError":true,"message":"Pattern and URL required"} | url or pattern missing from newtracker. |
200 | {"status":false,"hasError":true,"message":"URL scheme must be http:// or https:// — got '…://'"} | A non-HTTP(S) scheme was supplied. |
Example
curl -sS -X POST https://APPLIANCE/api/saveUrl \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"newtracker":{"url":"https://example.com","pattern":"Welcome","interval":300}}'
Delete a URL tracker
POST/api/deleteUrlurls
Removes a URL tracker. Polling stops; its check history is no longer collected.
This permanently deletes the URL tracker.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
id | integer | yes | urls.id of the tracker to delete. |
Response 200
{ "status": 200, "message": "URL deleted successfully" }
A missing id, or an id that doesn’t exist, returns {"status":false,"hasError":true,"message":"…"} (HTTP 200).
List all URL trackers (report picker)
GET/api/getAllUrlsurls
Returns the full list of URL trackers as a flat catalog, used to populate the URL picker on the URL tracker report form. Compared with getUrls, this is a bare dump of the urls rows with no per-tracker alert join.
Response 200
{
"status": 201,
"hasError": false,
"message": {
"data": [
{ "id": 1, "url": "https://example.com", "pattern": "Welcome", "interval": 300, "status": 200 }
]
}
}