CalledId modification rules and CallerId (provider_callerids)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new modification rule
Request
Field Description: provider_callerid entity
POST /rest/v1/uc/provider_callerids HTTP/1.1
Content-Type: application/json; charset=utf-8
provider_callerid entity
Response
Field Description: provider_callerid entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "0ea04335-016c-d72e-dbe9-50e54938780c",
"idprovider": "58563833-016c-d21b-070f-50e54938780c",
"providercode": "",
"priority": 99,
"dir": "outer",
"fromdomain": "",
"fromnumber": "7912XXXXXXX",
"tonumber": "",
"modfromdisplay": "*",
"modfromnumber": "/XXXX/XXXXXXX",
"modtonumber": "100",
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-28T07:44:28.13Z",
"lwt": "2019-08-28T07:44:28.13Z"
}
}
Getting the list of modification rules
Request
Name | Type | Description |
---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, provider, providercode, priority, dir, fromdomain, fromnumber, tonumber, modfromdisplay, modfromnumber, modtonumber, 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/provider_callerids?offset=0&limit=2 HTTP/1.1
Response
Field Description: provider_callerid entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "0ea04335-016c-d72e-dbe9-50e54938780c",
"idprovider": "58563833-016c-d21b-070f-50e54938780c",
"providercode": "",
"priority": 99,
"dir": "outer",
"fromdomain": "",
"fromnumber": "7912XXXXXXX",
"tonumber": "",
"modfromdisplay": "",
"modfromnumber": "/XXXX/XXXXXXX",
"modtonumber": "100",
"opts": {
"title": ""
},
"ext": {
"ct": "2019-08-28T07:44:28.13Z",
"lwt": "2019-08-28T07:44:28.13Z"
}
},
{
"id": "1e19ccdf-016c-d729-098f-50e54938780c",
"idprovider": "",
"providercode": "sipnet_",
"priority": 100,
"dir": "inner",
"fromdomain": "",
"fromnumber": "8XXXXXXXXXX",
"tonumber": "",
"modfromdisplay": "*",
"modfromnumber": "/X/7XXXXXXXXXX",
"modtonumber": "100",
"opts": {
"title": ""
},
"ext": {
"ct": "2019-08-28T07:38:06.60Z",
"lwt": "2019-08-28T07:38:06.60Z"
}
}
]
Retrieving modification rule data
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/uc/provider_callerids/0ea04335-016c-d72e-dbe9-50e54938780c HTTP/1.1
Response
Field Description: provider_callerid entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "0ea04335-016c-d72e-dbe9-50e54938780c",
"idprovider": "58563833-016c-d21b-070f-50e54938780c",
"providercode": "",
"priority": 99,
"dir": "outer",
"fromdomain": "",
"fromnumber": "7912XXXXXXX",
"tonumber": "",
"modfromdisplay": "*",
"modfromnumber": "/XXXX/XXXXXXX",
"modtonumber": "100",
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-28T07:44:28.13Z",
"lwt": "2019-08-28T07:44:28.13Z"
}
}
Modification of modification rule data
Fields prohibited for modification: id
Request
Field Description: provider_callerid entity
PATCH /rest/v1/uc/provider_callerids/0ea04335-016c-d72e-dbe9-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
provider_callerid entity
Response
Field Description: provider_callerid entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "0ea04335-016c-d72e-dbe9-50e54938780c",
"idprovider": "58563833-016c-d21b-070f-50e54938780c",
"providercode": "",
"priority": 99,
"dir": "outer",
"fromdomain": "",
"fromnumber": "7912XXXXXXX",
"tonumber": "",
"modfromdisplay": "Outer-{D}",
"modfromnumber": "/XXXX/XXXXXXX",
"modtonumber": "100",
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-28T07:44:28.13Z",
"lwt": "2019-09-08T17:32:34.27Z"
}
}
Deleting a modification rule
Searching for the modification 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/provider_callerids HTTP/1.1
Content-Type: application/json; charset=utf-8
"0ea04335-016c-d72e-dbe9-50e54938780c"
Response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
"0ea04335-016c-d72e-dbe9-50e54938780c"
]
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Lookup failed"
}