GET /ds/test (deprecated)
On this page:
Test the connection to the connected directory service. Authentication is required.
GET /ds/test is deprecated.
Instead, use POST /command/ldap/test. The information
on this page reflects conditions and behavior prior to this endpoint's deprecation.
Requirements are different in newer endpoints.Request format
When Forming RBAC API requests to this endpoint, the request is a basic call with authentication, such as:
curl "https://$(puppet config print server):4433/rbac-api/v1/ds/test" -H "X-Authentication:$(puppet-access show)"
Response format
If the test is successful, the response is 200 OK and a JSON object containing the directory service connection settings. For example:
{
"help_link": "https://help.example.com",
"ssl": true,
"group_name_attr": "name",
"password": <password>,
"group_rdn": null,
"connect_timeout": 15,
"user_display_name_attr": "cn",
"disable_ldap_matching_rule_in_chain": false,
"ssl_hostname_validation": true,
"hostname": "ldap.example.com",
"base_dn": "dc=example,dc=com",
"user_lookup_attr": "uid",
"port": 636,
"login": "cn=ldapuser,ou=service,ou=users,dc=example,dc=com",
"group_lookup_attr": "cn",
"group_member_attr": "uniqueMember",
"ssl_wildcard_validation": false,
"user_email_attr": "mail",
"user_rdn": "ou=users",
"group_object_class": "groupOfUniqueNames",
"display_name": "Acme Corp Ldap server",
"search_nested_groups": true,
"start_tls": false
}
For information about each setting, refer to External directory settings.
If the request was well-formed and valid, but the test failed, response body contains
the elapsed time and the reason the test failed. For example, {"elapsed": 20, "error": "..."}.
Error responses
Returns 400 Bad Request if the request is malformed.
Returns 401 Unauthorized if no user is authenticated.
Returns 403 Forbidden if the current user lacks permission to test the directory settings.
For other errors, refer to RBAC service errors .






