/v1/keyWhich key this is, what it may do, and whose it is
Any valid key.
ClearWatch
Version 1 ยท https://api.clearwatch.com/v1
Read devices and issues, act on issues, and manage the webhooks ClearWatch sends issue events to.
Authenticate with an API key made under Settings, API keys: Authorization: Bearer cwk_.... A key belongs to an organization and reaches it and every organization below it that ClearWatch covers. It holds only the scopes it was given.
Webhooks: each delivery is a POST of one event envelope (schema Event), signed with the endpoint's secret in the ClearWatch-Signature header as t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256 over <t>.<raw body>. Reject a timestamp more than 300 seconds from your clock. During a secret rotation a second v1= signed with the previous secret is present for 24 hours; accept either. Answer 2xx to accept. Anything else is retried with backoff for 24 hours. Delivery is at least once and not in order: drop duplicates by event id and order by sequence.
https://api.clearwatch.com/v1curl -H "Authorization: Bearer cwk_..." https://api.clearwatch.com/v1/devices
/v1/keyWhich key this is, what it may do, and whose it is
Any valid key.
/v1/organizationsOrganizations in reach
Needs the watch:devices:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| cursor | query | string | The next_cursor of the previous page. |
| limit | query | integer | Default 50. |
Responses
/v1/organizations/{id}/custom-fieldsThe custom field values that apply to an organization, inherited or set there
Needs the watch:custom-fields:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/organizations/{id}/custom-fieldsSet, clear or lock custom field values on an organization; a field left out keeps its value
Needs the watch:custom-fields:write scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
Request body
Responses
/v1/locationsLocations in reach
Needs the watch:devices:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| organization_id | query | string | Narrow to one organization and those below it. |
| cursor | query | string | The next_cursor of the previous page. |
| limit | query | integer | Default 50. |
/v1/locations/{id}/custom-fieldsThe custom field values that apply to a location, inherited or set there
Needs the watch:custom-fields:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/locations/{id}/custom-fieldsSet, clear or lock custom field values on a location; a field left out keeps its value
Needs the watch:custom-fields:write scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
Request body
Responses
/v1/devicesManaged devices, most recently seen first
Needs the watch:devices:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| organization_id | query | string | Narrow to one organization and those below it. |
| location_id | query | string | Narrow to one location. Needs organization_id. |
| cursor | query | string | The next_cursor of the previous page. |
| limit | query | integer | Default 50. |
/v1/devices/{id}One device
Needs the watch:devices:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/devices/{id}/custom-fieldsThe custom field values that apply to a device, inherited or set there
Needs the watch:custom-fields:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/devices/{id}/custom-fieldsSet, clear or lock custom field values on a device; a field left out keeps its value
Needs the watch:custom-fields:write scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
Request body
Responses
/v1/issuesIssues, newest opened first
Needs the watch:issues:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| status | query | open | closed | all | Default open. |
| outcome | query | alert | attention | |
| device_id | query | string | |
| organization_id | query | string | Narrow to one organization and those below it. |
| location_id | query | string | Narrow to one location. Needs organization_id. |
| cursor | query | string | The next_cursor of the previous page. |
| limit | query | integer | Default 50. |
/v1/issues/{id}One issue
Needs the watch:issues:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/issues/{id}/eventsAn issue's timeline, oldest first
Needs the watch:issues:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
Responses
/v1/issues/{id}/acknowledgeAcknowledge an issue; stops escalation
Needs the watch:issues:write scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
Responses
/v1/issues/{id}/unacknowledgeTake an acknowledgment back
Needs the watch:issues:write scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
Responses
/v1/issues/{id}/notesAdd a note to an issue's timeline
Needs the watch:issues:write scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
Request body
/v1/issues/{id}/resolveResolve an open issue by hand (ClearPath keys only)
Needs the watch:issues:resolve scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
Request body
Responses
/v1/webhooksWebhooks in reach
Needs the watch:webhooks:read scope.
/v1/webhooksMake a webhook; the response carries its secret, once
Needs the watch:webhooks:write scope.
Request body (WebhookInput)
/v1/webhooks/{id}One webhook
Needs the watch:webhooks:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/webhooks/{id}Change a webhook; a field left out keeps its value
Needs the watch:webhooks:write scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
Request body (WebhookInput)
/v1/webhooks/{id}Delete a webhook and its log
Needs the watch:webhooks:write scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/webhooks/{id}/testSend a ping now and report the answer
Needs the watch:webhooks:write scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/webhooks/{id}/rotate-secretA new signing secret, returned once
Needs the watch:webhooks:write scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/webhooks/{id}/deliveriesRecent deliveries and attempts
Needs the watch:webhooks:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/ipam/subnetsTracked IPAM subnets and blocks in reach, with utilization and the next free address
Needs the watch:ipam:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| organization_id | query | string | Narrow to one organization and those below it. |
| location_id | query | string | Narrow to one location. Needs organization_id. |
| cursor | query | string | The next_cursor of the previous page. |
| limit | query | integer | Default 50. |
/v1/ipam/subnets/{id}/addressesEvery address seen in one subnet, with its status and every source that saw it
Needs the watch:ipam:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/ipam/reservationsOne subnet's reservations
Needs the watch:ipam:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| subnet_id * | query | string |
/v1/ipam/reservationsReserve an address or a range inside a subnet
Needs the watch:ipam:write scope.
Request body
/v1/ipam/reservations/{id}Remove a reservation
Needs the watch:ipam:write scope.
| Parameter | In | Type | About |
|---|---|---|---|
| id * | path | string |
/v1/ipam/vlansTracked VLANs in reach
Needs the watch:ipam:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| organization_id | query | string | Narrow to one organization and those below it. |
| location_id | query | string | Narrow to one location. Needs organization_id. |
| cursor | query | string | The next_cursor of the previous page. |
| limit | query | integer | Default 50. |
/v1/ipam/next-freeThe first free address in a subnet; does not reserve it
Needs the watch:ipam:read scope.
| Parameter | In | Type | About |
|---|---|---|---|
| subnet_id * | query | string |
/v1/custom-fieldsCustom field definitions in reach
Needs the watch:custom-fields:read scope.
watch:devices:read: Organizations, locations and devices, with their status and last check-in.
watch:issues:read: Open and closed issues (Alerts and Needs attention) and their timelines.
watch:issues:write: Acknowledge an issue, take an acknowledgment back, and add a note to its timeline.
watch:issues:resolve: Close an open issue with a reason. ClearPath keys only, as in the console.
watch:webhooks:read: Webhook endpoints and their delivery logs. Never a signing secret.
watch:webhooks:write: Create, change, test and delete webhook endpoints.
watch:custom-fields:read: Custom field definitions, and the values that apply to devices, locations and organizations. A secret reads as set or not set, never its value.
watch:custom-fields:write: Set, change, clear and lock custom field values on devices, locations and organizations, secrets included (write only).
watch:ipam:read: Tracked subnets and blocks, the addresses in a subnet with their status, reservations, VLANs and the next free address.
watch:ipam:write: Create and remove IPAM reservations, for a provisioning tool that takes the next free address.
watch:devices:read | watch:issues:read | watch:issues:write | watch:issues:resolve | watch:webhooks:read | watch:webhooks:write | watch:custom-fields:read | watch:custom-fields:write | watch:ipam:read | watch:ipam:write
agent or bridge (watched by a ClearBridge, no agent).alert is on the Alerts list; attention is Needs attention.warning or critical, now.issue.opened: An issue opened
issue.updated: An issue got worse or better while open
issue.acknowledged: Somebody said they are on it
issue.unacknowledged: An acknowledgment was taken back
issue.resolved: An issue closed (recovered, or resolved by hand)
issue.note_added: A note was added
issue.routed: A policy step sent the issue here
ping: A test from the Send test button