# WatchTower15 REST API

WatchTower15 REST API, version `1.0.0+sha.7d61644b8985`.

The WatchTower15 REST API lets a program read and act on an organisation’s monitoring data: servers, domains, services, databases, logs, custom metrics, alarms, incidents and scans.

**Authentication.** Every request carries an API key in the `Authorization` header: `Authorization: Bearer wt15ak_…`. A key belongs to one organisation and holds scopes; each operation lists the scopes it needs in `x-wt15-scopes`. See [Authentication](https://docs.watchtower15.com/api/authentication/).

**This document.** This document is at [https://developer.watchtower15.com/openapi/v1.json](https://developer.watchtower15.com/openapi/v1.json) and, on the API host and without a key, at [https://rest.watchtower15.com/v1/openapi.json](https://rest.watchtower15.com/v1/openapi.json). Every answer names it in a `Link` header (`rel="service-desc"`), beside the index of the Markdown reference, [https://developer.watchtower15.com/llms.txt](https://developer.watchtower15.com/llms.txt) (`rel="service-doc"`). An operation ignores a query parameter it does not list; the reference lists every one it takes. A parameter that takes several values is sent repeated (`status=open&status=resolved`), as one value (`status=open`) or with brackets (`status[]=open&status[]=resolved`): the three read the same.

**Errors.** A failure is an `application/problem+json` document with a stable `code`. See [Errors](https://docs.watchtower15.com/api/errors/).

**Pagination.** A list answers one page, `{"data": […], "current_page": …, "per_page": …, "last_page": …, "total": …}`; send `page` for another. Log search, a custom metric’s samples and a service’s results and runs page by time instead: send their `next_cursor` back as `cursor`. See [Pagination](https://docs.watchtower15.com/api/pagination/).

**Times.** Every instant is an integer, epoch milliseconds, UTC. A time window is a relative `period` or a pinned `from` and `to`. See [Times and windows](https://docs.watchtower15.com/api/times-and-windows/).

**Rate limits.** See [Rate limits](https://docs.watchtower15.com/api/rate-limits/).

**Writes.** An operation that changes data accepts an optional `Idempotency-Key` header: repeating the same key with the same body repeats the first answer.

**Stability.** Once launched, `/v1` only grows: no operation, field or enum value is removed. Every enum is open, so a client must tolerate a value it does not know. The one removal since the launch was the owner’s decision: the page lists’ `cursor` and `next_cursor`, replaced by `page` and their page fields. See [Versioning](https://docs.watchtower15.com/api/versioning/).

**Marks for generators.** Beside the standard fields, operations and schemas carry five marks: `x-wt15-open-enum` (an enum a client must keep open), `x-wt15-instant` (an integer holding epoch milliseconds), `x-wt15-paged` (a paged list: by `page` when its answer has `current_page`, by `cursor` when it has `next_cursor`), `x-wt15-scopes` (the scopes the key needs) and `x-wt15-idempotent` (the operation honours `Idempotency-Key`).

## Resources

- [Alarm channels](https://developer.watchtower15.com/api/reference/alarm-channels/): Alarm channels: the Slack, Microsoft Teams and webhook destinations alarms notify; their destinations are write-only. (6 operations)
- [Alarm policies](https://developer.watchtower15.com/api/reference/alarm-policies/): Alarm policies: who and which channels an alarm notifies. (5 operations)
- [Alarms](https://developer.watchtower15.com/api/reference/alarms/): Alarm rules and the alarms they raised. (5 operations)
- [Alarm rules](https://developer.watchtower15.com/api/reference/alarm-rules/): The alarm catalogue: the rules an alarm can be based on, with their defaults. (1 operation)
- [Audit actions](https://developer.watchtower15.com/api/reference/audit-actions/): The organisation's audit trail: who did what to which resource, and when. (1 operation)
- [Audit actors](https://developer.watchtower15.com/api/reference/audit-actors/): The members and service accounts that can appear as the actor of an audit action. (1 operation)
- [Audit categories](https://developer.watchtower15.com/api/reference/audit-categories/): The audit categories an audit action falls in, to filter the audit trail by. (1 operation)
- [Custom metrics](https://developer.watchtower15.com/api/reference/custom-metrics/): Custom metrics the organisation sends itself: their definitions, series and limits. (11 operations)
- [Databases](https://developer.watchtower15.com/api/reference/databases/): Monitored databases: collectors, queries, findings, storage and the advice drawn from them. (26 operations)
- [Domains](https://developer.watchtower15.com/api/reference/domains/): Monitored domains: expiry, certificate, DNS, reachability and uptime, and the verification of ownership. (12 operations)
- [Health](https://developer.watchtower15.com/api/reference/health/): The organisation's health at a glance: a summary and a map of what needs attention. (2 operations)
- [Incidents](https://developer.watchtower15.com/api/reference/incidents/): Incidents: what went wrong, its timeline and how to act on it. (4 operations)
- [Log sources](https://developer.watchtower15.com/api/reference/log-sources/): The sources that send logs: their tokens, their settings and what they have sent. (7 operations)
- [Logs](https://developer.watchtower15.com/api/reference/logs/): Search, count and facet the organisation's collected log lines over a time window. (6 operations)
- [Me](https://developer.watchtower15.com/api/reference/me/): The key making the request and the organisation it belongs to. (1 operation)
- [Metric sources](https://developer.watchtower15.com/api/reference/metric-sources/): The sources that send custom metrics: their tokens, their settings and the tags they apply. (10 operations)
- [Organisation](https://developer.watchtower15.com/api/reference/organisation/): The organisation the key acts in: its account type, its limits and what is used, and, for a key that may see billing, its billing details. (2 operations)
- [Scans](https://developer.watchtower15.com/api/reference/scans/): Scans: the checks run on domains and servers, their results and their changes over time. (1 operation)
- [Security images](https://developer.watchtower15.com/api/reference/security-images/): Container images running on the organisation's servers, with the servers that run them and the vulnerabilities found in them. (1 operation)
- [Server profiles](https://developer.watchtower15.com/api/reference/server-profiles/): Reusable server profiles: the checks and thresholds a group of servers share. (17 operations)
- [Servers](https://developer.watchtower15.com/api/reference/servers/): Monitored servers: their state, metrics, processes, services, packages, security findings and the settings the agent reports against. (37 operations)
- [Services](https://developer.watchtower15.com/api/reference/services/): Monitored services: HTTP, TCP and API checks, their results, their scans and the parameters a check takes. (26 operations)
- [Tag groups](https://developer.watchtower15.com/api/reference/tag-groups/): Tag groups: sets of tags that apply together. (5 operations)
- [Tags](https://developer.watchtower15.com/api/reference/tags/): Tags: labels to group monitored resources. (5 operations)
- [Your AI clients](https://developer.watchtower15.com/api/reference/user-ai-clients/): The calling user's own AI-client connections in the key's organisation: status, access and today's calls. (1 operation)
- [Your API keys](https://developer.watchtower15.com/api/reference/user-api-keys/): The calling user's own API keys in the key's organisation: status, scopes and today's calls. (1 operation)

**The document**

- Server: https://rest.watchtower15.com/v1
- OpenAPI: 3.1.2
- Fingerprint: 1.0.0+sha.7d61644b8985
- Download: https://developer.watchtower15.com/openapi/v1.json
- On the API host: https://rest.watchtower15.com/v1/openapi.json

Source: https://developer.watchtower15.com/api/reference/
