Get Trunk Groups
This request returns a list of trunk groups.
get | /trunk_groups |
Sample
A sample GET request to get a list of trunk groups matching the criteria in the request URL:
curl -X GET \
'https://api.carrierx.com/core/v2/trunk_groups?with_trunks=true&limit=1' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200
status code with a list of Trunk Group objects:
{
"count": 1,
"has_more": true,
"items": [
{
"acls": [],
"hard_failure_codes": "408;",
"hard_failure_cooldown": 120,
"hard_failure_interval": 60,
"hard_failure_last_resort": "first",
"hard_failure_threshold": 3,
"name": "New Trunk Group",
"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",
"trunks": [
{
"acls": [],
"allow_forward": "disabled",
"allow_transfer": false,
"asn_mode": "disable",
"call_type": "regular",
"codec": null,
"endpoint_sid": null,
"in_capacity": 0,
"in_identity_format": "passthrough",
"in_identity_mode": "passthrough",
"in_rfc_4694_mode": "cut_all",
"location_sid": null,
"name": "Trunk1",
"out_capacity": 0,
"out_identity_mode": "passthrough",
"out_rfc_4694_mode": "cut_all",
"priority": 0,
"relay_sip_headers": [],
"transformations": [],
"trunk_sid": "fd97153a-e466-4de6-9484-c3d4dde72b85",
"weight": 0
}
]
}
],
"limit": 1,
"offset": 0,
"pagination": {
"next": "https://api.carrierx.com/core/v2/trunk_groups?with_trunks=true&limit=1&offset=1"
},
"total": 14
}
This request is enabled for Pagination, Result Filtering, and Field Filtering.
Required Scopes
To get information about Trunk Group objects, the partner must have one of the following scopes enabled:
trunk_groups.manage
trunk_groups.read
Query Arguments
Parameter | Data Type | Description |
---|---|---|
with_related | boolean | Determines if the trunk group information related to the trunk group should be shown. Values accepted in this field are true and false . The default value is false . |
with_trunks | boolean | Determines whether or not to return trunk groups that have one or more trunks. |