Skip to content

API reference

syncd has these programmable interfaces. This page describes syncd 0.6.1 (tag v0.6.1, commit 59cbf19). 0.5.5 adds GET /livez, makes GET /healthz answer 503 naming a background task that cannot work, pages the configuration versions (limit, before), holds the rule preview to designers, revokes an account's API tokens when its password is reset, and on the engine's control API refuses more commands while the engine is busy, caps listings at 10,000 entries and leaves secret values out of what callers below the configure tier read. 0.6.0 and 0.6.1 change no interface: 0.6.0's dsml connector is configured like any other.

Interface Served by Used by Authentication
Console REST API (/api/v1) syncd-console The console UI, scripts, pipelines The console's session cookie, or an API token
Audit pull API (GET /api/audit/events) syncd-console A SIEM collector An API token with audit:read, or an admin's or auditor's session
Engine control API (gRPC, syncd.v1.EngineControl) syncd The console, the syncd command line, the other engine of an HA pair Mutual TLS, or the loopback listener and the control socket; from 0.5.0 each caller has an access tier
Password ingest API (gRPC, syncd.v1.PasswordIngest) syncd, on passwords.ingest.listen Password capture agents Mutual TLS with the engine's agent CA, or a one-time token to enroll
Prometheus metrics (GET /metrics) syncd Prometheus None (plain HTTP)

The console also sends webhooks to other systems.

Console REST API

The OpenAPI document

The console serves an OpenAPI 3 document, generated from the server's code, at GET /api/openapi.json, without signing in. It describes every route below with its request and response schemas, and two security schemes: session (the cookie) and api_token (a bearer token). Each operation an API token may call names the scope it needs under api_token; operations without it take a session only. The UI's TypeScript types are generated from the document, and a console test fails when the committed copy (console/web/openapi.json in the source) no longer matches the server. Load it into your API client or code generator rather than copying paths from this page.

Authentication

From 0.4.0 the API takes either of:

  • An API token (Authorization: Bearer sdt_…), for scripts, pipelines and SIEM collectors. See API tokens.
  • The syncd_session cookie that signing in sets, for the browser.

A request with Authorization: Bearer is checked as a token request only: it never reads or sets the session cookie. From 0.5.1 a request made with the session cookie that changes something (POST, PUT, PATCH, DELETE) is refused (403 forbidden) when the browser says it comes from another site: a Sec-Fetch-Site other than same-origin or none, or, without that header, an Origin that is not the console's (Host, X-Forwarded-Host or CONSOLE_PUBLIC_URL). A script that sends neither header is not affected (see Security). Some endpoints stay with people (accounts, settings, tokens, webhooks, changes to environments, approvals of versions and of WebAssembly modules, simulations, previews, connector checks, the object explorer, scheduled reports, the license, the support bundle): a valid token there gets 403 insufficient_scope.

Role assignments and scopes

From 0.5.0 an account holds role assignments, each a role on everything, on one environment or on named engines (see Security). Every operation of the API is held to one rule, checked before its handler runs and before its body is read:

The operation is about Needs Examples
An engine (/api/v1/engines/{id}/...) The permission through an assignment that reaches the engine: on everything, on its environment, or on the engine Status, runs, approvals, configuration versions, publishing, the explorer, WebAssembly modules
An environment (/api/v1/environments/{name}) The permission on everything, or on that environment Reading its values (admin, auditor), changing them (admin)
The whole console The permission on everything Accounts, settings, the license, the support bundle, webhooks, Git sync, registering, moving and removing engines, verifying, pulling and exporting the audit trail
No engine in particular The permission in any scope; the handler then checks the engines the request names, or answers with what the caller reaches The engine list, environment names, scheduled reports, API tokens, the audit page, promotion, validating a text

An engine outside every assignment answers 404, in the same words as an id never used, and is in no list; what the caller's roles could not do on any engine is 403. In the tables below, a role means that role in a scope that reaches what the call is about, and "admin" on a console-wide call means admin on everything.

API tokens

Other systems call the console's API with a token instead of a session: a SIEM pulling the audit trail, a pipeline promoting configuration between environments, a monitoring script reading status. Administrators create and revoke tokens on Integrations (/integrations); auditors see the list.

Calling the API with a token

# The pull API for the audit trail (audit:read)
curl -H "Authorization: Bearer sdt_…" "https://syncd.example.com/api/audit/events?after=0&limit=1000"

# Engines and one engine's status (engines:read)
curl -H "Authorization: Bearer sdt_…" https://syncd.example.com/api/v1/engines
curl -H "Authorization: Bearer sdt_…" https://syncd.example.com/api/v1/engines/1/status

# Start a reconciliation (runs:run); returns when it is done
curl -X POST -H "Authorization: Bearer sdt_…" -H 'Content-Type: application/json' \
  --data '{"kind":"reconcile"}' https://syncd.example.com/api/v1/engines/1/runs

# Promote a published version to another environment (configs:publish)
curl -X POST -H "Authorization: Bearer sdt_…" -H 'Content-Type: application/json' \
  --data '{"engine":"dev","version":7,"to":"prod","ticket":"CHG-12345"}' \
  https://syncd.example.com/api/v1/configs/promote

syncd config promote dev/v7 --to prod --console https://syncd.example.com --token-file FILE makes the last call from the command line (see Configuration as code).

How tokens work

  • Created with a name, one or more scopes and, optionally, an expiry. The token (sdt_ and 43 characters: 32 random bytes, base64url) is shown once, in the response that creates it. The console keeps only its SHA-256 and its first four characters (for the list); the token is never written to a log, the audit trail or the session.
  • Limited, if wanted, to an environment or to engines (from 0.5.0): "environment": "test" (its engines, and its values) or "engines": ["hr-1", "hr-2"] (those engines, by name). A limited token does nothing on the console as a whole (no audit pull or export, no Git sync), and an engine outside its limit does not exist for it (404). The limit follows an engine's rename.
  • Never more than its creator, now. The creator must be an administrator of all the token reaches (everything, for a token without a limit), and each scope needs a role of the creator there (below), both to be granted and, at every use, to work. On every use the creator's account is read: an account that is gone or disabled refuses the token (401). Otherwise the token does no more than the creator's role assignments allow today, within its limit, so a demoted creator's token keeps its reads and loses its writes, and one whose creator was moved to another environment reaches nothing. A good answer is reused for a minute (and dropped when the account changes); a refusal never is.
  • A year at most. CONSOLE_API_MAX_TOKEN_LIFETIME (365d) is the expiry of a token created without one, the most that may be asked for, and the age at which any token stops working; 0 removes the limit.
  • A creator who signs in through single sign-on must keep doing so (from 0.5.1). Such a creator's token stops working (401) once they have not signed in for CONSOLE_API_SSO_CREATOR_MAX_IDLE (35d, counted from the token's creation at the earliest), and works again after their next sign-in. The identity provider decides who may use the console, and the console hears it only at a sign-in.
  • Refused (401, WWW-Authenticate: Bearer error="invalid_token") when unknown, revoked, past its expiry, when its creator is gone or disabled, from 0.5.1 when its single sign-on creator has not signed in for too long, or when CONSOLE_API_TOKENS_ENABLED is false.
  • Out of scope (403, WWW-Authenticate: Bearer error="insufficient_scope") for an endpoint its scopes do not cover, one its creator's role no longer allows, or one that stays with people. No token, whatever its scopes, can create or revoke tokens, manage accounts, settings, webhooks, environments, the license or scheduled reports, sign in by any method, approve a configuration or a WebAssembly module, simulate or preview a configuration, test connectors, use the object explorer, or download the support bundle. What a token saves or uploads is its creator's for four eyes (accountable): from 0.5.1 the creator cannot approve it.
  • Rate-limited per token: CONSOLE_API_REQUESTS_PER_MINUTE (300). Beyond it, 429 rate_limited with Retry-After (seconds). The count is kept in each console process, so with several console replicas each allows that many.
  • Audited: api.token-created, api.token-revoked, api.token-refused (at most once a minute per token, or per client address for a value that is no token at all), api.request for every request that changes something, and api.token-used once per token per hour for its reads. The actor is api-token:<id>, of type service.

