Skip to main content

Get Trunks

This request returns a list of trunks for the trunk, targeted by secure ID.

get /trunk_groups/{trunk_group_sid}/trunks

Sample

A sample GET request to get trunks, targeted by trunk group secure ID:

curl -X GET \
'https://api.carrierx.com/core/v2/trunk_groups/138ed522-6633-405b-b58d-55eb0d262e32/trunks' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response

200 status code with a list of Trunk objects:

{
"count": 2,
"has_more": false,
"items": [
{
"acls": [],
"allow_forward": "disabled",
"allow_transfer": false,
"asn_mode": "disable",
"call_type": "regular",
"codec": null,
"endpoint_sid": "844346ef-93e9-4fa8-a4ab-e3015af94573",
"in_capacity": 0,
"in_identity_format": "passthrough",
"in_identity_mode": "passthrough",
"in_rfc_4694_mode": "cut_all",
"location_sid": null,
"name": "N/A",
"out_capacity": 0,
"out_identity_mode": "passthrough",
"out_rfc_4694_mode": "cut_all",
"priority": 0,
"relay_sip_headers": [],
"transformations": [],
"trunk_sid": "aed1c137-8cbf-417c-8c41-e181f425826b",
"weight": 0
},
{
"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": "trunk01",
"out_capacity": 0,
"out_identity_mode": "passthrough",
"out_rfc_4694_mode": "cut_all",
"priority": 0,
"relay_sip_headers": [],
"transformations": [],
"trunk_sid": "4c51c85c-5355-4a91-bf1e-f33d731bcfa9",
"weight": 0
}
],
"limit": 1000,
"offset": 0,
"pagination": {},
"total": 2
}

This request is enabled for Pagination, Result Filtering, and Field Filtering.

Required Scopes

To get information about Trunk objects, the partner must have one of the following scopes enabled:

  • trunk_groups.trunks.manage
  • trunk_groups.trunks.read

Path Arguments

ParameterData TypeDescription
trunk_group_sid requiredstringThe trunk group secure ID.