On this page
Basics#
bash
curl -H "Authorization: Bearer $PRINCIPAL_TOKEN" \
https://principal.example.com/api/v2/targets| Topic | Rule |
|---|---|
Base URL |
https://<host>/api/v2 |
Format |
JSON. Errors use application/problem+json (Errors). |
Auth |
|
Org |
Token’s org, or X-Organization-ID for sessions. |
OpenAPI |
/openapi.yaml and /api-docs (signed-in users). |
Conventions |
Console vs API names#
| Console | API |
|---|---|
Rule |
policy (/policies) |
Template |
access template (/access-templates) |
Person, group |
identity (/identities, kind: user, group) |
Service account |
identity (kind: user, service_account: true). Adopted non-person: kind: service |
Target |
target (/targets). MySQL/MariaDB: kind: mysql |
Drift difference |
finding |
Activity operation |
job |
Operation groups#
Identities, rules, templates, plans, applies, grants, profiles.
Targets, connectors, SSH tunnels and keys.
Drift, audit, notifications, dashboard, jobs, events.
Session, MFA, API tokens, orgs, memberships, admin.