Scopes

Scope Needs the creator to be Allows
engines:read any role The engines, their status, dead letters, quarantine, held changes, data quality, correlation suggestions, and the reconciliation report export
configs:read any role Configuration versions, the running configuration, diffs, exports, packages, the environments' names, the Git sync status, and from 0.5.0 the engine's WebAssembly modules (list, review, download)
configs:write designer or admin Validate and save a configuration version, import one, start a Git sync, and from 0.5.0 upload a WebAssembly module (not publish, not approve)
configs:publish designer or admin Publish a version, and promote one. Approval, when required, stays with people
runs:run operator or admin Start runs and drift checks, approve held deletions and changes, review groups, accept correlation suggestions, retry and discard dead letters, and from 0.5.0 check for unmanaged entries and adopt one
audit:read auditor or admin The audit log, its verification, the pull API, the export and the outputs' status
environments:read auditor or admin From 0.4.1: the environments with their plain values, the names of their secret ones, and their engines. Before 0.4.1 configs:read read them; a script that reads values with a configs:read token needs this scope now
admin admin Everything above

The tables below give each endpoint's scope in the Token column; — means session only.

Token settings

Variable Default Meaning
CONSOLE_API_TOKENS_ENABLED true false refuses every token (401) without deleting any
CONSOLE_API_MAX_TOKEN_LIFETIME 365d The longest a token lives (<n>d, <n>h); 0 removes the limit
CONSOLE_API_SSO_CREATOR_MAX_IDLE 35d From 0.5.1: how long a token of an account that signs in through single sign-on works after the account's last sign-in (<n>d, <n>h); 0 for as long as the token lives
CONSOLE_API_REQUESTS_PER_MINUTE 300 Per token; 0 turns the limit off

Token administration

Method Path Access Purpose
GET /api/v1/admin/api-tokens admin, auditor The tokens, newest first, without their values: name, prefix, scopes, limit (environment or engines), creator, created, expiry, last use, revoked. With the role on everything, all of them; else those limited to within what the role reaches
GET /api/v1/admin/api-tokens/scopes admin, auditor The scopes, what each allows and the role it needs
POST /api/v1/admin/api-tokens admin of all the token reaches (session only) Create: {"name", "scopes": [...], "expires_at", "environment" or "engines": [...]}; the answer holds the token, once
DELETE /api/v1/admin/api-tokens/{id} admin of all the token reaches (session only) Revoke; the next use is refused. 404 for a token that reaches more than the caller administers

Signing in with a session

A browser, or a script that has no token, signs in as a console account and keeps the cookie:

curl -sS -c cookies.txt -H 'Content-Type: application/json' \
  -d '{"username":"ops-bot","password":"..."}' \
  https://syncd.example.com/api/v1/auth/login
curl -sS -b cookies.txt https://syncd.example.com/api/v1/engines/1/status
curl -sS -b cookies.txt -X POST https://syncd.example.com/api/v1/auth/logout
  • The cookie is Secure outside development mode, so call the API over HTTPS.
  • With the consent banner on (ENS_CONSENT_BANNER_ENABLED, from 0.5.0), a script must first POST /api/v1/auth/consent and send the cookie it sets with the sign-in: every sign-in is refused (403) without an acknowledgement from the same client in the last 15 minutes. API tokens are not affected.
  • Sessions end after 30 idle minutes and 12 hours (CONSOLE_SESSION_IDLE_MINUTES, CONSOLE_SESSION_MAX_HOURS). From 0.5.0 ENS_SESSION_MAX_PER_USER can limit an account's sessions, so a script's sign-in may end a person's oldest session. The per-address limit (20 sign-ins in 5 minutes; from 0.5.1 an IPv6 client counts by its /64) and the account lockout (ENS_LOCKOUT_*) apply to scripts too.
  • From 0.5.1 a request with X-Syncd-Background: 1 (or ?background=1 on the status stream) is answered but does not count as activity: the web UI marks its own polls this way. A script that sends it lets its session reach the idle limit.
  • A new account must change its one-time password before anything else works: sign in once and call POST /api/v1/auth/password.
  • Prefer an API token for automation. With local sign-in limited to break-glass accounts, only those can sign in with a password, so a script then has no account to sign in as.

Conventions

  • Requests and responses are JSON (Content-Type: application/json on requests with a body). The largest body is 2 MB; a configuration may be at most 1 MiB. Exports and the pull API answer CSV, PDF, NDJSON or tar.zst as each says.
  • Errors are {"error": "<code>", "message": "<text>"}:
Status error When
400 bad_request The request is not valid, the engine refused it as invalid, or a publish lacks a ticket matching CONSOLE_PUBLISH_TICKET_PATTERN
401 unauthenticated No session, or it has ended
401 sign_in_failed Any failed sign-in, whatever the reason
401 invalid_token An API token that is unknown, revoked, expired, turned off, or whose creator is gone or disabled. With WWW-Authenticate: Bearer error="invalid_token"
401 wrong_credentials A self-service password change with a wrong user name or current password (the same answer for both)
403 forbidden The caller's roles cannot do this on any engine (from 0.5.1 recorded as access.denied for a signed-in account, at most once a minute per session), the engine refused the call (its listener, or from 0.5.0 its access tier), with the consent banner on a sign-in without an acknowledgement, a password change with a wrong current password (from 0.5.1 also any on a locked account), or from 0.5.1 a change made with the session cookie from another site
403 insufficient_scope An API token outside its scopes, beyond its creator's role now, or on an endpoint for people. With WWW-Authenticate: Bearer error="insufficient_scope"
403 password_change_required The account must set a new password first
404 not_found No such engine, version, entity, webhook, report or endpoint; from 0.5.0 also an engine outside every assignment of the caller, or outside a token's limit
409 conflict A name in use, a newer version saved meanwhile, the last admin or break-glass account, a simulation already running, a publish the pre-publish hook or the golden tests refused (with the reason), a promotion of a version never published, from 0.5.0 a publish the license does not allow (publishing blocked, or a pack the license lacks), and from 0.5.1 a publish that waited 150 seconds for another publish to the same engine, or an import of a running configuration that holds a secret value and does not parse
429 too_many_requests Over the sign-in or self-service limit (from 0.5.1 also the password change, which is held to the sign-in limit)
429 rate_limited An API token over its requests per minute, with Retry-After
503 engine_unavailable The engine cannot be reached, failed, or is busy with a long operation
503 hook_unavailable The pre-publish hook did not answer, or from 0.5.1 answered with neither an allow nor a deny, and CONSOLE_PUBLISH_HOOK_ON_ERROR is refuse
500 internal Anything else; details go to the console's log only
  • Lists are paged with a cursor: before / next_before (audit log, entity history), after / next_after (entities), or after / next (held changes, correlation suggestions, the pull API), with limit.
  • reveal=true (or "reveal": true in a body) asks for sensitive attribute values. It needs a role in CONSOLE_REVEAL_ROLES (default admin) through an assignment that reaches the engine (from 0.5.0 an entry there can carry a scope, auditor@prod), is audited, and is refused (and audited) otherwise. See Security.
  • Calls that act on an engine go through to its control API; they wait for it, and are refused as busy while it runs a long operation. The passive engine of an HA pair refuses commands, naming the active one.

Roles in the tables below: any is every signed-in role. Admins can do everything their assignments reach.

Public

