SG SealGrid Athena Docs

API Reference

Anything you can do in the console is available over a JWT-authenticated REST API on port 8443. Responses follow a consistent envelope, and an interactive Swagger explorer is built in.

Authentication#

Authenticate by posting credentials to api/auth/login. A successful call returns a JWT bearer token with a 15-minute expiry. Send it as Authorization: Bearer <token> on every subsequent request.

# POST api/auth/login
{ "username": "admin", "password": "<your-password>" }

The api/auth/login endpoint authenticates against both the Local user store and a configured LDAP/Active Directory directory — the server selects the provider and returns which one authenticated in the response. Configure directory login and group-to-role mapping under api/settings/ldap; see LDAP / Active Directory Integration. A third provider, Keycloak (OIDC), is handled by a separate set of endpoints (below).

The auth endpoints also expose:

EndpointPurpose
POST api/auth/loginExchange username + password for a JWT bearer token (Local or LDAP)
GET api/auth/meReturn the current token's identity
POST api/auth/change-passwordChange the signed-in user's password
POST api/auth/logoutEnd the current session

Keycloak SSO (OIDC)#

When OIDC is enabled on the server, Athena supports Keycloak single sign-on. Browser clients use the authorization-code + PKCE flow (logincallback); headless clients such as the PowerShell module use the device-code grant and exchange the resulting Keycloak access token at device-token, which returns the same JWT bearer session as a password login. All OIDC logins are provisioned just-in-time and audited under the Keycloak provider.

EndpointPurpose
GET api/auth/oidc/loginBegin the browser OIDC login (redirects to Keycloak with PKCE)
GET api/auth/oidc/callbackComplete the browser OIDC login and mint the session
POST api/auth/oidc/device-tokenExchange a Keycloak device-code access token for a JWT bearer session (headless/CLI)
GET api/auth/oidc/logoutEnd the session and, when configured, propagate logout to Keycloak

For the PowerShell equivalent, see Connect-Athena -Keycloak.

A complete PowerShell round-trip — sign in, capture the token, then call a protected endpoint:

# 1. Sign in (self-signed cert -> -SkipCertificateCheck)
$login = Invoke-RestMethod -Method Post -SkipCertificateCheck `
  -Uri "https://<host>:8443/api/auth/login" `
  -ContentType "application/json" `
  -Body (@{ username = "admin"; password = "<your-password>" } | ConvertTo-Json)

# 2. Pull the bearer token out of the response envelope
$token = $login.data.token

# 3. Call a protected endpoint with the Bearer header
Invoke-RestMethod -SkipCertificateCheck `
  -Uri "https://<host>:8443/api/Agents" `
  -Headers @{ Authorization = "Bearer $token" }

The -SkipCertificateCheck flag requires PowerShell 7+. It tells Invoke-RestMethod to trust Athena's self-signed certificate; drop it once you have installed a trusted certificate.

Response shape#

Every endpoint returns the same ApiResponse<T> envelope: a success boolean, a human-readable message string, and a data field carrying the payload.

{
  "success": true,
  "message": "Login successful",
  "data": {
    "token": "eyJhbGciOiJ..."
  }
}

Swagger / OpenAPI#

An interactive OpenAPI explorer is built into the server. Enable it with the Swagger:Enabled setting; it is served at the api-docs route prefix:

https://<host>:8443/api-docs

The explorer is published under the title Athena Deploy Center API and lists every endpoint and model described on this page, so you can try calls directly from the browser.

The raw OpenAPI document is served at /swagger/v1/swagger.json, which you can feed to a client generator.

Not seeing the explorer?#

If https://<host>:8443/api-docs returns nothing (a blank page, a 404, or the SPA instead of the Swagger UI), it is almost always because Swagger is disabled on that server. The explorer is opt-in: when Swagger:Enabled is not set, it defaults to off, and neither the UI nor the JSON spec is registered. Work through these checks:

Once enabled, the UI loads at the route prefix and the spec at /swagger/v1/swagger.json; use the Authorize button to supply your JWT bearer token before trying calls.

Health#

Health endpoints let a monitoring system or script watch the server. The liveness paths answer anonymously with the overall status only; the detail paths return a per-component breakdown (database, certificate authority, audit trail, disk space). See Server Health & Monitoring for the full report, statuses, thresholds, and the Docker healthcheck.

EndpointAuthPurpose
GET /healthAnonymousLightweight liveness probe — used by the Docker healthcheck
GET api/HealthAnonymousOverall status and a timestamp
GET api/Health/detailsSigned-in userFull per-component health report
GET /health/detailsOperator/AdminDetailed report with per-component status and run duration

Endpoint groups#

The API is organized into endpoint groups, each rooted at a base route:

GroupBase routeDescription
Authapi/AuthLogin, logout, identity, and password changes
Agentsapi/AgentsEnrolled endpoints and their status
Maintenanceapi/agents/{id}/maintenance/*, api/agents/maintenance/*Hold agents back from commands and deployments (enable/disable per agent or in bulk)
AgentMigrationapi/agent-migrationMove agents from one Athena server to another (Mint / Paste)
Inventoryapi/agents/{id}/inventoryHardware and software inventory for an agent
Commandsapi/CommandsRemote commands queued to agents
DeploymentPackagesapi/deployment-packagesUploaded software packages
Packagesapi/packagesPackage library — store large installer files with SHA-256 integrity and time-limited download links
Deploymentsapi/DeploymentsPackage rollouts to agents and collections
Collectionsapi/CollectionsGroupings of agents for targeting (static & dynamic)
Schedulerapi/SchedulerScheduled jobs and maintenance tasks
Credentialsapi/CredentialsCredential Vault — stored Local/Domain accounts for run-as
Tokensapi/TokensAgent registration tokens (create, revoke, delete)
Pkiapi/PkiRoot CA and issued agent certificates
Auditapi/AuditAudit log records (see Audit & SIEM)
Settingsapi/SettingsServer configuration values, including security settings (session, lockout, password policy) and database backup & maintenance (Admin only)
Directory (LDAP)api/settings/ldapLDAP / Active Directory login config, group-to-role mappings, and test-connection (Admin only)
Updates / WSUSapi/updatesWindows Update scanning (WSUS offline catalog)
Complianceapi/complianceCompliance state across the fleet
Reportsapi/reportsReport builder, saved reports, and built-in reports
RustDeskapi/agents/{id}/rustdesk, api/rustdeskOptional RustDesk remote access: install, password set/rotate, and fleet apply
RemoteDiagnosticsapi/agents/{id}/remote-diagnosticsPer-agent screen-share diagnostics: helper version, last session, and a live relay-reachability probe
Unattended accessapi/agents/{id}/unattendedDesignate a machine for unattended screen-share so sessions skip the on-screen consent prompt (Operator/Admin)
Relay provisioningapi/agents/{id}/provision-relayStand up a coturn TURN relay for WebRTC screen-share on a Linux agent (Admin only)
Recordingsapi/recordingsSession recordings — list, replay, download, delete
Emergencyapi/EmergencyBreak-glass account recovery (localhost only)
Usersapi/usersConsole user accounts — create, update, delete, reset passwords (Admin only)
Healthapi/HealthServer health & monitoring — liveness probe and detailed component report

The API uses the same role policies as the console (see Roles & Permissions). A token's role determines which endpoints succeed — calls outside the role's permissions are rejected.