Rules for automatic recognition of recorded conversations (asrrules)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new rule
Request
Field Description: asrrule entity
POST /rest/v1/uc/asrrules HTTP/1.1
Content-Type: application/json; charset=utf-8
asrrule entity
Response
Field Description: asrrule entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "cdffb0ae-016c-d2b3-e556-50e54938780c",
"priority": 99,
"dir": "",
"fromnumber": "",
"tonumber": "",
"crossdomain": "",
"asr": 1,
"schedule": "work",
"periods": [],
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2019-08-27T10:51:40.75Z",
"lwt": "2019-08-27T10:51:40.75Z"
}
}
Getting the list of rules
Request
Name | Type | Description |
---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, priority, dir, fromnumber, tonumber, crossdomain, asr, schedule, opts.title, ext.lwt, ext.ct. |
|
|
Offset in the list of resources to be issued. |
|
|
The maximum number of resources in the list. |
|
|
The sort order of the resources in the list. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/uc/asrrules?offset=0&limit=2 HTTP/1.1
Response
Field Description: asrrule entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "06839f04-016c-d2b4-70ce-50e54938780c",
"priority": 50,
"dir": "incoming",
"fromnumber": "",
"tonumber": "",
"crossdomain": "",
"asr": 1,
"schedule": "work",
"opts": {
"title": ""
},
"ext": {
"ct": "2019-08-27T10:52:16.46Z",
"lwt": "2019-08-27T10:52:16.46Z"
}
},
{
"id": "cdffb0ae-016c-d2b3-e556-50e54938780c",
"priority": 99,
"dir": "",
"fromnumber": "",
"tonumber": "",
"crossdomain": "*",
"asr": 1,
"schedule": "work",
"opts": {
"title": ""
},
"ext": {
"ct": "2019-08-27T10:51:40.75Z",
"lwt": "2019-08-27T10:51:40.75Z"
}
}
]
Obtaining rule data
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/uc/asrrules/cdffb0ae-016c-d2b3-e556-50e54938780c HTTP/1.1
Response
Field Description: asrrule entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "cdffb0ae-016c-d2b3-e556-50e54938780c",
"priority": 99,
"dir": "",
"fromnumber": "",
"tonumber": "",
"crossdomain": "",
"asr": 1,
"schedule": "work",
"periods": [],
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-27T10:51:40.75Z",
"lwt": "2019-08-27T10:51:40.75Z"
}
}
Changing the rule data
Fields prohibited for modification: id
Request
Field Description: asrrule entity
PATCH /rest/v1/uc/asrrules/cdffb0ae-016c-d2b3-e556-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
asrrule entity
Response
Field Description: asrrule entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "cdffb0ae-016c-d2b3-e556-50e54938780c",
"priority": 99,
"dir": "inner",
"fromnumber": "101",
"tonumber": "115",
"crossdomain": "*",
"asr": 0,
"schedule": "all",
"periods": [],
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-27T10:51:40.75Z",
"lwt": "2019-09-09T09:38:59.35Z"
}
}
Searching for the record rule identifier
Searches the resource for the specified key, returns the identifier(s) to build the endpoint.
Key fields to search for: id
Request
LOOKUP /rest/v1/uc/asrrules HTTP/1.1
Content-Type: application/json; charset=utf-8
"cdffb0ae-016c-d2b3-e556-50e54938780c"
Response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
"cdffb0ae-016c-d2b3-e556-50e54938780c"
]
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Lookup failed"
}