Method Path Purpose
GET /api/v1/system Version, development and FIPS mode, the single sign-on label, who may sign in locally, whether configuration approval is required, the banners, and the publish policy (the ticket pattern, whether a pre-publish hook is asked). From 0.5.0 also the SAML and certificate sign-in labels when configured, the consent banner's text when it is on, and the password policy for a new local password
GET /api/v1/self-service Whether the self-service password page is on, and from 0.4.1 the engine's policy for a new password (min_length, min_classes; absent when the engine cannot be asked; read at most once a minute)
POST /api/v1/self-service/password A person changes their own directory password: {"login", "current_password", "new_password"}. See Self-service password change
GET /api/openapi.json The OpenAPI document
GET /healthz ok while the console runs and its background tasks work. From 0.5.5, 503 with a plain-text body, unwell and a line per background task that is not working: <task>: waiting to start again (<why>), <task>: stopped N times in 10 minutes (<why>), or <task>: <what keeps it from working> (for example webhook sender: its TLS configuration does not load: ...). The tasks include mail outbox, webhook sender, engine status watcher, scheduled reports, git sync, session purge, audit head log, audit retention and audit output <name>. For monitoring
GET /livez New in 0.5.5: ok while the console serves requests, whatever its background tasks do. For liveness and readiness probes and load balancers; the Helm chart's probes use it

Sign-in and accounts

Session only.

Method Path Role Purpose
POST /api/v1/auth/consent none From 0.5.0: acknowledge the notice-and-consent banner; every sign-in method refuses until this was called from the same browser in the last 15 minutes. Audited as auth.consent. 404 when no banner is configured
POST /api/v1/auth/login none Sign in with a local account (username, password); sets the cookie, returns the account
POST /api/v1/auth/logout signed in End the session
GET /api/v1/auth/me signed in The account: from 0.5.0 its assignments, what it may do on the whole console (global) and somewhere (anywhere), pending password change, whether it may reveal somewhere
GET /api/v1/auth/session signed in From 0.5.0: the current session (started_at, method: password, oidc, saml or x509), the account's sign-in before it (previous_sign_in: at, method, ip; absent on the first) and failed_attempts, the password sign-in attempts refused in between. From 0.5.1 refused (password_change_required) until a forced password change is done
GET /api/v1/auth/message-of-the-day signed in From 0.5.0: {"message": {"text", "set_by", "set_at"}}, or {"message": null}. From 0.5.1 refused until a forced password change is done
POST /api/v1/auth/password signed in Change the password (current_password, new_password); the one call open during a forced change. Signs out the account's other sessions. From 0.5.1 held to the sign-in limit per address (429), and a wrong current password counts toward the lockout (403, the account locked once it reaches it)
POST /api/v1/auth/password/skip signed in Development mode only: keep the current password
GET /api/v1/auth/oidc/login none Start single sign-on (next: where to go after); 404 when it is not configured
GET /api/v1/auth/oidc/callback none Where the identity provider sends the browser back. See Single sign-on
GET /api/v1/auth/saml/metadata none From 0.5.0: the console's SAML metadata, to register it at the provider; 404 when SAML is not configured
GET /api/v1/auth/saml/login none From 0.5.0: start a SAML sign-in (a redirect to the provider); 404 when it is not configured
POST /api/v1/auth/saml/acs none From 0.5.0: the assertion consumer service the provider posts back to; sets the cookie
POST /api/v1/auth/x509/login none From 0.5.0: sign in with this connection's client certificate, or the one a trusted proxy passes on; 404 when certificate sign-in is not configured, 403 with the reason when the certificate is missing or refused
GET /api/v1/users admin List accounts, each with its assignments, whether it is locked, and from 0.5.0 its last sign-in (last_sign_in_at, last_sign_in_method)
POST /api/v1/users admin Create a local account (username, display_name, and assignments (from 0.5.0: [{"role": "operator", "scope": "environment", "name": "prod"}, ...]) or role, short for one role on everything); returns its one-time password, shown once
PATCH /api/v1/users/{id} admin Change the display name, assignments (or role), disabled flag or break-glass flag, or from 0.5.0 "unlock": true to lift a lock from failed sign-ins. For an account that signs in through single sign-on or a certificate, assignments set here last until its next sign-in. From 0.5.1 taking break-glass off a local account while local sign-in is limited ends its sessions
POST /api/v1/users/{id}/reset-password admin Issue a new one-time password (local accounts only), unlock the account and end its sessions. From 0.5.5 the password is good for 7 days (as is the one POST /api/v1/users answers with), and the API tokens the account created are revoked

Settings

Session only.

Method Path Role Purpose
GET /api/v1/settings/sign-in admin Who may sign in locally, whether single sign-on or certificate sign-in is configured, the break-glass accounts, and from 0.5.0 the sign-in policy in effect (read-only: the ENS_* settings decide it)
PUT /api/v1/settings/sign-in admin local_sign_in: everyone or break_glass
PUT /api/v1/settings/config-approval admin Configuration approval: off or required
PUT /api/v1/settings/banners admin The top and bottom banners: text (up to 200 characters), background and text colours (at least 4.5:1 contrast)
PUT /api/v1/settings/message-of-the-day admin From 0.5.0: {"text": "…"} sets the message of the day shown on the dashboard (plain text, up to 2,000 characters, no control characters but line breaks and tabs); no text, or only spaces, removes it. Audited as settings.message_of_the_day, with the text before and after
GET /api/v1/settings/config-signing-keys admin From 0.5.0: the public halves of the console's configuration signing keys, for engine.config_signing_keys (see Security). Rotation is done on the console's host
GET /api/v1/admin/notices admin From 0.5.0: settings that name an engine that is not registered (CONSOLE_SELF_SERVICE_ENGINE, CONSOLE_CONFIG_GIT_ENGINES)

Engines

