Query an Alarm
Query an extension user’s alarm information.
Endpoint
POST /api/v0.0.1/wakeupcall/query?token={token}&type={type}
Request Parameters
| Name | Importance | Type | Description |
| number | Required | String | The extension number.
Ranges: Single extension number: add an alarm for the specified extension. For example: “number”: “110” Multiple extension numbers: add the same alarm for multiple extensions. Multiple extension numbers are separated by half-width commas (,). For example: “number”: “110,111” |
Response Parameters
Note: If the queried extension does not have alarm information, the PBX will only respond to the parameters of the request success or request failure.
| Name | Type | Description |
| wakeups | Array <WakeupInfo> | 闹铃列表。 |
| status | String | Request results.
Success: Success. Failed: failed. |
WakeupInfo
| Name | Type | Description |
| number | String | The extension number. |
| wakeup | Array <ExtensionWakeup> | List of extension alarm information. |
ExtensionWakeup
| Name | Type | Description |
| wakeupid | Integer | A unique Identifier for the alarm. |
| time | String | Alarm time. |
| type | String | Alarm type.
Ranges: onetime: When the alarm completes the set number of repetitions, the alarm will be automatically deleted. custom: When type is custom, weekdays is not empty. |
| weekdays | Integer | The week the alarm applies to.
Value range: 0~6. Among them, 0 means Sunday, 1-6 means Monday to Saturday. The options available when the type is set to custom. |
| prompt | String | Alarm prompt. |
Examples
Request Example
Query the alarm information of extension 114.
POST /api/v0.0.1/wakeupcall/query?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
“number”:”114″
}
Response Sample
HTTP/1.1 200 OK
Accept-Ranges: bytes
Connection: close
Content-Type: application/json
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
“status”: “Success”,
“wakeups”: [
{
“number”: “114”,
“wakeup”: [
{
“wakeupid”: “10”,
“type”: “custom”,
“weekdays”: “0,1,2,3,5”,
“time”: “15:55”,
“prompt”: “custom/test”
}
]
}
]
}