Get Voice IN Trunk Groups#

Description

Returns a collection of Trunk Groups.

Request#

HTTP Method: GET

URI Path: /v3/voice_in_trunk_groups

URI Query Parameters:

Name

Type

Is Required?

Description

include

string

Optional

Inclusion

sort

string

Optional

Sorting

Includes:

Value

Description

voice_in_trunk

Trunk Object

Sorting:

Value

Sorts by:

name

The name field.

created_at

The created_at field.

capacity_limit

The capacity_limit field.

Sparse Fieldsets:

Value

Returns:

name

The name attribute.

created_at

The created_at attribute.

capacity_limit

The capacity_limit attribute.

Examples#

http

1GET /v3/voice_in_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/voice_in_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    {
 7      "id": "65b401cb-42f5-4911-877d-dc317a46b478",
 8      "type": "voice_in_trunk_groups",
 9      "links": {
10        "self": "https://api.didww.com/v3/voice_in_trunk_groups/65b401cb-42f5-4911-877d-dc317a46b478"
11      },
12      "attributes": {
13        "created_at": "2017-06-25T14:56:31.513Z",
14        "name": "Common Group",
15        "capacity_limit": 69
16      },
17      "relationships": {
18        "voice_in_trunks": {
19          "links": {
20            "self": "https://api.didww.com/v3/voice_in_trunk_groups/65b401cb-42f5-4911-877d-dc317a46b478/relationships/voice_in_trunks",
21            "related": "https://api.didww.com/v3/voice_in_trunk_groups/65b401cb-42f5-4911-877d-dc317a46b478/voice_in_trunks"
22          }
23        }
24      },
25      "meta": {
26        "trunks_count": 1
27      }
28    },
29    {
30      "id": "72a60b4a-affb-46c7-8a8a-7e042c7611e8",
31      "type": "voice_in_trunk_groups",
32      "links": {
33        "self": "https://api.didww.com/v3/voice_in_trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8"
34      },
35      "attributes": {
36        "created_at": "2017-06-25T14:56:31.513Z",
37        "name": "Custom Group",
38        "capacity_limit": 50
39      },
40      "relationships": {
41        "voice_in_trunks": {
42          "links": {
43            "self": "https://api.didww.com/v3/voice_in_trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8/relationships/voice_in_trunks",
44            "related": "https://api.didww.com/v3/voice_in_trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8/voice_in_trunks"
45          }
46        }
47      },
48      "meta": {
49        "trunks_count": 0
50      }
51    }
52  ],
53  "meta": {
54    "total_records": 2
55  },
56  "links": {
57    "first": "https://api.didww.com/v3/voice_in_trunk_groups?page%5Bnumber%5D=1&page%5Bsize%5D=50",
58    "last": "https://api.didww.com/v3/voice_in_trunk_groups?page%5Bnumber%5D=1&page%5Bsize%5D=50"
59  }
60}

Other Responses#

Code

Success

Description

401

No

Unauthorized