Query Extension List
Endpoint
POST /api/v0.0.1/extensionlist/query?token={token}&type={type}
Request Parameters
No parameter. Only need to send the request.
Response Parameters
Name | Type | Description |
extlist | Object | Extension object. |
extnumber | Int | The extension number. |
status | String | Current status of the extension.
|
type | String | The extension type. |
port | String | The extension port. When the extension is analog phone, the parameter will be displayed. |
username | String | Username. |
Examples
Request Example
POST /api/v0.0.1/extensionlist/query?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json HTTP/1.1 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
POST /api/v0.0.1/extensionlist/query?token=813b621cfe8eecf445a2ce1f4a079ffe&type=xml HTTP/1.1 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
“status”: “Success”,
“extlist”: [
{
“extnumber”: “100”,
“status”: “Unavailable”,
“type”: “pjsip”,
“username”: “100”,
“agentid”: “”
},
{
“extnumber”: “101”,
“status”: “Registered”,
“type”: “pjsip”,
“username”: “xiaoshaokun”,
“agentid”: “”
},
{
“extnumber”: “102”,
“status”: “Registered”,
“type”: “pjsip”,
“username”: “102”,
“agentid”: “”
}
]
}
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
<?xml version=”1.0″ encoding=”utf-8″?>
<xml>
<status>Success</status>
<extlist>
<item id=”0″>
<extnumber>100</extnumber>
<status>Unavailable</status>
<type>pjsip</type>
<username>100</username>
<agentid></agentid>
</item>
<item id=”1″>
<extnumber>101</extnumber>
<status>Unavailable</status>
<type>pjsip</type>
<username>xiaoshaokun</username>
<agentid></agentid>
</item>
<item id=”2″>
<extnumber>102</extnumber>
<status>Unavailable</status>
<type>pjsip</type>
<username>102</username>
<agentid></agentid>
</item>
<item id=”3″>
<extnumber>103</extnumber>
<status>Unavailable</status>
<type>pjsip</type>
<username>103</username>
<agentid></agentid>
</item>
</extlist>
</xml>