Save the directory configuration.
const url = 'https://example.com/api/v1/settings/ldap';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"bind_dn":"example","bind_password":"example","ca_cert":"example","default_role":"example","enabled":true,"group_base_dn":"example","group_filter":"example","group_name_attribute":"example","host":"example","member_of_attribute":"example","port":1,"role_map":{"additionalProperty":"example"},"security":"ldaps","uid_attribute":"example","user_base_dn":"example","user_filter":"example","username_attribute":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/settings/ldap \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "bind_dn": "example", "bind_password": "example", "ca_cert": "example", "default_role": "example", "enabled": true, "group_base_dn": "example", "group_filter": "example", "group_name_attribute": "example", "host": "example", "member_of_attribute": "example", "port": 1, "role_map": { "additionalProperty": "example" }, "security": "ldaps", "uid_attribute": "example", "user_base_dn": "example", "user_filter": "example", "username_attribute": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The save payload from the Settings page.
object
Write-only credential. Two-valued, not three: None keeps what is stored, a non-blank
value replaces it. An empty string is a validation error rather than “clear”, because a bind
with a DN and no password is an unauthenticated bind that a permissive directory answers
success — so “no password” is not a configuration, it is a silent downgrade to anonymous.
object
How the connection is protected. Two variants, both TLS — there is deliberately no plaintext
option, so ldap:// cannot be configured into existence and the bind password cannot cross the
wire in the clear. Adding one later would be a certificate-verification-disable flag by another
name and needs the same argument (ADR-041 decision 2).
Responses
Section titled “Responses”Saved
The configuration is not usable; the message names the field
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}No valid bearer token
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role lacks the user-administration permission
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}This deployment has no directory store
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}