Add an Active Directory domain
POST/config/ldaps
Creates a domain configuration.
The stored document requires name, server, port, bind_dn, bind_pass, search_base and the domain, user and pass of both scan_config.read_acct and scan_config.write_acct; a missing required field fails with 400. Passwords are stored encrypted. The optional extra object creates or updates the macOS domain service account in the same call. Returns HTTP 200 with a plain-text confirmation, not the created object. Read it back with GET /config/ldaps. Accepts JSON or application/x-www-form-urlencoded bodies. Required role: admin or superadmin. Domain names are not unique: posting the same name twice creates two records. The created record has empty domain_fqdn and domain_netbios until the first synchronization. A macOS account created through extra before that point is not returned by GET /config/macos/domain until the domain has synchronized. The confirmation body is Successfully Added Domain (text/html).
Request
Responses
- 200
- 400
- 401
- 403
Created.
Request validation failed (field length or range, or a required field is missing).
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).