Method Path Role Token Purpose
GET /api/v1/engines any engines:read The registered engines the caller's assignments reach, with their environment, certificate_expires_at (when the console's client certificate for the engine expires; mTLS only), and from 0.5.0 permissions (what the caller may do on each) and can_reveal
POST /api/v1/engines admin — Register an engine: name, address (host:port of api.listen, or unix: and the absolute path of the engine's api.control_socket), environment (default for a new engine; from 0.4.1, with replace, the engine keeps its environment unless one is given), and for mTLS server_ca_pem, client_cert_pem, client_key_pem (the key is stored encrypted and never returned). Checks that it answers unless verify is false. replace: true replaces the address and credentials of an engine with that name, keeping its id and versions. A name whose stored client key the master key no longer opens is refused with that reason unless replace is set (audited as engine.re-registered)
PATCH /api/v1/engines/{id} admin — Move an engine to another environment ({"environment": "prod"}). What it runs is not touched: the next publish renders for the new environment
DELETE /api/v1/engines/{id} admin — Remove the registration (the engine keeps running)
GET /api/v1/engines/{id}/status any engines:read The engine's status: sources, publications (with held changes, report mode, leavers by stage, groups), targets, counters, timers, history, backups, HA role, password delivery (from 0.4.1 also per publication, and keys_sealed), quarantined entities, unmatched records per view, rule packages, the environment, the process's CPU and memory (Linux only), and from 0.4.1 runs (runs ended since the engine started, and the last one) and self_service (the self-service password policy). From 0.5.0 also who applied the running configuration and whether it was signed (config_applied), the control API's access mode (access), the license, each publication's unmanaged entries, the password keys and agents, and the HA pair's snapshot and password-queue figures
GET /api/v1/engines/{id}/status/stream any — Server-sent events: a status event every second, an error event if the engine goes away. Ends when the session does. From 0.5.1 background=1 (what the web UI sends) keeps opening it from counting as activity
GET /api/v1/engines/{id}/dead-letters any engines:read Failed exports waiting (publication, limit)
GET /api/v1/engines/{id}/quarantine any engines:read Entities whose exports a failing rule (on_error: quarantine) holds back (view, limit up to 500)
GET /api/v1/engines/{id}/held any engines:read A publication's held changes: what a change window, a threshold or a canary holds, or what report mode would write (publication, kind, reason, after, limit). See Change safety and lifecycle
POST /api/v1/engines/{id}/runs operator runs:run {"kind": "reconcile" \| "full_sync", "publication": ...}; returns when done
POST /api/v1/engines/{id}/approvals operator runs:run {"scope": ...}, as the status lists it. Lets deletes over a deletion threshold through once; with publication <name>, also the changes its change window (overdue), its modification or add threshold, or a failed canary holds
POST /api/v1/engines/{id}/groups/review operator runs:run {"publication", "group"}: a computed group's expiry and review clocks start again, and an expired group comes back
POST /api/v1/engines/{id}/drift-check operator runs:run Read a publication's entries (or every checking publication's) back from the target now
POST /api/v1/engines/{id}/unmanaged/check operator runs:run From 0.5.0: look in a publication's target ({"publication"}, or every one's) for entries the engine does not manage and members of privileged groups no rule accounts for. Reads the target and writes nothing there; the result is in the status
POST /api/v1/engines/{id}/unmanaged/adopt operator runs:run From 0.5.0: {"publication", "dn", "entity_id"}: make an entry already in the target the entry of an entity that has none in the publication yet (moved to the entity's DN when it is elsewhere, given the exported attributes, managed from then on)
POST /api/v1/engines/{id}/dead-letters/retry operator runs:run Export dead letters again now (all, a publication's, or one entity's)
POST /api/v1/engines/{id}/dead-letters/discard operator runs:run Remove one dead letter without retrying it

Registrations are audited as engine.register, replacements and environment moves as engine.update, and a replacement over a client key the master key no longer opens as engine.re-registered. From 0.4.1, syncd-console admin rename-engine (which the Helm chart runs when HA is turned on) renames a registration, keeping its id, and is audited as engine.renamed (see Admin guide). Operator calls are audited with their request and outcome (engine.run, engine.approve_deletions, engine.check_drift, engine.check_unmanaged, engine.adopt_entry, engine.dead_letters.retry, engine.dead_letters.discard, and the group review), from 0.5.0 with the assignment the call was allowed under (details.assignment).

Correlation

Method Path Role Token Purpose
GET /api/v1/engines/{id}/views/{view}/unjoined any — Correlation review: records that joined no entity, with the entities their join keys match
GET /api/v1/engines/{id}/correlation/suggestions any engines:read Correlation assistance: a view's unjoined records, each with scored candidate entities (view, source, after, limit, reveal). Nothing is joined
POST /api/v1/engines/{id}/correlation/accept operator runs:run {"view", "decisions": [...]}: join several records as decided, in one transaction on the engine, with an outcome per decision. Audited as correlation.accepted
POST /api/v1/engines/{id}/views/{view}/joins operator — Join a source record to an entity, whatever the join rules say
POST /api/v1/engines/{id}/views/{view}/unjoins operator — Take a record off its entity and keep it from joining that entity again

See Reports, lineage and data quality for the suggestions.

Configuration versions

Method Path Role Token Purpose
POST /api/v1/configs/validate designer configs:write Compile a configuration (yaml, optional environment to render it for) with the engine's compiler and run its test cases, without saving
GET /api/v1/engines/{id}/configs any configs:read The engine's versions, newest first (from 0.5.5 a page of them with limit, 1 to 1000, and before, the last version of the page before; every one without limit), with their status (draft, publishing, published, superseded), source (console, git, promotion), ticket, note and hook decision, the environments that run the same text, and from 0.5.1 accountable: the person four eyes compares the approver with (who saved it, the creator of the API token that saved it, or the account of the Git commit's author; absent when no account has the commit's address)
POST /api/v1/engines/{id}/configs designer configs:write Save a new version (yaml, comment, latest_seen). It must compile; 409 if a newer version was saved since latest_seen
GET /api/v1/engines/{id}/configs/running any configs:read What the engine runs now, from 0.5.1 with its environment's secret values masked (<secret name>): those it has now, and those sent with the engine's publishes. 0.5.0 returned them in clear
POST /api/v1/engines/{id}/configs/import designer configs:write Save what the engine runs as a new version. From 0.5.1 its secret values go back to being placeholders ({{ env.name }}) and modules' bytes are left out (their pins stay); 409 when it holds a secret value but does not parse
GET /api/v1/engines/{id}/configs/{version} any configs:read One version, with its YAML
GET /api/v1/engines/{id}/configs/{version}/diff any configs:read Against against (a version number, or running; default the previous version): the unified diff and the semantic diff (semantic, summary), rendered for the engine's environment, or environment=<name>, or environment= for the texts as saved. Secret values are masked; from 0.5.1 against running too, whatever the environment asked for
GET /api/v1/engines/{id}/configs/{version}/packages any configs:read The version's rule packages, with their functions
POST /api/v1/engines/{id}/configs/{version}/packages/check any configs:read Compare each package read from a file with the file at the Git branch head now
POST /api/v1/engines/{id}/configs/{version}/simulate designer — Dry-run the version on the engine: what each target would receive (samples, reveal). Nothing is applied
POST /api/v1/engines/{id}/configs/{version}/approve designer — Approve a version for publishing, as someone other than its author: from 0.5.1 not its accountable person either (403)
POST /api/v1/engines/{id}/configs/{version}/publish designer configs:publish Publish, with an optional body {"ticket", "note"}: rendered for the engine's environment, checked against the ticket pattern, approval, test cases, the license (from 0.5.0) and the pre-publish hook, then signed by the console (from 0.5.0) and sent; the engine validates, saves, reloads and runs a full sync. Returns once the engine runs it (up to 60 seconds). With Git sync, the golden-file tests in the repository (tests/golden beside the configuration) run too, and a failure refuses the publish (409). From 0.5.0 they are read at the version's own Git commit, not the branch head; a version saved before 0.5.0 is checked at the branch head, with a note. From 0.5.1 tests that cannot be read from Git count as failing. This covers Git auto-publish and promotion as well. From 0.5.1 one publish to an engine runs at a time, across consoles sharing the database; one that waits more than 150 seconds for another is refused (409)
POST /api/v1/configs/promote designer configs:publish {"engine", "version", "to", "ticket", "note", "dry_run"}: publish a version published on one engine to every engine of another environment, each through its own gates. The caller's roles must let it read the source engine and publish to every engine of the target environment: a promotion is not carried out in part (from 0.5.1 the refusal counts the engines the caller cannot see, rather than naming them). From 0.5.0 "dry_run": true only shows what would happen (the same checks of the caller's roles, each target engine's diff summary), saving, publishing and recording nothing: the console's Promote button shows it before the caller confirms. The answer lists each engine's outcome; 409 when the version was never published or no engine runs in that environment
GET /api/v1/engines/{id}/configs/{version}/export any configs:read An export file of the version (without the engine and api sections), with a SHA-256 of the configuration. From 0.5.1 a version with {{ env.* }} placeholders can be exported, the placeholders kept
POST /api/v1/engines/{id}/configs/import-file designer configs:write Import an export file as a new draft, keeping this engine's engine and api sections (from 0.5.1 with their secret values put back as placeholders); returns what the host must provide. From 0.5.1 checked as a save is: rendered for the engine's environment, packages and modules read (a module written into the file is refused), the license and the size limit
POST /api/v1/engines/{id}/connectors/test designer — Connect with one connector of a candidate configuration (yaml, connector)
POST /api/v1/engines/{id}/connectors/discover designer — List what a connector holds, a container's fields, or sample records (reveal for sensitive values; from 0.5.1 refused when its audit record cannot be written)
POST /api/v1/engines/{id}/preview designer — Run a candidate configuration over a sample of source records: the entities it makes and what each publication would write

Saves, imports, exports, approvals, simulations, previews, connector checks, publishes and promotions are audited (config.*, connector.*). See Configuration as code for environments, promotion and Git sync, and Security for the pre-publish hook.

WebAssembly modules

From 0.5.0 rule packages can carry custom functions compiled to WebAssembly (see Computed attributes and rules). The console keeps a store of modules per engine; a package names a module by its SHA-256 and the console fills the approved module in when it checks and publishes the configuration.

Method Path Role Token Purpose
GET /api/v1/engines/{id}/wasm-modules any configs:read The modules uploaded for the engine, newest first; from 0.5.1 each with accountable (the uploader, or the creator of the API token that uploaded it)
POST /api/v1/engines/{id}/wasm-modules designer configs:write Upload a module ({"name", "module" (the bytes, base64, at most 1 MiB), "comment"}): checked as the engine checks it (no imports, the ABI's exports, a manifest of its functions, the FIPS policy), kept by its SHA-256, audited as wasm_module.upload. Used only once someone else approves it
GET /api/v1/engines/{id}/wasm-modules/{sha256} any configs:read The review: name, size, hash, the functions and their signatures, and how it differs from the previous upload of the same name
GET /api/v1/engines/{id}/wasm-modules/{sha256}/download any configs:read The module itself, for review
POST /api/v1/engines/{id}/wasm-modules/{sha256}/approve designer — Approve a module, as someone other than its uploader, and from 0.5.1 than the creator of the API token that uploaded it (the database refuses an approval by either, and an approval cannot be changed). Audited as wasm_module.approve

In FIPS mode the console refuses modules unless SYNCD_FIPS_ALLOW_WASM_FUNCTIONS=true (see FIPS 140-3 and DISA STIG).

Environments and Git sync

Method Path Role Token Purpose
GET /api/v1/environment-names any configs:read From 0.4.1: the environments' names (those with saved values, and those an engine runs in), for the Compare tab and the publish dialog; from 0.5.0 only those the caller's assignments name or whose engines it reaches
GET /api/v1/environments admin, auditor environments:read The environments with their values, and the engines that run in each. Before 0.4.1 any role, or configs:read, could read them
GET /api/v1/environments/{name} admin, auditor environments:read One environment. A secret value shows as {"secret": true}, never its value
PUT /api/v1/environments/{name} admin — Replace its values: {"values": {"hr_host": {"value": "..."}, "hr_password_file": {"value": "...", "secret": true}}}. A secret value is sealed with the master key; a PUT that leaves its value out keeps it. Audited as environment.changed (the keys, never the values)
DELETE /api/v1/environments/{name} admin — Remove its values; refused while an engine runs in it
GET /api/v1/config-git any, on everything configs:read What the console last saw of the Git repository: last commit, sync time, last error
POST /api/v1/config-git/sync designer, on everything configs:write Fetch and take in new commits now; 409 when Git sync is not configured

Object explorer and lineage

Session only.

Method Path Role Purpose
GET /api/v1/engines/{id}/views/{view}/entities any Search a view's entities (text, attribute, after, limit, random, reveal)
GET /api/v1/engines/{id}/views/{view}/entities/{entity} any One entity: merged attributes and where each came from, its source records, what each target received
GET /api/v1/engines/{id}/views/{view}/entities/{entity}/history any The entity's history, newest first
POST /api/v1/engines/{id}/entities/{entity}/lineage/export any ?view=&format=json\|pdf[&reveal=true]: everything the engine knows about the entity, as a file. Audited as data.exported (and explore.reveal with reveal)

Every search and entity view is audited (explore.search, explore.entity, explore.history, explore.unjoined, explore.reveal, correlation.join, correlation.unjoin).

Data quality

Method Path Role Token Purpose
GET /api/v1/engines/{id}/quality any engines:read Per view, each check's failing entities now and its trend over the last seven days
GET /api/v1/engines/{id}/quality/entities any engines:read The entities failing a view's checks, or one check (view, check, limit): ids, check, severity and message, never values
POST /api/v1/engines/{id}/quality/try any — Try a check (view, expr or unique, sample) on a random sample of entities. Sensitive attributes are not read

Reports and exports

Method Path Role Token Purpose
POST /api/v1/engines/{id}/reports/reconciliation/export any engines:read ?format=csv\|xlsx\|pdf[&publication=] (xlsx from 0.5.0): the reconciliation report as a file, at most CONSOLE_EXPORTS_MAX_ROWS rows (X-Syncd-Truncated: true when capped). From 0.5.0 the summary includes adopted and unmanaged entries. Audited as data.exported first
GET /api/v1/reports admin, operator, auditor — The scheduled reports with their next and last run
GET /api/v1/reports/settings admin, operator, auditor — Whether mail is configured, the recipient domains, whether a share is set
POST /api/v1/reports admin, operator — Add a scheduled report
PUT /api/v1/reports/{id} its owner, admin — Replace its definition
DELETE /api/v1/reports/{id} its owner, admin — Delete it
POST /api/v1/reports/{id}/send its owner, admin — Run it now, with the same checks as a scheduled run

See Reports, lineage and data quality.

Rules

Method Path Role Token Purpose
POST /api/v1/rules/preview designer — Run a computed attribute's steps on given input, with the engine's own rules crate, and its test cases. From 0.5.5 designers only (any role before): the rule and its packages, custom functions in WebAssembly included, are the caller's, and run; it takes its turn with the console's compilations. Since 0.5.4 a rule that reads other entities (ref(), refs(), reports(), referrers()) is not run: the reply has reads_other_entities: true and nothing else set (before 0.5.4, a compile error); the configuration's check compiles such a rule
GET /api/v1/rules/functions any — The function catalogue for the CEL editor, with the configuration's package functions

See Computed attributes and rules.

Audit trail

The console's trail is in the ENS format, ens-audit/1 (see Audit logging).

Method Path Role Token Purpose
GET /api/v1/audit auditor audit:read The audit log for the Audit log page, newest first (before, limit up to 500), including entries from before 0.4.0. From 0.5.0 filtered server-side by from, to (RFC 3339), category, action, actor and outcome (success, failure, denied); an auditor of an environment or engines gets the entries recorded about those (not sign-ins or account changes, and nothing recorded before 0.5.0)
GET /api/v1/audit/csv auditor audit:read From 0.5.0: what the page lists, with the same filters and scope, as CSV (UTF-8 with a byte-order mark, RFC 4180, the formula-injection guard), newest first, at most 100,000 rows (X-Syncd-Truncated: true when cut). Recorded as data.exported first, with the filters. For a check of the chain, use the NDJSON export
GET /api/v1/audit/actions auditor audit:read From 0.5.0: every action the console records, with its category
GET /api/v1/audit/verify auditor audit:read Recompute the hash chain (the entries from before 0.4.0, then the ens-audit/1 chain): entries, first_broken, head, legacy_entries, first_seq. With anchor_id and anchor_hash (a head recorded earlier), also anchor: found and matches. A broken chain is recorded as audit.verified (alert)
GET /api/audit/events auditor audit:read The pull API, at the path every ENS product serves it on: ?after=<seq>&limit=<1-1000> (default 100). Events with seq above after, oldest first, as NDJSON (application/x-ndjson); with Accept: application/json as {"events":[...],"next":<seq>}. Start at after=0, then pass the last seq received. It needs only the database, so it works while the console is otherwise degraded
GET /api/v1/audit/events auditor audit:read The same, under /api/v1
GET /api/v1/audit/export auditor audit:read ?from=&to= (RFC 3339, both optional): the trail as an NDJSON download, newest first, for tools/audit/verify_chain.py. Recorded as data.exported first, and refused when it cannot be
GET /api/v1/audit/outputs auditor audit:read Each output's delivery position, backlog, last delivery, failing_since and last error

The verification, the pull API, the NDJSON export and the outputs' status need the auditor (or admin) role on everything, and a token without a limit. Events from before 0.4.0 are in /api/v1/audit but not in the pull API or the export. From 0.5.0 sign-in events carry roles (a list of assignments) instead of role, and events written for a request carry details.assignment. From 0.5.1 a request refused to a signed-in account is recorded as access.denied, retention records audit.pruned in the same transaction as the delete, and verify reports a chain whose start is missing without an audit.pruned accounting for it as broken. The family's Splunk add-on (TA-ens-audit, scripted input ens_audit_pull.py) pulls from /api/audit/events. See Security.

License

From 0.5.0 (see Licensing). Session only.

Method Path Role Purpose
GET /api/v1/license admin The license, its state and usage, and the packs
PUT /api/v1/license admin Install a license, or replace the one installed: {"license": "<the file's text>"}. It must verify with this build's keys, be valid now, and be bound to this installation or to none. The engines get it at once
DELETE /api/v1/license admin Remove the installed license. The installation is unlicensed again; its evaluation period, counted from its first start, does not start again
GET /api/v1/license/usage admin ?format=json\|csv: the managed identities per day and the high-water mark, for true-up (CSV columns day,managed_identities,limit,engines). Audited (license.usage-export)
GET /api/v1/license/entitlements any What the license leaves locked, and its state, for the editors and the banner

Here "admin" is admin on everything. Installing, replacing and removing are audited (license.upload, license.replace, license.remove), and each change of state as license.state and the webhook event license.state-changed.

Webhooks

The webhook administration endpoints (/api/v1/admin/webhooks, session only) are listed in Webhooks.

Administration

Method Path Role Token Purpose
GET /api/v1/admin/support-bundle admin — The console's part of a support bundle, as tar.zst: console.json (version, modes, settings), migrations.txt, environment.txt (the console's variables, secret values redacted), engines.json (each engine, its address, environment, certificate expiry and whether it answers). No credentials, no entity data. Recorded as support.bundle-exported

Self-service password change

With CONSOLE_SELF_SERVICE_ENGINE naming a registered engine that has passwords.self_service, the public page /password lets people change their own directory password without a console account. POST /api/v1/self-service/password takes {"login", "current_password", "new_password"}:

Answer When
200 Changed in the directory people sign in to, and queued for delivery to the others
400 The new password does not meet the engine's policy (the reason, in words) or the directory refused it; from 0.5.1 also a user name holding control characters, refused before anything is asked
401 wrong_credentials A wrong user name or current password: the same answer for both
404 Self-service is off
429 Over the per-address limit, or the user name is held off after 5 failures in 15 minutes
503 The engine cannot be reached or could not change it now

The console seals the request to the engine's password key and keeps nothing of it; each attempt is audited as password.self_service with its outcome. From 0.4.1, when the named engine is one of an HA pair, the request goes to the member that holds the lease. See Password synchronisation and Security.

Engine control API (gRPC)

The engine serves the gRPC service syncd.v1.EngineControl, defined in proto/syncd/v1/engine.proto (shipped in the source; there is no server reflection). The console, the syncd command line and the other engine of an HA pair are its clients. It listens on api.listen (default 127.0.0.1:7443), and optionally on a Unix socket (api.control_socket).

Access tiers

From 0.5.0 every RPC has a tier, and each caller is granted at most one, which includes the tiers before it (RPC_TIERS in engine/crates/api/src/access.rs; an RPC missing there is refused to everyone). Who gets which tier is api.access in the engine's configuration, in strict or compatible mode; see Security.

Tier Calls
read GetStatus, WatchStatus, ListDeadLetters, ListQuarantined, ListQuality, ListHeld, GetConfig, SimulateConfig, SearchEntities, GetEntity, GetEntityHistory, GetLineage, ListUnjoined, SuggestJoins, ReconciliationReport, GetPasswordKey, ListPasswordAgents, ListQueuedPasswords
operate StartRun, ApproveDeletions, CheckDrift, CheckUnmanaged, AdoptEntry, RetryDeadLetters, DiscardDeadLetter, JoinRecord, UnjoinRecord, AcceptJoins, ReviewGroup, PruneHistory, ChangeOwnPassword, RevokePasswordAgent, Backup, PullSnapshot, SnapshotManifest, PullSnapshotFiles, FollowPasswordQueue, TestConnector, DiscoverSchema, PreviewConfig; and reveal on any call that takes it
operate, and in strict mode api.access.passwords (or the control socket) SubmitPasswords, AddPasswordAgent, BindPasswordAgent, RotatePasswordKey, RotatePasswordAgentCa, ForwardPasswordIngest; from 0.5.1, on an engine that holds password key material, also Backup, PullSnapshot, PullSnapshotFiles and FollowPasswordQueue (KEY_RPCS), which hand the keys out
configure ApplyConfig, SetLicense

On top of the tier, each listener keeps its own limits:

  • The plain-text loopback listener (no api.tls) is read-only unless api.local_control: true, and gives no sensitive values unless api.local_reveal: true. In strict mode it stops at operate and may not set passwords.
  • The control socket reaches configure in compatible mode and stops at operate in strict mode; it may set passwords.
  • Sensitive values (reveal) need mTLS, the control socket or api.local_reveal: true, and the operate tier. The whole store (Backup, PullSnapshot, SnapshotManifest, PullSnapshotFiles, FollowPasswordQueue) needs a listener that both reveals and takes commands: from 0.5.1, on the loopback listener, api.local_control and api.local_reveal (0.5.0 took api.local_reveal alone).
  • In compatible mode (an install upgraded from 0.4.1 that has not opted in) every certificate the client CA signed has every tier, as before 0.5.0.
RPC Purpose
GetStatus A snapshot: version, FIPS mode, start time, counters, sources, publications (held changes, report mode, leavers by stage, groups), targets, orphans, held deletes, configuration version and environment, views (unmatched records), timers, history, backups, HA, password delivery, rule packages, what the engine is busy with, quarantined entities per view, and the process's CPU and memory (Linux only). From 0.4.1 also runs (RunsStatus: runs ended since the engine started, and the last one's activity, start, end and source failures), self_service (the self-service policy, when it is on), and in passwords (PasswordStatus) keys_sealed and per-publication counts (publications: delivered, failed, dropped, waiting)
WatchStatus Snapshots every interval_ms (at least 100 ms; 0 means one second) until the client disconnects. From 0.5.5 the engine updates its status at most every 250 ms while source events keep coming, and at once when they stop
ListDeadLetters Failed exports waiting to be retried. From 0.5.5 at most 10,000 in one answer, whatever limit asks for (1,000 without one)
ListQuarantined Entities whose exports a failing rule (on_error: quarantine) holds back. From 0.5.5 at most 10,000
ListQuality Entities failing a view's data-quality checks (quality), with the check's message. From 0.5.5 at most 10,000
ListHeld Changes planned but not applied: held by a change window, a threshold or a canary, or what a report-mode publication would write (filters: kind, reason; cursor: the last entity id)
StartRun Run a reconciliation (RUN_KIND_RECONCILE, optionally one publication) or a full sync (RUN_KIND_FULL_SYNC) now; returns when done
ApproveDeletions For a scope as the status lists it: let deletes held by a deletion threshold through once, and for publication <name> release its held changes that need approval
CheckDrift Read a publication's entries (or every checked publication's) back from the target and act by policy
RetryDeadLetters, DiscardDeadLetter Export dead letters again now; remove one without retrying
GetConfig The running configuration (YAML) and its version label. Secrets the configuration reads from the host appear only as references. Values the console rendered into it from its environments ({{ env.* }}) are there as sent to a caller with the configure tier; from 0.5.5 a caller below it gets the configuration without the values its environment marks secret (before, every caller got them: give read only to whom may see them). The console masks them too (from 0.5.1)
ApplyConfig Validate, save and reload with a new configuration, then run a full sync. The answer comes before the reload. From 0.5.0 it carries the console's signature, which an engine with engine.require_signed_config requires (see Security), and the engine records who applied it. From 0.5.1 a configuration that changes passwords.key_file is refused ("can only be changed on the engine host")
SetLicense From 0.5.0: the console gives the engine its license; the engine verifies and keeps it, and leaves enforcement to the console from then on. From 0.5.1 only while the console gave a usable license: told there is none, the engine judges a publish by its own evaluation period (see Licensing)
SimulateConfig Dry-run a configuration on a copy of the store: what each target would receive. One at a time. From 0.5.5 a caller below the configure tier simulates without the running configuration's secret values
TestConnector, DiscoverSchema Connect with one connector of a candidate configuration; list what it holds. Write nothing
PreviewConfig Run a candidate over a sample of records in a scratch store
SearchEntities, GetEntity, GetEntityHistory The read-only object explorer
GetLineage Everything the engine knows about one entity: each attribute with its source record and rule, the source records, joins, what each publication exported and when, password events (times and outcomes only) and history
PruneHistory Prune entity history now, as the hourly prune does
ReconciliationReport The reconciliation picture as a stream of rows: a summary per publication, then one row per entry with a difference. Nothing is read from the targets
ListUnjoined, JoinRecord, UnjoinRecord Correlation review and decisions by hand
SuggestJoins, AcceptJoins Correlation assistance: scored candidates for unjoined records (never joins); several joins in one transaction, with an outcome per decision
ReviewGroup Review a computed group: its clocks start again, and an expired group comes back
CheckUnmanaged, AdoptEntry From 0.5.0: look in a publication's target for entries the engine does not manage and for unaccounted members of privileged groups (reads only); make such an entry the entry of an entity that has none in the publication yet
GetPasswordKey The engine's public password key (an uncompressed P-256 point), its id and suite, which capture points seal changes to
SubmitPasswords Queue sealed password changes for delivery
AddPasswordAgent, ListPasswordAgents, RevokePasswordAgent A one-time enrollment token (and the agent CA's certificate) for a capture agent, from 0.5.0 with the sources it is bound to; the agents; revoking one
BindPasswordAgent From 0.5.0: set the sources an agent may submit for, without enrolling it again
ListQueuedPasswords From 0.5.0: the password changes waiting for delivery: when each arrived, who submitted it and where it still has to go. Never a password, and not the account
RotatePasswordKey, RotatePasswordAgentCa From 0.5.0: a new password key, or a new agent CA; the one replaced keeps working until it is retired (retire, or by the engine after passwords.rotation_overlap_days)
ForwardPasswordIngest From 0.5.0: the passive engine of a pair hands on what a capture agent sent to its ingest listener, with the fingerprint of the agent's certificate
ChangeOwnPassword A person's own password change, sealed to the password key (the console's self-service page). UNAUTHENTICATED for a wrong user name or password, FAILED_PRECONDITION for the policy, RESOURCE_EXHAUSTED after too many failures
Backup A consistent backup of the running engine (store checkpoint, configuration file, password key and agent CA, as they are on disk: sealed when a passphrase is set) as a streamed tar.zst, its manifest last
PullSnapshot The active engine's newest store snapshot, whole, for the passive engine of an HA pair
SnapshotManifest, PullSnapshotFiles From 0.5.0: the newest snapshot's manifest (every file with its size and SHA-256), and the files of it the passive engine lacks
FollowPasswordQueue From 0.5.0: the active engine's password queue, write by write, for the passive engine to keep between snapshots; a submission is answered once the passive engine has it

