Edit an Alarm
Edit the alarm settings of an extension.
Endpoint
POST /api/v0.0.1/wakeupcall/update?token={token}
Request Parameters
Name | Importance | Type | Description |
number | Required | String | The extension number. |
wakeupid | Required | Int | A unique Identifier for the alarm. |
time | Required | String | Alarm time. |
type | Required | 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 | Optional | Int | The options available when the type is set to custom.
Options: 1, 2, 3, 4, 5, 6, 0. 1 to 6 corresponds to Saturday, 0 corresponds to Sunday. |
Prompt | Optional | String | The file name of the custom prompt. This prompt must be a custom prompt. |
Response Parameters
Name | Type | Description |
status | String | Request results.
Success: Success. Failed: failed. |
Examples
Request Example
Change the alarm setting of extension 106.
POST /api/v0.0.1/wakeupcall/update?token=813b621cfe8eecf445a2ce1f4a079ffe&type=json
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
“wakeupid”:”9″,
“number”:”106″,
“type”:”custom”,
“time”:”15:55″,
“weekdays”:”0,1″,
“prompt”:”custom/test12311″
}
Response Example
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”
}
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>
</xml>