Recording rules (recordrules)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new rule
Request
Field Description: recordrule entity
POST /rest/v1/uc/recordrules HTTP/1.1
Content-Type: application/json; charset=utf-8
recordrule entity
Response
Field Description: recordrule 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": "",
"rec": 1,
"storageruleid": "f8d1d8d6-016c-cd8c-ca1d-50e54938780c",
"siprec": 0,
"streamed_call_rec": 0,
"mixed_call_rec": 0,
"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, rec, siprec, streamed_call_rec, mixed_call_rec, storageid, 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/recordrules?offset=0&limit=2 HTTP/1.1
Response
Field Description: recordrule 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": "",
"rec": 1,
"storageruleid": "f8d1d8d6-016c-cd8c-ca1d-50e54938780c",
"siprec": 0,
"streamed_call_rec": 0,
"mixed_call_rec": 0,
"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": "*",
"rec": 1,
"storageruleid": "f8d1d8d6-016c-cd8c-ca1d-50e54938780c",
"siprec": 0,
"streamed_call_rec": 0,
"mixed_call_rec": 0,
"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/recordrules/cdffb0ae-016c-d2b3-e556-50e54938780c HTTP/1.1
Response
Field Description: recordrule 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": "",
"rec": 1,
"storageruleid": "f8d1d8d6-016c-cd8c-ca1d-50e54938780c",
"siprec": 0,
"streamed_call_rec": 0,
"mixed_call_rec": 0,
"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: recordrule entity
PATCH /rest/v1/uc/recordrules/cdffb0ae-016c-d2b3-e556-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
recordrule entity
Response
Field Description: recordrule 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": "*",
"rec": 0,
"storageruleid": "f8d1d8d6-016c-cd8c-ca1d-50e54938780c",
"siprec": 0,
"streamed_call_rec": 0,
"mixed_call_rec": 0,
"schedule": "all",
"periods": [],
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-27T10:51:40.75Z",
"lwt": "2019-09-09T09:38:59.35Z"
}
}
Deleting a rule
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/recordrules 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"
}