Skip to content

Directory sync status and probe target (admin-only)

GET
/api/admin/ldap/status
curl --request GET \
--url https://example.com/api/admin/ldap/status \
--header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>'

Reports whether directory enrichment is enabled, the connection and query the probe is pinned to, the sync settings, and the most recent sync pass on any instance. Names no credential: the bind password is never part of this response. Answers “is the sync even running”, which before the run record could only be answered by reading a log on whichever instance happened to run it.

Directory status

Media typeapplication/json
object
base_dn
string
configured_attributes

ConfiguredAttributes are the attribute names the configured fields read, which is what the console highlights in a returned entry.

Array<string>
disable_after_seconds

DisableAfterSeconds is how long an entry may stay missing before the user is auto-disabled. Zero means never.

integer
enabled

Enabled is false when ldap.enabled is off, in which case everything below is unset and there is nothing to probe.

boolean
last_run

LastRun is the most recent pass on any instance, absent when none has ever run.

object
actor_username

ActorUsername is the admin who triggered it, absent for a scheduled pass. The username rather than the id, since it is displayed.

string
disabled
integer
dry_run
boolean
error

Error is why the pass could not run — an unreachable directory, a failed bind. Empty for a pass that completed, whatever it concluded about individual users.

string
failed
integer
finished_at

FinishedAt is absent while the pass runs, which is also how a pass that died with its process reads afterwards.

string
found
integer
id
required
string
instance

Instance is the host that ran it. Jobs are not leader-elected, so every instance runs its own pass and this says whose log to read.

string
missing
integer
nss

NSS is what the NSS directory’s full sync concluded when an admin ran this pass by hand with nss.enabled on: POST /api/admin/ldap/sync runs both, except on a dry run. Absent otherwise, and on every scheduled pass, which the NSS sync does not ride on.

object
accounts
required
object
created
required
integer
failed
required

Failed is the entries that could not be checked or written.

integer
missing
required

Missing is the rows marked missing for the first time; Tombstoned the rows missing for nss.tombstone_after and now deleted.

integer
refused
required

Refused is the new entries not stored because another row, a tombstone included, holds their number or name.

integer
seen
required

Seen is the entries the directory returned.

integer
skipped
required

Skipped is the entries rejected because a value did not parse (a name the POSIX rules refuse, a uid that is not a number, a relative home); each is logged with its DN.

integer
tombstoned
required
integer
updated
required
integer
error

Error is why the run stopped short: the directory could not be reached or searched, or another run was in progress on this instance. Nothing is marked missing by a run that stopped short.

string
finished_at

FinishedAt is absent when the run stopped on an error.

string
full
required

Full is true for a full run, which is the only kind that marks entries missing; the admin trigger always runs one.

boolean
groups
required
object
created
required
integer
failed
required

Failed is the entries that could not be checked or written.

integer
missing
required

Missing is the rows marked missing for the first time; Tombstoned the rows missing for nss.tombstone_after and now deleted.

integer
refused
required

Refused is the new entries not stored because another row, a tombstone included, holds their number or name.

integer
seen
required

Seen is the entries the directory returned.

integer
skipped
required

Skipped is the entries rejected because a value did not parse (a name the POSIX rules refuse, a uid that is not a number, a relative home); each is logged with its DN.

integer
tombstoned
required
integer
updated
required
integer
started_at
required
string
reenabled
integer
started_at
required
string
trigger
required

Trigger is “schedule” or “manual”.

string
users_seen
integer
reenable

Reenable reports whether the sync clears its own disables when an entry reappears.

boolean
running

Running reports a pass in progress on the instance that answered this request. Passes are not leader-elected, so another instance may be running one too.

boolean
sync_interval_seconds

SyncIntervalSeconds is zero when the scheduled sync is off, which is itself the answer to “why has nothing synced”.

integer
tls_insecure_skip_verify

TLSInsecureSkipVerify reports that directory connections do not verify the server certificate. Reported rather than silently honoured: a probe that succeeds only because verification is off has to say so.

boolean
url

URL, BaseDN and UserFilter are the connection and query the probe is pinned to. The probe cannot be re-pointed, so these are the whole target.

string
user_filter
string

Example generated

{
"base_dn": "example",
"configured_attributes": [
"example"
],
"disable_after_seconds": 1,
"enabled": true,
"last_run": {
"actor_username": "example",
"disabled": 1,
"dry_run": true,
"error": "example",
"failed": 1,
"finished_at": "example",
"found": 1,
"id": "example",
"instance": "example",
"missing": 1,
"nss": {
"accounts": {
"created": 1,
"failed": 1,
"missing": 1,
"refused": 1,
"seen": 1,
"skipped": 1,
"tombstoned": 1,
"updated": 1
},
"error": "example",
"finished_at": "example",
"full": true,
"groups": {
"created": 1,
"failed": 1,
"missing": 1,
"refused": 1,
"seen": 1,
"skipped": 1,
"tombstoned": 1,
"updated": 1
},
"started_at": "example"
},
"reenabled": 1,
"started_at": "example",
"trigger": "example",
"users_seen": 1
},
"reenable": true,
"running": true,
"sync_interval_seconds": 1,
"tls_insecure_skip_verify": true,
"url": "example",
"user_filter": "example"
}

Not authenticated

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Not authorized as admin

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}