Errors are gRPC statuses: PERMISSION_DENIED for a call above the caller's tier, a password call (or, from 0.5.1, a key-carrying call on an engine with password keys) without api.access.passwords, or a command or reveal on a listener that does not allow it, UNAVAILABLE when the engine is busy with a long operation (a command waits up to 10 seconds first; from 0.5.5 also while it exports after the initial load, releases held changes, writes back a target's changes after an outage or delivers queued passwords, which used to queue commands behind them; the message names the activity), has too many commands waiting, is stopping, or is the passive engine of a pair, FAILED_PRECONDITION for password calls when no publication delivers passwords, INVALID_ARGUMENT, NOT_FOUND, and INTERNAL for a command that failed.

The syncd command line wraps these calls (syncd status, dlq, held, reconcile, full-sync, approve, retry, discard, check-drift, apply-config, group review, correlation suggest, lineage, report, unmanaged, adopt, password ..., backup, ...). From 0.5.0 syncd apply-config is refused on an engine in strict mode (ApplyConfig needs the configure tier), and on one that requires signed configurations. syncd quarantine reads the store directly (read-only), not through the API. On the engine's host the command line uses the control socket when it is configured, without a certificate (in strict mode it reads, operates and sets passwords there, and applies no configuration); on Kubernetes, kubectl exec syncd-engine-0 -- syncd status (for a release named syncd) does the same. See Operator guide. For its certificates, see Security.

