Search Specific Extensions

Search specific extensions from the extension list.

Request URL

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

Request parameters

Table 1.
Parameter Required Type Description
page No String Define which page is displayed.
page_size No String Define how many records per page.
sort_by No String Define the sorting field.

Valid value:

  • id
  • number
  • caller_id_name
  • email_addr
  • mobile_number
  • presence_status
order_by No String Define the display order.

Valid value:

  • asc: Ascending order.
  • desc: Descending order.
search_value No String Search keyword.

Response parameters

Table 2.
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.
total_number Integer The total of the searched extensions.
data Array<Ext_Basicinfo> The basic information of the extension.
Ext_Basicinfo
Table 3.
Parameter Type Description
id Integer Extension ID.
online_status Object<Online_Status> Extension Online Status on the following endpoints.
  • sip_phone: SIP endpoint.
  • linkus_desktop: Linkus Desktop Client.
  • linkus_mobile: Linkus Mobile Client.
  • linkus_web: Linkus Web Client.
presence_status String Extension Presence.
  • available: Available.
  • away: Away.
  • business_trip: Business Trip
  • do_not_disturb: Do Not Disturb (DND).
  • lunch: Lunch Break.
  • off_work: Off Work.
number String Extension Number.
caller_id_name String Caller ID Name.
role_name String User Role.
email_addr String Email Address.
mobile_number String Mobile Number.
Online_Status
Table 4.
Parameter Type Description
status Integer The extension online status on the endpoint (expect for SIP endpoint).
Note: The extension online status on SIP endpoint is returned in the status_list parameter.
  • 0: Offline.
  • 1: Online.
ext_dev_type String The type of online devices.
  • sip: SIP endpoint.
  • linkusdesktop: Linkus Desktop Client.
  • linkusmobile: Linkus Mobile Client.
  • linkusweb: Linkus Web Client.
status_list Array<Status_List> The extension online status on SIP endpoint.
Note: This parameter is only returned when the extension is registered on an SIP endpoint.
Status_List
Table 5.
Parameter Type Description
status Integer The extension online status on the SIP endpoint.
  • 0: Offline.
  • 1: Online.
ip String The IP address and SIP port of the SIP endpoint.

For example, 192.168.28.190:5060.

linkus_dev_type String The type of online Linkus Mobile Client and Linkus Pad Client (SDK).
  • ios: Linkus Mobile Client for iOS.
  • android: Linkus Mobile Client for Android.
  • ipad: Linkus Pad Client (SDK) for iOS.
  • pad: Linkus Pad Client (SDK) for Android.

Examples

Request example

Search for extension 2000 from the extension list.

GET /openapi/v1.0/extension/search?order_by=asc&search_value=2000&access_token=WoAp9s3hYXSWgD5ZdOAhpGNvgnl8SufF HTTP/1.1
Host: 192.168.5.150:8088

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 1,
    "data": [
        {
            "id": 238,
            "online_status": {

                "sip_phone": {
                    "status": 0,
                    "ext_dev_type": "sip",                 //Extension 2000 is registered on a SIP device.
                    "status_list": [                        
                        {
                            "status": 1,                  //Extension online status on the SIP device
                            "ip": "192.168.28.190:5060"   //IP address and SIP port of the SIP device
                        }
                    ]
                },
                "linkus_desktop": {
                    "status": 0
                },
                "linkus_mobile": {
                    "status": 1,
                    "ext_dev_type": "linkusmobile",
                    "status_list": [
                            {
                                "status": 1,
                                "ip": "112.48.22.71",
                                "linkus_dev_type": "android"
                            }
                        ]
                    }
                },
                "linkus_web": {
                    "status": 0
                }
            },
            "presence_status": "available",
            "number": "2000",
            "caller_id_name": "Leo Ball",
            "role_name": "Administrator",
            "email_addr": "leo@sample.com"
        }
    ]
}