How to use the API
AnomalyGuard exposes a versioned REST API under /api/v1/…. Use it from automation, integrations, CI/CD, AI agents, or the CLI (which maps one-to-one to API operations).
OpenAPI / Swagger
Interactive API documentation is available in Swagger UI when enabled for the environment.
Open it from the app settings menu (admin) → API docs (Swagger) when Swagger is enabled for the environment, or go directly to:
<base-url>/swagger

Swagger lists every controller and operation. Expand an endpoint to see parameters, request/response schemas, and try calls with Authorize (Bearer or API key, depending on how your deployment is configured).

For deeper, topic-specific examples, use the linked User Guide pages below. Swagger remains the live contract for paths and payloads.
Authentication
| Method | How |
|---|---|
| Bearer token | Microsoft Entra ID access token for the app registration |
| API key | X-API-Key header — see API Keys |
Interactive browser sessions use cookies; API clients should use Bearer or API keys.
What you can do with the API
| Capability | Typical use | Guide |
|---|---|---|
| Connectors | Create/update encrypted DB connections, test connectivity | Connectors |
| Data views lifecycle | Create/update definitions, deploy/undeploy, enable/disable, clean deployment | Data Views |
| Loads & analytics jobs | Enqueue load, custom load, process; clear queued jobs; orchestration aliases under /api/v1/jobs/… |
Data Views, Monitoring |
| Monitoring / status | List or read data-view health (tasks, load date, anomalies count) | Monitoring |
| Anomaly results | Query anomalies and aggregates, equal/similar, series data behind an anomaly | (table below) |
| Saved filters | CRUD filters, pin/share, LLM summarization refresh | Filters |
| Comments | Read/create operational notes tied to data views and category scopes | Comments |
| Users & access | List users, assign data views; me/dataviews and me/dataviews/status |
Users |
| API keys | Create, list, regenerate secret, delete keys for non-interactive clients | API Keys |
| License | Inspect plan limits and usage | License |
| Settings | Read/update LLM summarization configuration (admin) | Special settings |
| Health | Liveness and API reachability checks | (below) |
Common endpoint groups
| Area | Base path | Notes |
|---|---|---|
| Data views | /api/v1/dataviews |
CRUD, deploy, enable/disable, clean, jobs, status, categories |
| Jobs (alias) | /api/v1/jobs/{domain}/{name}/… |
load, process, custom-load for orchestration |
| Connectors | /api/v1/connectors |
Admin — list, get, create, update, delete, test |
| Anomaly filters | /api/v1/anomaly-filters |
Saved filters, pin/share, summarization |
| Anomalies | /api/v1/anomalies |
Query, aggregates, similar, series |
| Comments | /api/v1/comments |
Read for data users; write for admins via REST |
| Access | /api/v1/access |
Users, data view assignments, me/… |
| System | /api/v1/system |
License, API keys |
| Settings | /api/v1/settings |
Admin application settings (LLM) |
Data views & jobs (summary)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/dataviews |
List (?name=, ?domain=, ?tag=) |
| GET | /api/v1/dataviews/lite |
Lite list for current user |
| GET | /api/v1/dataviews/{id} |
Full definition |
| GET | /api/v1/dataviews/{id}/status |
Processing / monitoring status |
| POST | /api/v1/dataviews |
Create (admin) |
| PUT | /api/v1/dataviews/{id} |
Update (admin) |
| DELETE | /api/v1/dataviews/{id} |
Delete (admin) |
| POST | /api/v1/dataviews/{id}/deploy |
Deploy |
| POST | /api/v1/dataviews/{id}/undeploy |
Remove deployment |
| POST | /api/v1/dataviews/{id}/clean |
Clean deployment data |
| POST | /api/v1/dataviews/{id}/enable |
Enable |
| POST | /api/v1/dataviews/{id}/disable |
Disable |
| POST | /api/v1/dataviews/{id}/jobs/load |
Enqueue load |
| POST | /api/v1/dataviews/{id}/jobs/process |
Enqueue analytics |
| POST | /api/v1/dataviews/{id}/jobs/custom-load |
Enqueue custom load |
| POST | /api/v1/dataviews/{id}/jobs/clear |
Clear queued jobs |
| POST | /api/v1/jobs/{domain}/{name}/load |
Orchestration alias — load |
Anomalies (results)
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/anomalies |
Query anomalies by filter body |
| POST | /api/v1/anomalies/filter-results |
Load filter result rows |
| GET | /api/v1/anomalies/by-filter/{filterId} |
Anomalies for a saved filter |
| POST | /api/v1/anomalies/aggregates |
Aggregates by filter body |
| GET | /api/v1/anomalies/aggregates/by-filter/{filterId} |
Aggregates for a saved filter |
| GET | /api/v1/anomalies/aggregates/by-filter/{filterId}/{mode} |
Aggregates with mode |
| GET | /api/v1/anomalies/{id}/equal |
Equal anomalies |
| GET | /api/v1/anomalies/{id}/similar |
Similar anomalies |
| GET | /api/v1/anomalies/{id}/series-data |
Underlying series records |
Access & monitoring helpers
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/access/me/dataviews |
Deployed data views for current identity |
| GET | /api/v1/access/me/dataviews/status |
Status list (Monitoring equivalent) |
| GET | /api/v1/access/users |
List users and assigned data view IDs (admin) |
| PUT | /api/v1/access/users/{userId}/dataviews |
Set data view access (admin) |
Health
| Method | Path | Description |
|---|---|---|
| GET | /health |
Liveness |
| GET | /api/v1/ping |
API reachability (when public API is enabled) |
Public API gate
If AppSettings:PublicApiEnabled is false, REST /api/* calls are rejected. Enable it in deployment configuration when clients need the API.
Rate limiting
Optional ApiRateLimiting settings throttle /api/* per client when enabled at deploy time.