Update Trunk Group
Description
Updates a Trunk Group.
Request
HTTP Method: PATCH
URI Path: /v3/trunk_groups/
URI Query Parameters:
Name |
Type |
Is Required? |
Description |
---|---|---|---|
id |
|
Yes |
Unique ID identifier of Trunk Group. |
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 |
To many | Linkage for included trunks. |
Examples
PATCH /v3/trunk_groups/43deb3aa-674a-465e-ac16-fb3084325ec7 HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"id": "43deb3aa-674a-465e-ac16-fb3084325ec7",
"type": "trunk_groups",
"attributes": {
"name": "Renamed group",
"capacity_limit": 1
}
}
}
curl -i -X PATCH https://api.didww.com/v3/trunk_groups/43deb3aa-674a-465e-ac16-fb3084325ec7 -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"capacity_limit": 1, "name": "Renamed group"}, "id": "43deb3aa-674a-465e-ac16-fb3084325ec7", "type": "trunk_groups"}}'
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "43deb3aa-674a-465e-ac16-fb3084325ec7",
"type": "trunk_groups",
"attributes": {
"created_at": "2017-06-25T14:56:31.513Z",
"name": "Renamed group",
"capacity_limit": 1
},
"relationships": {
"trunks": {
"links": {
"self": "https://api.didww.com/v3/trunk_groups/43deb3aa-674a-465e-ac16-fb3084325ec7/relationships/trunks",
"related": "https://api.didww.com/v3/trunk_groups/43deb3aa-674a-465e-ac16-fb3084325ec7/trunks"
}
}
},
"meta": {
"trunks_count": 1
}
},
"meta": {
"api_version": "2017-09-18"
}
}
PATCH /v3/trunk_groups/e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"id": "e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a",
"type": "trunk_groups",
"relationships": {
"trunks": {
"data": [
]
}
}
}
}
curl -i -X PATCH https://api.didww.com/v3/trunk_groups/e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"id": "e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a", "relationships": {"trunks": {"data": []}}, "type": "trunk_groups"}}'
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": {
"id": "e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a",
"type": "trunk_groups",
"links": {
"self": "https://api.didww.com/v3/trunk_groups/e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a"
},
"attributes": {
"created_at": "2017-06-25T14:56:31.513Z",
"name": "Common Group",
"capacity_limit": 69
},
"relationships": {
"trunks": {
"links": {
"self": "https://api.didww.com/v3/trunk_groups/e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a/relationships/trunks",
"related": "https://api.didww.com/v3/trunk_groups/e74fcf6a-bb8d-4ee0-9980-bdc24a728b9a/trunks"
}
}
},
"meta": {
"trunks_count": 0
}
},
"meta": {
"api_version": "2017-09-18"
}
}
Other Responses
Code |
Success |
Description |
---|---|---|
422 |
No |
|
401 |
No |