Search LDAP Node Entries

Search entries within an LDAP node.

Request URL

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

Request parameters

Parameter Required Type Description
node_id Yes Integer The unique ID of an LDAP node.
Note: You can query LDAP node ID using the Query LDAP Node List interface.
page Yes Integer Define which page is displayed.
page_size Yes Integer Define how many records per page.
search_value No String The search keyword.
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.
node_type String The type of LDAP node to which the entries belong.
  • pbxContact: The entries are contacts.
  • pbxExtension: The entries are extensions.
node_entry_list Array<LDAP_Node_Entry> The list of entries in the LDAP node.
total_number Integer The total number of entries in the LDAP node.
LDAP_Node_Entry
Parameter Type Description
id Integer The unique ID of the entry.
display_name String The display name of the entry.
first_name String The first name.
last_name String The last name.
sn String The value of the SN attribute.
company String The company name.
email String The email address.
business String The primary company phone number.
business2 String The secondary company phone number.
business_fax String The business fax number.
mobile String The mobile phone number.
mobile2 String The secondary mobile phone number.
home String The home phone number.
home2 String The second home phone number.
home_fax String The home fax number.
other String The other phone number.
extension_number String The extension number.
department String The department.
title String The title.
job_title String The job title.
position String The position.
organization String The organization.
industry String The industry.
report_to String The superior.
remark String The remark.
street String The street address.
city String The city.
state String The state or province.
country String The country or region.
zip_code String The postal code.

Example

Request example

GET /openapi/v1.0/ldap_nodes/search?node_id=2&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",
    "node_type": "pbxExtension",
    "total_number": 3,
    "node_entry_list": [
        {
            "id": 159,
            "display_name": "Leo Ball",
            "email": "leoball@sample.com",
            "first_name": "Leo Ball",
            "extension_number": "1000"
        },
        {
            "id": 300,
            "display_name": "Terrell Smith",
            "email": "",
            "first_name": "Terrell",
            "last_name": "Smith",
            "mobile": "+8618750961609",
            "extension_number": "1023"
        }
    ]
}