Group rooms (sipgroups)

Requests

HTTP verb Endpoint Description

POST

/rest/v1/uc/sipgroups

Creating a new group number

GET

/rest/v1/uc/sipgroups

Getting the list of group numbers

GET

/rest/v1/uc/sipgroups/<id>

Receiving group number data

PATCH

/rest/v1/uc/sipgroups/<id>

Changing group number data

DELETE

/rest/v1/uc/sipgroups/<id>

Deleting a group number

LOOKUP

/rest/v1/uc/sipgroups

Searching for the group number identifier


Creating a new group number

Request

Field Description: group entity

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

group entity

Response

Field Description: group entity

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

{
  "id": "ba18a3e4-016c-d758-54da-50e54938780c",
  "phonenumber": "500",
  "type": "cascade",
  "dialplan": [
    {
      "dial": ["511"],
      "timeout": 10000
    },
    {
      "dial": ["512", "513"]
    }
  ],
  "pickup": 1,
  "opts": {
    "title": "",
    "comment": ""
  },
  "ext": {
    "ct": "2019-08-28T08:29:46.74Z",
    "lwt": "2019-08-28T08:29:46.74Z"
  }
}

Getting the list of group numbers

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, phonenumber, type, dialplan, pickup, 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/sipgroups?offset=0&limit=2 HTTP/1.1

Response

Field Description: group entity

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

[
  {
    "id": "495079be-016c-d757-e913-50e54938780c",
    "phonenumber": "200",
    "type": "random",
    "dialplan": [
      {"dial": ["211", "212"]}
    ],
    "pickup": 0,
    "opts": {
      "title": ""
    },
    "ext": {
      "ct": "2019-08-28T08:29:18.48Z",
      "lwt": "2019-08-28T08:29:18.48Z"
    }
  },
  {
    "id": "ba18a3e4-016c-d758-54da-50e54938780c",
    "phonenumber": "500",
    "type": "random",
    "dialplan": [
      {"dial": ["511"]},
      {"dial": ["511", "512"]}
    ],
    "pickup": 1,
    "opts": {
      "title": ""
    },
    "ext": {
      "ct": "2019-08-28T08:29:46.74Z",
      "lwt": "2019-09-08T12:13:55.01Z"
    }
  }
]

Receiving group number 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/sipgroups/ba18a3e4-016c-d758-54da-50e54938780c HTTP/1.1

Response

Field Description: group entity

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

{
  "id": "ba18a3e4-016c-d758-54da-50e54938780c",
  "phonenumber": "500",
  "type": "cascade",
  "dialplan": [
    {
      "dial": ["511"],
      "timeout": 10000
    },
    {
      "dial": ["512", "513"]
    }
  ],
  "pickup": 1,
  "opts": {
    "title": "",
    "comment": ""
  },
  "ext": {
    "ct": "2019-08-28T08:29:46.74Z",
    "lwt": "2019-08-28T08:29:46.74Z"
  }
}

Changing group number data

Fields prohibited for modification: id

Request

Field Description: group entity

Request example
PATCH /rest/v1/uc/sipgroups/ba18a3e4-016c-d758-54da-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8

group entity

Response

Field Description: group entity

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

{
  "id": "ba18a3e4-016c-d758-54da-50e54938780c",
  "phonenumber": "500",
  "type": "parallel",
  "dialplan": [
    {
      "dial": [
        "511"
      ]
    },
    {
      "dial": [
        "512"
      ]
    },
    {
      "dial": [
        "513"
      ]
    }
  ],
  "pickup": 1,
  "opts": {
    "title": "Marketing Department",
    "comment": ""
  },
  "ext": {
    "ct": "2019-08-28T08:29:46.74Z",
    "lwt": "2019-09-08T12:38:24.39Z"
  }
}

Deleting a group number

Request

Request example
DELETE /rest/v1/uc/sipgroups/ba18a3e4-016c-d758-54da-50e54938780c HTTP/1.1

Response

Response example
HTTP/1.1 204 No Content

Searching for the group number identifier

Searches the resource for the specified key, returns the identifier(s) to build the endpoint.

Key fields to search for: id, phonenumber

Request

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

"500"

Response

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

[
  "ba18a3e4-016c-d758-54da-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"
}