Оповещения (alertcalls)
Запросы
HTTP verb | Endpoint | Описание |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Создание нового оповещения
Запрос
Описание полей: alertcall entity
POST /rest/v1/uc/alertcalls HTTP/1.1
Content-Type: application/json; charset=utf-8
alertcall entity
Ответ
Описание полей: alertcall entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "373a3d71-016c-d84c-0151-50e54938780c",
"code": "achtung190831",
"name": "Тревога 31.08.19",
"dtstart": "2019-08-31T12:55:32Z",
"dtstop": "",
"ivrscriptcode": "alert_no_ack",
"mediafile": "test_sound.wav",
"groups": [],
"abonents": [
1,
2
],
"opts": {
"comment": "",
"site": "SITE1",
"attemptcount": 1,
"attempttimeoutsec": 10,
"callerid": "100",
"callername": "AlertMachine",
"calltimeout": 30,
"trunkcount": 1,
"status": "planned",
"statresults": {},
"dtstarted": "",
"dtstopped": ""
},
"ext": {
"ct": "2019-08-28T12:55:55.47Z",
"lwt": "2019-08-28T12:55:55.47Z"
}
}
Получение списка оповещений
Запрос
Имя | Тип | Описание |
---|---|---|
|
|
Фильтр по значениям полей. |
|
|
Список полей для вывода. Доступные поля для выдачи: id, code, name, dtstart, dtstop, ivrscriptcode, mediafile, opts.site, opts.attemptcount, opts.attempttimeoutsec, opts.callerid, opts.callername, opts.calltimeout, opts.trunkcount, opts.status, opts.statresults, opts.dtstarted, opts.dtstopped, ext.lwt, ext.ct. |
|
|
Смещение в списке ресурсов, подлежащих выдаче. |
|
|
Максимальное количество ресурсов в списке. |
|
|
Порядок сортировки ресурсов в списке. |
|
|
Преобразование в плоский вид составных полей. |
GET /rest/v1/uc/alertcalls?offset=0&limit=2 HTTP/1.1
Ответ
Описание полей: alertcall entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "1484fd72-016c-d819-06b5-50e54938780c",
"code": "test_alert",
"name": "Тревога 31.08.19",
"dtstart": "2019-09-08T15:25:50Z",
"dtstop": "",
"ivrscriptcode": "alert_no_ack",
"mediafile": "test_sound.wav",
"opts": {
"site": "SITE1",
"attemptcount": 1,
"attempttimeoutsec": 10,
"callerid": "100",
"callername": "AlertMachine",
"calltimeout": 30,
"trunkcount": 2,
"status": "cancelled",
"statresults": {
"answered": 1,
"approved": 1,
"finished": 2,
"incall": 0,
"indelay": 1,
"new": 0,
"prepared": 0,
"total": 3
},
"dtstarted": "2019-09-08T15:25:51.43Z",
"dtstopped": "2019-09-08T15:27:00.54Z"
},
"ext": {
"ct": "2019-08-28T12:00:14.51Z",
"lwt": "2019-08-28T12:00:14.51Z"
}
},
{
"id": "373a3d71-016c-d84c-0151-50e54938780c",
"code": "achtung190831",
"name": "Тревога 31.08.19",
"dtstart": "2019-08-31T12:55:32Z",
"dtstop": "",
"ivrscriptcode": "alert_no_ack",
"mediafile": "test_sound.wav",
"opts": {
"site": "SITE1",
"attemptcount": 1,
"attempttimeoutsec": 10,
"callerid": "100",
"callername": "AlertMachine",
"calltimeout": 30,
"trunkcount": 1,
"status": "planned",
"statresults": {},
"dtstarted": "",
"dtstopped": ""
},
"ext": {
"ct": "2019-08-28T12:55:55.47Z",
"lwt": "2019-08-28T12:55:55.47Z"
}
}
]
Получение данных оповещения
Запрос
Имя | Тип | Описание |
---|---|---|
|
|
Список полей для вывода. |
|
|
Преобразование в плоский вид составных полей. |
GET /rest/v1/uc/alertcalls/373a3d71-016c-d84c-0151-50e54938780c HTTP/1.1
Ответ
Описание полей: alertcall entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "373a3d71-016c-d84c-0151-50e54938780c",
"code": "achtung190831",
"name": "Тревога 31.08.19",
"dtstart": "2019-08-31T12:55:32Z",
"dtstop": "",
"ivrscriptcode": "alert_no_ack",
"mediafile": "test_sound.wav",
"groups": [],
"abonents": [
1,
2
],
"opts": {
"comment": "",
"site": "SITE1",
"attemptcount": 1,
"attempttimeoutsec": 10,
"callerid": "100",
"callername": "AlertMachine",
"calltimeout": 30,
"trunkcount": 1,
"status": "planned",
"statresults": {},
"dtstarted": "",
"dtstopped": ""
},
"ext": {
"ct": "2019-08-28T12:55:55.47Z",
"lwt": "2019-08-28T12:55:55.47Z"
}
}
Изменение данных оповещения
Поля запрещенные для изменения: id
Запрос
Описание полей: alertcall entity
PATCH /rest/v1/uc/alertcalls/373a3d71-016c-d84c-0151-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
alertcall entity
Ответ
Описание полей: alertcall entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "373a3d71-016c-d84c-0151-50e54938780c",
"code": "achtung190831",
"name": "Тревога 31.08.19",
"dtstart": "2019-08-31T12:55:32Z",
"dtstop": "",
"ivrscriptcode": "alert_no_ack",
"mediafile": "test_sound.wav",
"groups": [
"group01",
"group02"
],
"abonents": [
1,
2
],
"opts": {
"comment": "",
"site": "SITE1",
"attemptcount": 1,
"attempttimeoutsec": 10,
"callerid": "100",
"callername": "AlertMachine",
"calltimeout": 30,
"trunkcount": 1,
"status": "planned",
"statresults": {},
"dtstarted": "",
"dtstopped": ""
},
"ext": {
"ct": "2019-08-28T12:55:55.47Z",
"lwt": "2019-09-09T17:23:10.55Z"
}
}
См. также
-
API /rest/v1/fs/targets/alertcall – управление файлами звукозаписей оповещений.