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 |
Sparse Fieldsets:
Value |
Returns: |
|---|---|
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 {
7 "id": "2d7f943f-07c4-4b27-8792-e85806368218",
8 "type": "trunks",
9 "attributes": {
10 "priority": 1,
11 "capacity_limit": 10,
12 "weight": 2,
13 "name": "Office",
14 "cli_format": "e164",
15 "cli_prefix": "+",
16 "description": null,
17 "ringing_timeout": 30,
18 "created_at": "2017-06-25T08:21:41.795Z",
19 "configuration": {
20 "type": "sip_configurations",
21 "attributes": {
22 "username": "username",
23 "host": "example.com",
24 "port": null,
25 "codec_ids": [
26 9,
27 7
28 ],
29 "rx_dtmf_format_id": 1,
30 "tx_dtmf_format_id": 1,
31 "resolve_ruri": true,
32 "auth_enabled": true,
33 "auth_user": "username",
34 "auth_password": "password",
35 "auth_from_user": "Office",
36 "auth_from_domain": "example.com",
37 "sst_enabled": false,
38 "sst_min_timer": 600,
39 "sst_max_timer": 900,
40 "sst_accept_501": true,
41 "sip_timer_b": 8000,
42 "dns_srv_failover_timer": 2000,
43 "rtp_ping": false,
44 "rtp_timeout": 30,
45 "force_symmetric_rtp": false,
46 "symmetric_rtp_ignore_rtcp": false,
47 "rerouting_disconnect_code_ids": [
48 58,
49 59,
50 1505
51 ],
52 "sst_session_expires": null,
53 "sst_refresh_method_id": 1,
54 "transport_protocol_id": 1,
55 "max_transfers": 5,
56 "max_30x_redirects": 7
57 }
58 }
59 },
60 "relationships": {
61 "trunk_group": {
62 "links": {
63 "self": "https://api.didww.com/v3/trunks/2d7f943f-07c4-4b27-8792-e85806368218/relationships/trunk_group",
64 "related": "https://api.didww.com/v3/trunks/2d7f943f-07c4-4b27-8792-e85806368218/trunk_group"
65 }
66 }
67 }
68 },
69 {
70 "id": "34b95e8c-9b78-4e64-aea8-9e5764d8f16f",
71 "type": "trunks",
72 "attributes": {
73 "priority": 1,
74 "capacity_limit": 5,
75 "weight": 65535,
76 "name": "Office Mobile",
77 "cli_format": "e164",
78 "cli_prefix": null,
79 "description": null,
80 "ringing_timeout": null,
81 "created_at": "2017-06-25T08:21:41.795Z",
82 "configuration": {
83 "type": "pstn_configurations",
84 "attributes": {
85 "dst": "1xxxxxxxxx"
86 }
87 }
88 },
89 "relationships": {
90 "trunk_group": {
91 "links": {
92 "self": "https://api.didww.com/v3/trunks/34b95e8c-9b78-4e64-aea8-9e5764d8f16f/relationships/trunk_group",
93 "related": "https://api.didww.com/v3/trunks/34b95e8c-9b78-4e64-aea8-9e5764d8f16f/trunk_group"
94 }
95 }
96 }
97 }
98 ],
99 "meta": {
100 "total_records": 2
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}