Add an Extension Group

Add and configure an extension group.

Request URL

{base_url}/{api_path}/extensiongroup/add?token={token}

Request parameters

Parameter Request Type Description
name Yes String The extension group name.
members Yes String The members of the extension group.
Note: Separate multiple members by commas.

Response parameters

Parameter Type Description
status String Request result.
  • Success
  • Failed
id Integer The unique ID of an extension group. After the extension group is added successfully, the system will automatically assign an id to the extension group.
errornum String The extension number does not exist.

Examples

Request example 1

Add an extension group, and define the extension group name as "sale".

POST /api/v2.0.0/extensiongroup/add?token=45e3ddb103930c8d006a768d46e2af7b HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150
{
  "name": "sale",
  "members": "1000,1001,1002"
 }

Response example 1

The extension group "sale" is successfully added.

HTTP/1.1 200 OK
Server: Boa/0.94.101wk
Accept-Ranges: bytes
Connection: close
Content-Type: application/json
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
  "status":"Success",
  "id":"7"
 }

Request example 2

Add an extension group, and define the extension group name as "test".
POST /api/v2.0.0/extensiongroup/add?token=45e3ddb103930c8d006a768d46e2af7b HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150
{
  "name": "test",
  "members": "1004,1005,1055"
 }

Response example 2

The extension number "1055" does not exist, the application server returns the error number.

HTTP/1.1 200 OK
Server: Boa/0.94.101wk
Accept-Ranges: bytes
Connection: close
Content-Type: application/json
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
  "status":"Success",
  "id":"8",
  "errnum":"1055"
 }