Rules of submission (representatives)

Requests

HTTP verb Endpoint Description

POST

/rest/v1/uc/representatives

Creating a new presentation rule

GET

/rest/v1/uc/representatives

Getting the list of presentation rules

GET

/rest/v1/uc/representatives/<id>

Obtaining data rules of presentation

PATCH

/rest/v1/uc/representatives/<id>

Modification of submission rule data

DELETE

/rest/v1/uc/representatives/<id>

Deleting a presentation rule

LOOKUP

/rest/v1/uc/representatives

Searching for the identifier of a presentation rule


Creating a new presentation rule

Request

Field Description: representative entity

Request example
POST /rest/v1/uc/representatives HTTP/1.1
Content-Type: application/json; charset=utf-8

representative entity

Response

Field Description: representative entity

Response example
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

Table 1. Request parameters
Name Type Description

filter

object

Filter by field values.

mask

str

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

int

Offset in the list of resources to be issued.

limit

int

The maximum number of resources in the list.

order

array<object|str>

The sort order of the resources in the list.

flat

bool

Conversion to flat form of composite fields.

Request example
GET /rest/v1/uc/representatives?offset=0&limit=2 HTTP/1.1

Response

Field Description: representative entity

Response example
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

Table 2. Request parameters
Name Type Description

mask

str

A list of fields to output.

flat

bool

Conversion to flat form of composite fields.

Request example
GET /rest/v1/uc/representatives/9b64ae6e-016c-d737-bb5c-50e54938780c HTTP/1.1

Response

Field Description: representative entity

Response example
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

Request example
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

Response example
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

Request

Request example
DELETE /rest/v1/uc/representatives/9b64ae6e-016c-d737-bb5c-50e54938780c HTTP/1.1

Response

Response example
HTTP/1.1 204 No Content

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

Request example
LOOKUP /rest/v1/uc/representatives HTTP/1.1
Content-Type: application/json; charset=utf-8

"4f3fc6d5-016c-d738-96f2-50e54938780c"

Response

Example of a successful response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8

[
  "4f3fc6d5-016c-d738-96f2-50e54938780c"
]
Example of an unsuccessful response
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8

{
  "error_code": 1404,
  "error_message": "Lookup failed"
}