Update Trunk Group
This request updates the Trunk Group object, targeted by secure ID.
| patch | /trunk_groups/{trunk_group_sid} |
| put | /trunk_groups/{trunk_group_sid} |
Sample
A sample PATCH request to update request to update the trunk group targeted by secure ID:
curl -X PATCH \
'https://api.carrierx.com/core/v2/trunk_groups/c7eae0b4-5eda-4964-8998-d514903b4af0' \
-H 'Content-Type: application/json' \
--data-binary '{"name": "TrunkGroup4"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200 status code with a serialized copy of the updated Trunk Group object:
{
"acls": [],
"hard_failure_codes": "408;",
"hard_failure_cooldown": 120,
"hard_failure_interval": 60,
"hard_failure_last_resort": "first",
"hard_failure_threshold": 3,
"name": "TrunkGroup4",
"partner_sid": "ed437757-002d-4ecc-aa5a-efdf5e50dba0",
"routing_data": null,
"routing_type": "failover",
"sip_options_locations": [],
"sip_options_threshold": 3,
"soft_failure_codes": "408;",
"transformations": [],
"trunk_group_sid": "c7eae0b4-5eda-4964-8998-d514903b4af0"
}
A Trunk Group object can be updated using either a PATCH or PUT request.
-
A
PATCHrequest can be used to update one or more attribute values. When using aPATCHrequest, only the attributes specified in the request payload will be updated, all other attributes and values will remain the same. The trunk group secure ID is passed in the query URL, and the values to be modified are passed in the request body. -
A
PUTrequest can be used to update an entire Trunk Group object. The trunk group secure ID is passed in the query URL, and the entire Trunk Group object is passed in the request body.
Note, while all the fields must be present in a PUT request, not all the attribute values may be modified after the initial creation, because when created, some of them become read-only.
Required Scopes
To update a Trunk Group object, the partner must have one of the following scopes enabled:
trunk_groups.managetrunk_groups.update
Path Arguments
| Parameter | Data Type | Description |
|---|---|---|
| trunk_group_sid required | string | The trunk group secure ID. |
Body Arguments
JSON representation of the fields and values to be updated.
Fields that can be modified are:
aclshard_failure_codeshard_failure_cooldownhard_failure_intervalhard_failure_last_resorthard_failure_thresholdnamerouting_datarouting_typesip_options_locationssip_options_thresholdsoft_failure_codestransformations
Refer to this table to view all fields that appear in the Trunk Group object.