Conference calls (selectors)

Requests

HTTP verb Endpoint Description

POST

/rest/v1/uc/selectors

Creating a new selector

GET

/rest/v1/uc/selectors

Getting the list of selectors

GET

/rest/v1/uc/selectors/<id>

Receiving selector data

PATCH

/rest/v1/uc/selectors/<id>

Changing selector data

DELETE

/rest/v1/uc/selectors/<id>

Removing the selector


Creating a new selector

Request

Field Description: selector entity

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

selector entity

Response

Field Description: selector entity

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "2c51f8a2-016d-5d72-d44a-50e54938780c",
  "state": "waiting"
}

Getting the list of selectors

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, name, login, phonenumber, reg, iduser, opts.modextin, opts.modextout, opts.trunks, 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/selectors?offset=0&limit=2 HTTP/1.1

Response

Field Description: selector entity

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

[
  {
    "id": "2c51f8a2-016d-5d72-d44a-50e54938780c",
    "state": "waiting",
    "calldurationsec": 0,
    "calltimeout": 20,
    "displayname": "SelectorAAA",
    "enabled": false,
    "timestartutc": "2019-09-23 14:30",
    "topology_mode": "topology",
    "comment": "",
    "default_mic": true,
    "default_recall": true,
    "default_spk": true
  },
  {
    "id": "d713088d-016d-5d72-ae04-50e54938780c",
    "state": "waiting",
    "calldurationsec": 300,
    "calldurationsec": 20,
    "displayname": "SelectorBBB",
    "enabled": false,
    "timestartutc": "2019-09-23 09:30",
    "topology_mode": "abonent",
    "comment": "test",
    "default_mic": true,
    "default_recall": true,
    "default_spk": true
  }
]

Receiving selector data

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/selectors/2c51f8a2-016d-5d72-d44a-50e54938780c HTTP/1.1

Response

Field Description: selector entity

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "2c51f8a2-016d-5d72-d44a-50e54938780c",
  "state": "waiting",
  "calldurationsec": 0,
  "calltimeout": 20,
  "displayname": "SelectorAAA",
  "enabled": false,
  "timestartutc": "2019-09-23 14:30",
  "topology_mode": "topology",
  "comment": "",
  "default_mic": true,
  "default_recall": true,
  "default_spk": true
}

Changing selector data

Fields prohibited for modification: id

Request

Field Description: selector entity

Request example
PATCH /rest/v1/uc/selectors/2c51f8a2-016d-5d72-d44a-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8

selector entity

Response

Field Description: selector entity

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "id": "2c51f8a2-016d-5d72-d44a-50e54938780c",
  "state": "waiting",
  "calldurationsec": 300,
  "calltimeout": 20,
  "displayname": "Hello World",
  "enabled": true,
  "timestartutc": "2019-09-23 14:30",
  "topology_mode": "abonent",
  "comment": "test",
  "default_mic": true,
  "default_recall": true,
  "default_spk": true
}

Removing the selector

Request

Request example
DELETE /rest/v1/uc/selectors/2c51f8a2-016d-5d72-d44a-50e54938780c HTTP/1.1

Response

Response example
HTTP/1.1 204 No Content

Table of Contents (subsidiary composite resources)

See also