Get Trunks#
Description
Returns the collection of Tunks.
Request#
HTTP Method: GET
URI Path: /v3/trunks
URI Query Parameters:
Name |
Type |
Is Required? |
Description |
|---|---|---|---|
filter[<filter_name>] |
|
Optional |
|
sort |
|
Optional |
Filters:
Filter Name |
Type |
Allow Blank |
Allow Array |
Filters by: |
|---|---|---|---|---|
id |
|
No |
Yes |
Trunk |
name |
|
Yes |
Yes |
Trunk |
configuration.type |
|
Yes |
Yes |
The type of configuration (SIP, PSTN, etc). |
Sorting:
Value |
Sorts by: |
|---|---|
name |
The |
priority |
The |
capacity_limit |
The |
weight |
The |
cli_format |
The |
cli_prefix |
The |
description |
The |
ringing_timeout |
The |
created_at |
The |
Example#
http
1GET /v3/trunks HTTP/1.1
2Host: api.didww.com
3Content-Type: application/vnd.api+json
4Accept: application/vnd.api+json
5Api-Key: [API token]
curl
1curl -i -X GET https://api.didww.com/v3/trunks -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json"
response
1HTTP/1.1 200 OK
2Content-Type: application/vnd.api+json
3
4{
5 "data": [{
6 "id": "2d7f943f-07c4-4b27-8792-e85806368218",
7 "type": "trunks",
8 "attributes": {
9 "priority": 1,
10 "capacity_limit": 10,
11 "weight": 2,
12 "name": "Office",
13 "cli_format": "e164",
14 "cli_prefix": "+",
15 "description": null,
16 "ringing_timeout": 30,
17 "created_at": "2017-06-25T08:21:41.795Z",
18 "configuration": {
19 "type": "sip_configurations",
20 "attributes": {
21 "username": "username",
22 "host": "example.com",
23 "port": null,
24 "codec_ids": [
25 9,
26 7
27 ],
28 "rx_dtmf_format_id": 1,
29 "tx_dtmf_format_id": 1,
30 "resolve_ruri": true,
31 "auth_enabled": true,
32 "auth_user": "username",
33 "auth_password": "password",
34 "auth_from_user": "Office",
35 "auth_from_domain": "example.com",
36 "sst_enabled": false,
37 "sst_min_timer": 600,
38 "sst_max_timer": 900,
39 "sst_accept_501": true,
40 "sip_timer_b": 8000,
41 "dns_srv_failover_timer": 2000,
42 "rtp_ping": false,
43 "rtp_timeout": 30,
44 "force_symmetric_rtp": false,
45 "symmetric_rtp_ignore_rtcp": false,
46 "rerouting_disconnect_code_ids": [
47 58,
48 59,
49 1505
50 ],
51 "sst_session_expires": null,
52 "sst_refresh_method_id": 1,
53 "transport_protocol_id": 1,
54 "max_transfers": 5,
55 "max_30x_redirects": 7
56 }
57 }
58 },
59 "relationships": {
60 "trunk_group": {
61 "links": {
62 "self": "https://api.didww.com/v3/trunks/2d7f943f-07c4-4b27-8792-e85806368218/relationships/trunk_group",
63 "related": "https://api.didww.com/v3/trunks/2d7f943f-07c4-4b27-8792-e85806368218/trunk_group"
64 }
65 }
66 }
67 },
68 {
69 "id": "34b95e8c-9b78-4e64-aea8-9e5764d8f16f",
70 "type": "trunks",
71 "attributes": {
72 "priority": 1,
73 "capacity_limit": 5,
74 "weight": 65535,
75 "name": "Office Mobile",
76 "cli_format": "e164",
77 "cli_prefix": null,
78 "description": null,
79 "ringing_timeout": null,
80 "created_at": "2017-06-25T08:21:41.795Z",
81 "configuration": {
82 "type": "pstn_configurations",
83 "attributes": {
84 "dst": "1xxxxxxxxx"
85 }
86 }
87 },
88 "relationships": {
89 "trunk_group": {
90 "links": {
91 "self": "https://api.didww.com/v3/trunks/34b95e8c-9b78-4e64-aea8-9e5764d8f16f/relationships/trunk_group",
92 "related": "https://api.didww.com/v3/trunks/34b95e8c-9b78-4e64-aea8-9e5764d8f16f/trunk_group"
93 }
94 }
95 }
96 }
97 ],
98 "meta": {
99 "total_records": 2,
100 "api_version": "2017-09-18"
101 },
102 "links": {
103 "first": "https://api.didww.com/v3/trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50",
104 "last": "https://api.didww.com/v3/trunks?page%5Bnumber%5D=1&page%5Bsize%5D=50"
105 }
106}