Skip to main content

REST API Reference

All endpoints are served over HTTPS at /api/v1/. Authenticated endpoints require Authorization: Bearer <token>.

Token types: API tokens (arc_ prefix, persistent), JWT tokens (24h, from login), SSO tokens (from OIDC/SAML/LDAP callback).

Error Format

{
"error": {
"code": "not_found",
"message": "realm not found -- list realms with: arcan realm list",
"status": 404
}
}

Pagination

Cursor-based pagination (never offset):

{
"data": [],
"next_cursor": "abc123",
"has_more": true
}

Endpoints

Health

MethodPathAuthDescription
GET/api/v1/healthNoServer status, version, component health

Auth

MethodPathAuthDescription
POST/api/v1/auth/registerNoCreate user account (email, password, name)
POST/api/v1/auth/loginNoLogin with email/password, returns JWT
GET/api/v1/auth/providersNoList configured SSO providers

SSO

MethodPathAuthDescription
GET/api/v1/auth/oidc/{provider}/loginNoInitiate OIDC login (302 redirect)
GET/api/v1/auth/oidc/{provider}/callbackNoOIDC callback, returns JWT
GET/api/v1/auth/saml/{provider}/loginNoInitiate SAML login (302 redirect)
POST/api/v1/auth/saml/{provider}/acsNoSAML assertion consumer service
GET/api/v1/auth/saml/{provider}/metadataNoSAML SP metadata XML
POST/api/v1/auth/ldap/{provider}/loginNoLDAP login (username/password)

Tokens

MethodPathAuthDescription
POST/api/v1/auth/tokensYesCreate API token (name, scopes)
GET/api/v1/auth/tokensYesList API tokens
DELETE/api/v1/auth/tokens/{id}YesRevoke a token

Realms

MethodPathAuthDescription
POST/api/v1/realmsYesCreate realm (slug, name)
GET/api/v1/realmsYesList all realms
GET/api/v1/realms/{slug}YesGet realm details
DELETE/api/v1/realms/{slug}Yes (admin)Soft-delete realm

Secrets

MethodPathAuthDescription
POST/api/v1/realms/{slug}/secretsYesStore a secret (key, value, environment)
GET/api/v1/realms/{slug}/secretsYesList secrets (filter by ?env=)
GET/api/v1/realms/{slug}/secrets/{key}YesGet a secret (filter by ?env=)
DELETE/api/v1/realms/{slug}/secrets/{key}YesDelete a secret (filter by ?env=)
POST/api/v1/encryptYesEncrypt a plaintext value

Engines

MethodPathAuthDescription
GET/api/v1/enginesYesList registered engine types
POST/api/v1/realms/{slug}/engines/{type}/generateYesGenerate a secret via engine
POST/api/v1/realms/{slug}/engines/{type}/validateYesValidate a secret via engine

Policy

MethodPathAuthDescription
GET/api/v1/policy/rolesYesList roles and capabilities
POST/api/v1/realms/{slug}/policy/bindingsYes (admin)Assign role to user
GET/api/v1/realms/{slug}/policy/bindingsYesList role bindings
DELETE/api/v1/realms/{slug}/policy/bindings/{userID}Yes (admin)Remove role binding

ESO (External Secrets Operator)

Simplified endpoints for the Kubernetes External Secrets Operator webhook provider. Returns only secret values (not full secret objects) so ESO can extract them with jsonPath: $.value.

Default environment is prod (not dev) since ESO typically targets production clusters.

MethodPathAuthDescription
GET/api/v1/eso/{realm}/{key}YesGet a single secret value
GET/api/v1/eso/{realm}YesBulk fetch all secrets in realm

Query parameters: ?env= (default prod)

Get single secret

GET /api/v1/eso/myapp/DATABASE_URL?env=prod
Authorization: Bearer arc_...

Response (200):

{"value": "postgres://user:pass@db:5432/myapp"}

Error (404):

{"error": "secret not found"}

Bulk fetch all secrets

GET /api/v1/eso/myapp?env=prod
Authorization: Bearer arc_...

Response (200):

{
"data": {
"DATABASE_URL": "postgres://user:pass@db:5432/myapp",
"API_KEY": "sk-abc123",
"REDIS_URL": "redis://cache:6379"
}
}

Empty realm returns {"data": {}}.

See External Secrets Operator Integration for Kubernetes setup.

Audit

MethodPathAuthDescription
GET/api/v1/audit/eventsYesQuery audit log (filter by realm, type, actor, limit)

Metrics

MethodPathAuthDescription
GET/metricsNoPrometheus metrics