Rules of submission (representatives)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new presentation rule
Request
Field Description: representative entity
POST /rest/v1/uc/representatives HTTP/1.1
Content-Type: application/json; charset=utf-8
representative entity
Response
Field Description: representative entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "9b64ae6e-016c-d737-bb5c-50e54938780c",
"priority": 76,
"dir": "cross",
"ofdomain": "$.rootdomain.ru",
"ofnumber": "XXX",
"ofusername": "",
"fordomain": "",
"fornumber": "",
"forusername": "",
"action": "apply",
"modifier": "5T",
"moddisplay": "*",
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-28T07:54:09.62Z",
"lwt": "2019-08-28T07:54:09.62Z"
}
}
Getting the list of presentation rules
Request
Name | Type | Description |
---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, priority, dir, ofdomain, ofusername, ofnumber, fordomain, forusername, fornumber, action, modifier, 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/representatives?offset=0&limit=2 HTTP/1.1
Response
Field Description: representative entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "4f3fc6d5-016c-d738-96f2-50e54938780c",
"priority": 75,
"dir": "inner",
"ofdomain": "",
"ofnumber": "XXX",
"ofusername": "",
"fordomain": "$.rootdomain.ru",
"fornumber": "",
"forusername": "",
"action": "apply",
"modifier": "7XXX",
"moddisplay": "",
"opts": {
"title": ""
},
"ext": {
"ct": "2019-08-28T07:55:05.84Z",
"lwt": "2019-08-28T07:55:05.84Z"
}
},
{
"id": "9b64ae6e-016c-d737-bb5c-50e54938780c",
"priority": 76,
"dir": "cross",
"ofdomain": "$.rootdomain.ru",
"ofnumber": "XXX",
"ofusername": "",
"fordomain": "",
"fornumber": "",
"forusername": "",
"action": "apply",
"modifier": "5T",
"moddisplay": "",
"opts": {
"title": ""
},
"ext": {
"ct": "2019-08-28T07:54:09.62Z",
"lwt": "2019-08-28T07:54:09.62Z"
}
}
]
Obtaining data rules of presentation
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
GET /rest/v1/uc/representatives/9b64ae6e-016c-d737-bb5c-50e54938780c HTTP/1.1
Response
Field Description: representative entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "9b64ae6e-016c-d737-bb5c-50e54938780c",
"priority": 76,
"dir": "cross",
"ofdomain": "$.rootdomain.ru",
"ofnumber": "XXX",
"ofusername": "",
"fordomain": "",
"fornumber": "",
"forusername": "",
"action": "apply",
"modifier": "5T",
"moddisplay": "*",
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-28T07:54:09.62Z",
"lwt": "2019-08-28T07:54:09.62Z"
}
}
Modification of submission rule data
Fields prohibited for modification: id
Request
Field Description: representative entity
PATCH /rest/v1/uc/representatives/9b64ae6e-016c-d737-bb5c-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
representative entity
Response
Field Description: representative entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "9b64ae6e-016c-d737-bb5c-50e54938780c",
"priority": 77,
"dir": "cross",
"ofdomain": "test.rootdomain.ru",
"ofnumber": "XXX",
"ofusername": "",
"fordomain": "",
"fornumber": "",
"forusername": "",
"action": "apply",
"modifier": "35T",
"moddisplay": "*",
"opts": {
"title": "",
"comment": ""
},
"ext": {
"ct": "2019-08-28T07:54:09.62Z",
"lwt": "2019-09-09T08:56:14.39Z"
}
}
Deleting a presentation rule
Searching for the identifier of a presentation rule
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/representatives HTTP/1.1
Content-Type: application/json; charset=utf-8
"4f3fc6d5-016c-d738-96f2-50e54938780c"
Response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
"4f3fc6d5-016c-d738-96f2-50e54938780c"
]
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Lookup failed"
}