public.servers.systemServices
const url = 'https://rest.watchtower15.com/v1/servers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/system-services?include_total=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://rest.watchtower15.com/v1/servers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/system-services?include_total=true' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”ServersSystemServicesResource
object
object
The systemd unit’s name, e.g. nginx.service.
Systemd’s LoadState.
Systemd’s ActiveState.
Systemd’s SubState.
Systemd’s UnitFileState.
Whether the unit is monitored: only a monitored unit has alarms and store figures.
One of unknown, healthy, warning, critical.
Restarts in the range; null where the store has none.
Memory in bytes; null where the store has none.
The latest CPU as a percentage of one core, two decimals; null where not reported (not running, CPU accounting off, an older agent).
Epoch milliseconds: since when a monitored unit has been missing from the last complete inventory.
The whole list’s size; present only with include_total=true.
object
systemd, systemd_no_bus, unsupported, disabled, or null for an agent without the collector.
Example generated
{ "data": [ { "uuid": "example", "unit_name": "example", "description": "example", "load_state": "example", "active_state": "example", "sub_state": "example", "unit_file_state": "example", "monitored": true, "health_status": "example", "restarts": 1, "memory_bytes": 1, "cpu_percent": 1, "state_changed_at": 1, "first_seen_at": 1, "missing_since": 1 } ], "next_cursor": "example", "total": 1, "meta": { "service_manager": "example", "reported_at": 1 }}The API key is missing, malformed, expired or revoked.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}The key or its owner does not hold what the operation needs.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}No such record in this organisation (an absent id and another organisation’s answer alike).
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}The request is invalid; errors names the parameters.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}A rate limit or the organisation’s daily limit is reached; Retry-After says when to retry.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}An unexpected error.
object
https://docs.watchtower15.com/api/errors/<code>/
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "code": "example", "detail": "example", "request_id": "example", "errors": { "additionalProperty": [ "example" ] }, "limit": 1, "used": 1}