Test a bind to a domain controller without saving
POST/config/ldaps/validate
Tries to bind to the given server with the supplied credentials and search base.
If bind_pass is not a string and ldap_config_id is given, the stored bind password of that domain is used. A failed test still returns HTTP 200, with valid: false and an error object (code and msg). Note this endpoint uses host, whereas saved configurations use server. Accepts JSON or application/x-www-form-urlencoded bodies. Required role: admin or superadmin. No field is rejected with 400. A missing search_base gives NoSearchBase; a missing bind_dn or password gives MissingCredentials; an unknown ldap_config_id gives NoLdapConfig; a malformed ldap_config_id gives an error whose msg starts with Your configuration is not valid.. All return HTTP 200 with valid: false. A successful bind returns valid: true.
Request
Responses
- 200
- 401
- 403
Test result.
No token, or the token is invalid or expired. The body is {message}: No auth token provided when no token is sent, otherwise the token check's message (jwt expired, jwt malformed, invalid signature, invalid token, jwt signature is required). Send Authorization: Bearer <token> exactly: the server drops the first seven characters of the header and reads the rest as the token, so a different scheme or an extra space fails. If Authorization is absent, the server reads a token field in the body, then a token query parameter, then x-access-token. Routes that validate query fields reject ?token= with 400 InvalidQuery.
The token's role is not allowed for this operation, or the token's scopes exclude the route
(Scope not allowed by token).