Query an Alarm

Query alarm settings of an extension, multiple extensions, or all extensions.

Request URL

{base_url}/{api_path}/wakeupcall/query?token={token}

Request parameters

Parameter Required Type Description
number Yes String Extension number.

Valid values:

  • An extension number: Query alarm settings of the specified extension.

    Example: "number":"1000"

  • Multiple extension numbers: Query alarm settings of multiple extensions. Separate multiple extensions with ,.

    Example: "number":"1000,1001"

  • all: Query alarm settings of all extensions.

    Example: "number":"all"

Response parameters

Note: If the queried extension doesn't have any alarms, the PBX will respond the request result only.
Parameter Type Description
status String Request result.
  • Success
  • Failed
wakeups Array <WakeupInfo> Alarm list.
WakeupInfo
Parameter Type Description
number String Extension number.
wakeup Array <ExtensionWakeup> Alarm information of extensions.
ExtensionWakeup
Parameter Type Description
wakeupid Integer The unique ID for an alarm.
time String Alarm time.
type String Alarm type.
  • onetime
  • everyday
  • custom
weekdays Integer The applicable days of week when type is set to custom.
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

0 means Sunday, and 1-6 means Monday to Saturday.

repeats Integer How many times will the alarm be repeated.
  • 1
  • 2
  • 3
repeatinterval String The interval in minutes between each repeat.
prompt String Alarm prompt.

Examples

Request example

Query the alarm information of extension 5000.

POST /api/v2.0.0/wakeupcall/query?token=1e3b3ebb6a974cb42ed31de5413df52d
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150

{
	"number": "5000"
}
Response example
HTTP/1.1 200 OK
Server: Boa/0.94.14rc21
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": "5000",
			"wakeup": [
				{
					"wakeupid": "9",
					"time": "15:00",
					"type": "onetime",
					"prompt": "macroform-cold_day",
					"repeats": "3",
					"repeatinterval": "5"
				}
			]
		}
	]
}