Search LDAP Credentials

Search LDAP credentials.

Request URL

GET {base_url}/{api_path}/ldap_credentials/search?access_token={access_token}

Request parameters

Parameter Required Type Description
search_value Yes String The search keyword, which is fuzzy-matched against LDAP credential account names.
page Yes Integer Define which page is displayed.
page_size Yes Integer Define how many records per page.
sort_by No String Define the sorting field.

Valid value:

  • id: Sort by ID.
order_by No String Define the display order.

Valid value:

  • desc: Descending order.
  • asc: Ascending order.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
credential_list Array<LDAP_Credential> The list of LDAP credentials matching the search criteria.
total_number Integer The total number of LDAP credentials matching the search criteria.
LDAP_Credential
Parameter Type Description
id Integer The unique ID of the LDAP credential.
name String The account name associated with the credential.
  • For the administrator account, the value is administrator.
  • For an extension account, the value is the extension name.
cn String The common name (CN) value.
base_dn String The Base DN associated with the credential.

Example

Request example

GET /openapi/v1.0/ldap_credentials/search?search_value=Leo&page=1&page_size=2&access_token=KHlhDSbuZ75OsFLDUbZHdkE5cIQEcIlK HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 3,
    "credential_list": [
        {
            "id": 2105,
            "name": "Leo Ball",
            "cn": "1000",
            "base_dn": "cn=1000,ou=users,dc=docs,dc=proxy,dc=test,dc=yeastarcloud,dc=com"

        },
        {
            "id": 2114,
            "name": "Leo Ball",
            "cn": "1023",
            "base_dn": "cn=1000,ou=users,dc=docs,dc=proxy,dc=test,dc=yeastarcloud,dc=com"

        }
    ]
}