The source also defines syncd.bridge.v1.JdbcBridge (proto/syncd/bridge/v1/jdbc.proto), the protocol between the engine and the JDBC bridge. It is internal to that connector; see Connectors.

Password ingest API (gRPC)

Password capture agents use a listener of their own, not the control API. It is on when the engine configuration sets passwords.ingest.listen (for example 0.0.0.0:7445), which needs at least one publication delivering passwords. The service is syncd.v1.PasswordIngest, in the same proto file.

RPC Who may call Purpose
Enroll Anyone with a one-time token {"name", "token", "csr_pem"}: the agent sends a PKCS#10 request for its own key with the token syncd password agent add printed. The answer is a client certificate (subject: the agent's name, client authentication only, valid passwords.ingest.agent_cert_days), the agent CA's certificate and the expiry. The token is spent, and a certificate from an earlier enrollment of the same agent stops working
GetPublicKey Enrolled agents The engine's current password key, as GetPasswordKey
Submit Enrolled agents Queue sealed password changes; the answer counts those queued. From 0.5.0 the engine opens each change in memory and refuses one for a source the agent is not bound to, before anything is queued
Renew Enrolled agents From 0.5.0: a new certificate for the key of the request, for an agent that presents its current one, before it expires or after the agent CA was rotated. The earlier certificate works until the new one is first used. syncd-capture renews on its own
  • TLS is mutual with the engine's agent CA, which also issues the listener's own certificate (for the names in passwords.ingest.names). A client certificate is asked for, not required, so enrolling works without one. Every other call needs a certificate whose fingerprint the engine recorded at enrollment and has not revoked; the handshake already refuses a certificate the agent CA did not issue.
  • A change is sealed with HPKE (RFC 9180, base mode: DHKEM(P-256, HKDF-SHA256), HKDF-SHA256, AES-256-GCM) to the engine's key, with the key's id as additional data. A change sealed to another key is refused, so the agent fetches the key again.
  • The sealed plaintext's layout is internal to syncd. Rather than writing an agent of your own, use the syncd-capture agent (from 0.5.0), or run syncd password agent enroll once and syncd password set --agent-dir DIR ... from a script.
  • From 0.5.0 both engines of an HA pair answer on the ingest listener: the passive one hands each call to the active one (ForwardPasswordIngest), which checks the agent as its own listener would. The passive engine's listener starts once it has its first snapshot.

