Create Trunk Group
Description
Creates a Trunk Group.
Request
HTTP Method: POST
URI Path: /v3/trunk_groups
URI Query Parameters:
Name |
Type |
Is Required? |
Description |
---|---|---|---|
include |
|
Optional |
Request Body Object Attributes:
Name |
Type |
Nullable |
Is Required? |
Description |
---|---|---|---|---|
name |
|
False |
Yes |
Unique name of the Trunk Group. |
capacity_limit |
|
False |
Optional |
Maximum number of simultaneous calls for the Trunk Group. |
Request Body Object Relationships:
Title |
Type |
Description |
---|---|---|
trunks |
Linkage for included trunks. |
Examples
POST /v3/trunk_groups HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "trunk_groups",
"attributes": {
"name": "Main group",
"capacity_limit": 100
}
}
}
curl -i -X POST https://api.didww.com/v3/trunk_groups -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"capacity_limit": 100, "name": "Main group"}, "type": "trunk_groups"}}'
POST /v3/trunk_groups HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "trunk_groups",
"attributes": {
"name": "Main group",
"capacity_limit": 100
}
}
}
POST /v3/trunk_groups HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "trunk_groups",
"attributes": {
"name": "Main group",
"capacity_limit": 100
},
"relationships": {
"trunks": {
"data": [
{
"type": "trunks",
"id": "b7a9d1ce-6a89-4071-bc0d-486ee223787d"
},
{
"type": "trunks",
"id": "7ca415f8-8342-427a-bbfc-171b995f75d6"
},
{
"type": "trunks",
"id": "46aa9cac-a8dd-4a06-82db-cb0731e53ba0"
}
]
}
}
}
}
curl -i -X POST https://api.didww.com/v3/trunk_groups -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"capacity_limit": 100, "name": "Main group"}, "relationships": {"trunks": {"data": [{"type": "trunks", "id": "b7a9d1ce-6a89-4071-bc0d-486ee223787d"}, {"type": "trunks", "id": "7ca415f8-8342-427a-bbfc-171b995f75d6"}, {"type": "trunks", "id": "46aa9cac-a8dd-4a06-82db-cb0731e53ba0"}]}}, "type": "trunk_groups"}}'
POST /v3/trunk_groups HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "trunk_groups",
"attributes": {
"name": "Main group",
"capacity_limit": 100
},
"relationships": {
"trunks": {
"data": [
{
"type": "trunks",
"id": "b7a9d1ce-6a89-4071-bc0d-486ee223787d"
},
{
"type": "trunks",
"id": "7ca415f8-8342-427a-bbfc-171b995f75d6"
},
{
"type": "trunks",
"id": "46aa9cac-a8dd-4a06-82db-cb0731e53ba0"
}
]
}
}
}
}
POST /v3/trunk_groups?include=trunks HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "trunk_groups",
"attributes": {
"name": "Main group",
"capacity_limit": 100
},
"relationships": {
"trunks": {
"data": [
{
"type": "trunks",
"id": "1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7"
},
{
"type": "trunks",
"id": "c606cd05-a19f-4d3c-9362-3857a79a6e1d"
}
]
}
}
}
}
curl -i -X POST 'https://api.didww.com/v3/trunk_groups?include=trunks' -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"capacity_limit": 100, "name": "Main group"}, "relationships": {"trunks": {"data": [{"type": "trunks", "id": "1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7"}, {"type": "trunks", "id": "c606cd05-a19f-4d3c-9362-3857a79a6e1d"}]}}, "type": "trunk_groups"}}'
POST /v3/trunk_groups?include=trunks HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "trunk_groups",
"attributes": {
"name": "Main group",
"capacity_limit": 100
},
"relationships": {
"trunks": {
"data": [
{
"type": "trunks",
"id": "1dcbcdae-4ad6-4c42-acc3-b4ec097dd2f7"
},
{
"type": "trunks",
"id": "c606cd05-a19f-4d3c-9362-3857a79a6e1d"
}
]
}
}
}
}
Other Responses
Code |
Success |
Description |
---|---|---|
422 |
No |
|
401 |
No |