POST /command/ldap/delete

Delete an existing directory service connection. Requires authentication and appropriate permissions.

Request format

When Forming RBAC API requests to this endpoint, the content type is application/json. The body must be a JSON object containing the ID of the LDAP connection that you want to remove. For example:

curl -X POST "https://$(puppet config print server):4433/rbac-api/v1/command/ldap/delete" \
-H "X-Authentication:$(puppet-access show)" \
-H "Content-type: application/json" \
-d '{"id": "e97188aa-9573-413b-945e-07f5f261613e"}'

Use GET /ldap to get the LDAP connection ID.

Response format

Returns 204 No Content if you have appropriate permissions and the request was well-formed. If a connection with the given ID exists, then this response means the connection was successfully removed. However, this response is returned for ANY well-formed, permitted request, even if there is no match for the given ID.

When you disconnect an LDAP directory that has imported groups, all users and groups associated with that directory are removed from PE RBAC.

Error responses

If you don't have permission to delete LDAP connections, the response is 403 Not Permitted.

For other errors, refer to RBAC service errors .