See Password synchronisation for the agents and the commands, and Security for the cryptography.

Prometheus metrics

When the engine's host configuration sets api.metrics_listen (for example 127.0.0.1:9464), the engine serves GET /metrics there in the Prometheus text format, over plain HTTP, without authentication. It carries counters and states only, no attribute values or configuration. It cannot be set from the console. The engine's container image sets it to 0.0.0.0:9464, and the Helm chart's engine.metrics.serviceMonitor.enabled adds a ServiceMonitor for it, whose targets get the job label engine.metrics.job (syncd).

Added in 0.3.0:

Metric Type Meaning
syncd_view_quarantined{view} gauge Entities whose exports a failing rule (on_error: quarantine) holds back; 0 for views with none
process_cpu_seconds_total counter User and system CPU time of the engine process; its rate is the CPUs in use
process_threads gauge Threads of the engine process
process_open_fds gauge Open file descriptors of the engine process

Added in 0.4.0:

Metric Type Meaning
syncd_held_changes{publication,reason} gauge Changes planned but not applied, by why they wait (window, overdue, modifications, additions, deletions, canary, canary_failed, report)
syncd_window_opens_timestamp_seconds{publication} gauge When the publication's change window next opens, while it is closed
syncd_canary_failed{publication} gauge 1 while a canary failed and the rest of its change waits for approval
syncd_shadow_planned{publication,kind} gauge Operations a report-mode publication would send
syncd_deprovision_pending{publication,stage} gauge Leavers waiting for this stage of a staged leaver policy
syncd_timers_pending gauge Persisted timers armed (effective dates, leaver stages, windows, canaries)
syncd_timers_next_due_timestamp_seconds gauge When the earliest timer fires
syncd_groups{publication} gauge Computed groups of the publication
syncd_groups_manual_members{publication} gauge Computed groups holding members their filter does not produce
syncd_groups_expired{publication} gauge Computed groups past their expiry and not reviewed since
syncd_groups_review_due{publication} gauge Computed groups whose review is due
syncd_unmatched_records{view,source} gauge Source records waiting to join an entity
syncd_unmatched_oldest_seconds{view} gauge How long the longest-waiting unjoined record has waited
syncd_unmatched_ageing{view} gauge Unjoined records older than correlation.unmatched_alert_after
syncd_quality_failing{view,check,severity} gauge Entities failing a data-quality check
syncd_history_entries gauge Entity history entries kept, as of the last prune
syncd_history_oldest_timestamp_seconds gauge When the oldest history entry kept was written
syncd_history_last_prune_timestamp_seconds gauge When history was last pruned
syncd_history_pruned_total counter History entries pruned since the engine started
syncd_backup_interval_seconds gauge Seconds between scheduled backups
syncd_backup_last_success_timestamp_seconds gauge When the last scheduled backup succeeded
syncd_backup_last_failure_timestamp_seconds gauge When a scheduled backup last failed
syncd_backup_last_bytes gauge The compressed size of the last successful backup
syncd_backup_pruned_total counter Backups removed by engine.backup.keep since the engine started
syncd_ha_active{pair,name} gauge 1 when this engine holds its pair's lease, 0 when passive
syncd_ha_lease_expires_timestamp_seconds{pair,name} gauge When the lease expires unless its holder renews it
syncd_ha_snapshot_age_seconds{pair,name} gauge Age of the newest store snapshot, taken (active) or received (passive)
syncd_ha_snapshot_interval_seconds{pair,name} gauge Seconds between snapshots
syncd_source_rows_skipped_total{source,mode} counter Rows a full read skipped as bad (CSV sources with on_error: skip)
syncd_entra_skipped_synced_users{target} gauge Exports to an Entra ID target refused because the user is synced from on-premises

