API
Watcher API
This API allows to query the state of the watchers.
This API allows to query the state of the watchers.
Get all Watchers
This operation lets you get all the configured watchers.
curl http://drydock:3000/api/v1/watchers
{
"data": [
{
"id":"docker.local",
"type":"docker",
"name":"local",
"configuration":{
"socket":"/var/run/docker.sock",
"port":2375,
"cron":"0 * * * *",
"watchbydefault":true
},
"metadata": {
"lastRunAt": "2026-03-20T21:44:11.782Z"
}
}
],
"total": 1,
"limit": 0,
"offset": 0,
"hasMore": false
}Response fields
| Field | Type | Description |
|---|---|---|
id | string | Fully qualified watcher ID (for example docker.local) |
type | string | Watcher provider type |
name | string | Watcher name |
configuration | object | Watcher configuration (masked/safe for API output) |
agent | string | undefined | Agent name when watcher is agent-scoped |
metadata.lastRunAt | string | undefined | ISO-8601 timestamp of the most recent completed watch cycle |
metadata.lastRunAt is populated after at least one watch run has completed.
Get a Watcher by id
This operation lets you get a specific Watcher.
curl http://drydock:3000/api/v1/watchers/docker/local
{
"id":"docker.local",
"type":"docker",
"name":"local",
"configuration":{
"socket":"/var/run/docker.sock",
"port":2375,
"cron":"0 * * * *",
"watchbydefault":true
},
"metadata":{
"lastRunAt":"2026-03-20T21:44:11.782Z"
}
}Agent-scoped lookup
To fetch a watcher registered on a specific agent, append the agent name:
curl http://drydock:3000/api/v1/watchers/docker/local/agent1