Get Trunk Groups#
Description
Returns a collection of Trunk Groups.
Request#
HTTP Method: GET
URI Path: /v3/trunk_groups
URI Query Parameters:
Includes:
Value |
Description |
|---|---|
trunks |
Sorting:
Value |
Sorts by: |
|---|---|
name |
The |
created_at |
The |
capacity_limit |
The |
Examples#
http
1GET /v3/trunk_groups 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/trunk_groups -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": "65b401cb-42f5-4911-877d-dc317a46b478",
7 "type": "trunk_groups",
8 "links": {
9 "self": "https://api.didww.com/v3/trunk_groups/65b401cb-42f5-4911-877d-dc317a46b478"
10 },
11 "attributes": {
12 "created_at": "2017-06-25T14:56:31.513Z",
13 "name": "Common Group",
14 "capacity_limit": 69
15 },
16 "relationships": {
17 "trunks": {
18 "links": {
19 "self": "https://api.didww.com/v3/trunk_groups/65b401cb-42f5-4911-877d-dc317a46b478/relationships/trunks",
20 "related": "https://api.didww.com/v3/trunk_groups/65b401cb-42f5-4911-877d-dc317a46b478/trunks"
21 }
22 }
23 },
24 "meta": {
25 "trunks_count": 1
26 }
27 },
28 {
29 "id": "72a60b4a-affb-46c7-8a8a-7e042c7611e8",
30 "type": "trunk_groups",
31 "links": {
32 "self": "https://api.didww.com/v3/trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8"
33 },
34 "attributes": {
35 "created_at": "2017-06-25T14:56:31.513Z",
36 "name": "Custom Group",
37 "capacity_limit": 50
38 },
39 "relationships": {
40 "trunks": {
41 "links": {
42 "self": "https://api.didww.com/v3/trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8/relationships/trunks",
43 "related": "https://api.didww.com/v3/trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8/trunks"
44 }
45 }
46 },
47 "meta": {
48 "trunks_count": 0,
49 "api_version": "2017-09-18"
50 }
51 }
52 ],
53 "meta": {
54 "total_records": 2,
55 "api_version": "2017-09-18"
56 },
57 "links": {
58 "first": "https://api.didww.com/v3/trunk_groups?page%5Bnumber%5D=1&page%5Bsize%5D=50",
59 "last": "https://api.didww.com/v3/trunk_groups?page%5Bnumber%5D=1&page%5Bsize%5D=50"
60 }
61}
http
1GET /v3/trunk_groups?include=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/trunk_groups?include=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": "a8176983-61c4-4768-b699-10d5f3245d90",
7 "type": "trunk_groups",
8 "links": {
9 "self": "https://api.didww.com/v3/trunk_groups/a8176983-61c4-4768-b699-10d5f3245d90"
10 },
11 "attributes": {
12 "created_at": "2017-06-25T14:56:31.513Z",
13 "name": "Common Group",
14 "capacity_limit": 69
15 },
16 "relationships": {
17 "trunks": {
18 "links": {
19 "self": "https://api.didww.com/v3/trunk_groups/a8176983-61c4-4768-b699-10d5f3245d90/relationships/trunks",
20 "related": "https://api.didww.com/v3/trunk_groups/a8176983-61c4-4768-b699-10d5f3245d90/trunks"
21 },
22 "data": [{
23 "type": "trunks",
24 "id": "5aa0b0ea-2bda-4424-a93c-104829d72c06"
25 }]
26 }
27 },
28 "meta": {
29 "trunks_count": 1
30 }
31 },
32 {
33 "id": "def3b7b1-ce76-420d-9684-8dbdb69e17c1",
34 "type": "trunk_groups",
35 "links": {
36 "self": "https://api.didww.com/v3/trunk_groups/def3b7b1-ce76-420d-9684-8dbdb69e17c1"
37 },
38 "attributes": {
39 "created_at": "2017-06-25T14:56:31.513Z",
40 "name": "Custom Group",
41 "capacity_limit": 50
42 },
43 "relationships": {
44 "trunks": {
45 "links": {
46 "self": "https://api.didww.com/v3/trunk_groups/def3b7b1-ce76-420d-9684-8dbdb69e17c1/relationships/trunks",
47 "related": "https://api.didww.com/v3/trunk_groups/def3b7b1-ce76-420d-9684-8dbdb69e17c1/trunks"
48 },
49 "data": [
50
51 ]
52 }
53 },
54 "meta": {
55 "trunks_count": 0
56 }
57 }
58 ],
59 "included": [{
60 "id": "5aa0b0ea-2bda-4424-a93c-104829d72c06",
61 "type": "trunks",
62 "attributes": {
63 "priority": 1,
64 "capacity_limit": 5,
65 "weight": 65535,
66 "name": "Office Mobile",
67 "cli_format": "e164",
68 "cli_prefix": null,
69 "description": null,
70 "ringing_timeout": null,
71 "configuration": {
72 "type": "pstn_configurations",
73 "attributes": {
74 "dst": "1xxxxxxxxx"
75 }
76 }
77 },
78 "relationships": {
79 "trunk_group": {
80 "links": {
81 "self": "https://api.didww.com/v3/trunks/5aa0b0ea-2bda-4424-a93c-104829d72c06/relationships/trunk_group",
82 "related": "https://api.didww.com/v3/trunks/5aa0b0ea-2bda-4424-a93c-104829d72c06/trunk_group"
83 }
84 }
85 }
86 }],
87 "meta": {
88 "total_records": 2,
89 "api_version": "2017-09-18"
90 },
91 "links": {
92 "first": "https://api.didww.com/v3/trunk_groups?include=trunks&page%5Bnumber%5D=1&page%5Bsize%5D=50",
93 "last": "https://api.didww.com/v3/trunk_groups?include=trunks&page%5Bnumber%5D=1&page%5Bsize%5D=50"
94 }
95}
Other Responses#
Code |
Success |
Description |
|---|---|---|
401 |
No |