Routing vectors (routes)
Requests
| HTTP verb | Endpoint | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new routing vector
Request
Field description: route entity
POST /rest/v1/uc/routes HTTP/1.1
Content-Type: application/json; charset=utf-8
route entity
Response
Field description: route entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "b00035ca-016c-ccde-b60c-50e54938780c",
"vector": "default",
"priority": 99,
"dir": "outer",
"fromdomain": "",
"fromnumber": "",
"fromextaccount": "",
"tonumber": "[]9XXX",
"schedule": "all",
"periods": [],
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2019-08-26T07:40:43.15Z",
"lwt": "2019-08-26T07:40:43.15Z"
}
}
Getting the list of routing vectors
Request
| Name | Type | Description |
|---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, vector, priority, dir, fromnumber, fromextaccount, fromdomain, tonumber, schedule, opts.title, ext.lwt, ext.ct. |
|
|
Offset in the list of resources to output. |
|
|
Maximum number of resources in the list. |
|
|
Sorting order of resources in the list. |
|
|
Transformation of composite fields to flat form. |
GET /rest/v1/uc/routes?offset=0&limit=2 HTTP/1.1
Response
Field description: route entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "5b8ef76d-016c-b377-6c01-50e54938780c",
"vector": "externals",
"priority": 5,
"dir": "",
"fromdomain": "4XX",
"fromnumber": "",
"fromextaccount": "",
"tonumber": "9XXXXXXXXXX",
"schedule": "all",
"ext": {
"ct": "2019-08-21T09:17:23.84Z",
"lwt": "2019-08-21T09:17:23.84Z"
}
},
{
"id": "b00035ca-016c-ccde-b60c-50e54938780c",
"vector": "default",
"priority": 99,
"dir": "outer",
"fromdomain": "",
"fromnumber": "",
"fromextaccount": "",
"tonumber": "[*]9XXX",
"schedule": "all",
"ext": {
"ct": "2019-08-26T07:40:43.15Z",
"lwt": "2019-08-26T07:40:43.15Z"
}
}
]
Getting data of routing vector
Request
| Name | Type | Description |
|---|---|---|
|
|
List of fields to output. |
|
|
Transformation of composite fields to flat form. |
GET /rest/v1/uc/routes/b00035ca-016c-ccde-b60c-50e54938780c HTTP/1.1
Response
Field description: route entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "b00035ca-016c-ccde-b60c-50e54938780c",
"vector": "default",
"priority": 99,
"dir": "outer",
"fromdomain": "",
"fromnumber": "",
"fromextaccount": "",
"tonumber": "[]9XXX",
"schedule": "all",
"periods": [],
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2019-08-26T07:40:43.15Z",
"lwt": "2019-08-26T07:40:43.15Z"
}
}
Modifying data of routing vector
Fields prohibited for modification: id
Request
Field description: route entity
PATCH /rest/v1/uc/routes/b00035ca-016c-ccde-b60c-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
route entity
Response
Field description: route entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "b00035ca-016c-ccde-b60c-50e54938780c",
"vector": "default",
"priority": 99,
"dir": "outer",
"fromdomain": "",
"fromnumber": "",
"fromextaccount": "r1",
"tonumber": "*",
"schedule": "custom",
"periods": [
{
"daystart": 1,
"timestart": 480,
"daystop": 1,
"timestop": 1080
},
{
"daystart": 2,
"timestart": 480,
"daystop": 5,
"timestop": 1080
}
],
"opts": {
"comment": "",
"title": ""
},
"ext": {
"ct": "2019-08-26T07:40:43.15Z",
"lwt": "2019-09-07T17:22:21.57Z"
}
}
Searching for the identifier of routing vector
Searches for a resource by the specified key and returns the identifier(s) for building the endpoint.
Key fields for search: id