Added in 0.4.1:

Metric Type Meaning
syncd_password_deliveries_total{publication,outcome} counter Captured password changes since the engine started, per publication: delivered, failed (refused by the target, or expired) or dropped (the publication is in report mode). Every outcome of every publication delivering passwords is served, 0 until it moves. Failures no publication can be named for (a change that does not open, or from a source no publication delivers from) have an empty publication
syncd_password_waiting{publication} gauge Changes waiting for the publication's target (the account not there yet, or the target unreachable), as of the last delivery pass

0.4.1 adds two alert rules, in both rule files and the chart's PrometheusRule: SyncdPasswordDeliveryFailures (a publication's failed deliveries rose in 15 minutes) and SyncdPasswordChangesDropped (changes were dropped in the last hour because the publication is in report mode), both warning.

Added in 0.5.0:

Metric Type Meaning
syncd_source_throttled_total{source} counter Requests a REST source's service throttled (429, 503), each waited for and tried again
syncd_target_unmanaged{publication} gauge Entries of the kind the publication manages that its target holds and no publication exported, as of the last unmanaged-entries pass (ignored ones left out)
syncd_target_unmanaged_ignored{publication} gauge Unmanaged entries an unmanaged.ignore pattern hides
syncd_target_unmanaged_privileged{publication} gauge Members of privileged groups that no rule accounts for
syncd_target_unmanaged_checked_timestamp_seconds{publication} gauge When the last unmanaged-entries pass ended
syncd_target_unmanaged_failed{publication} gauge 1 when the last pass could not finish (the counts are then partial)
syncd_ha_snapshot_size_bytes, syncd_ha_snapshot_shipped_bytes, syncd_ha_snapshot_files, syncd_ha_snapshot_files_reused ({pair,name}) gauge The newest snapshot's size, the bytes of it that were new, its files, and the files the passive engine held already
syncd_ha_password_follower_connected{pair,name} gauge On the active engine: 1 while the passive engine follows the password queue
syncd_ha_password_changes_unreplicated_total{pair,name} counter On the active engine: password changes accepted without the passive engine's acknowledgement
syncd_password_key_age_seconds gauge Age of the current password key
syncd_password_previous_keys gauge Rotated password keys still opening what was sealed to them
syncd_password_agent_ca_expiry_seconds gauge Seconds until the agent CA's certificate expires
syncd_password_agent_cert_expiry_seconds gauge Seconds until the first enrolled agent's certificate expires; negative once one has
syncd_password_changes_refused_total counter Changes an agent submitted for a source it is not bound to
syncd_password_agents_unbound gauge Enrolled agents bound to no source (enrolled before 0.5.0)
syncd_license_state{state,source} gauge 0 licensed or evaluating, 1 a warning, 2 the grace period, 3 publishing blocked
syncd_license_managed_identities, syncd_license_managed_identities_limit gauge People the engine exports to at least one target, each counted once; the license's limit
syncd_license_expiry_seconds gauge Seconds until the license expires
syncd_license_development_key gauge 1 when the build accepts the development license key, or the license was signed with it

0.5.0 adds nine alert rules: SyncdGroupReviewsDue, SyncdLicenseWarning, SyncdLicenseGracePeriod, SyncdLicensePublishingBlocked, SyncdLicenseDevelopmentKey, SyncdPasswordAgentCertExpiring (14 days before an agent's certificate expires), SyncdPasswordKeyOld (a password key older than a year), SyncdUnmanagedEntriesGrew and SyncdUnmanagedPrivilegedMembersGrew. Copy the rule file again, or upgrade the chart with prometheusRule.enabled; the unmanaged-entries expressions were not run through promtool.

In 0.4.0 the shipped alert rules gained eight (the 0.4.0 release notes said seven): SyncdChangesNeedApproval, SyncdCanaryFailed, SyncdGroupsExpired, SyncdUnmatchedRecordsAgeing, SyncdQualityErrors, SyncdBackupStale, SyncdHaNoActive and SyncdHaSnapshotStale. SyncdMemoryNearLimit no longer selects job="syncd"; only SyncdEngineDown needs the scrape job's name. On Kubernetes, engine.metrics.prometheusRule.enabled installs them as a PrometheusRule. The process metrics, like process_resident_memory_bytes and syncd_memory_limit_bytes, are served on Linux only. All the metrics, the alert rules and how to scrape them are in the Operator guide.