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

No

Inclusion

sort

string

No

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.

Fielding:

Value

Returns:

name

The name attribute.

created_at

The created_at attribute.

capacity_limit

The capacity_limit attribute.

Examples

http

GET /v3/voice_in_trunk_groups HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

curl

curl -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

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "data": [
    {
      "id": "65b401cb-42f5-4911-877d-dc317a46b478",
      "type": "voice_in_trunk_groups",
      "links": {
        "self": "https://api.didww.com/v3/voice_in_trunk_groups/65b401cb-42f5-4911-877d-dc317a46b478"
      },
      "attributes": {
        "created_at": "2017-06-25T14:56:31.513Z",
        "name": "Common Group",
        "capacity_limit": 69
      },
      "relationships": {
        "voice_in_trunks": {
          "links": {
            "self": "https://api.didww.com/v3/voice_in_trunk_groups/65b401cb-42f5-4911-877d-dc317a46b478/relationships/voice_in_trunks",
            "related": "https://api.didww.com/v3/voice_in_trunk_groups/65b401cb-42f5-4911-877d-dc317a46b478/voice_in_trunks"
          }
        }
      },
      "meta": {
        "trunks_count": 1
      }
    },
    {
      "id": "72a60b4a-affb-46c7-8a8a-7e042c7611e8",
      "type": "voice_in_trunk_groups",
      "links": {
        "self": "https://api.didww.com/v3/voice_in_trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8"
      },
      "attributes": {
        "created_at": "2017-06-25T14:56:31.513Z",
        "name": "Custom Group",
        "capacity_limit": 50
      },
      "relationships": {
        "voice_in_trunks": {
          "links": {
            "self": "https://api.didww.com/v3/voice_in_trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8/relationships/voice_in_trunks",
            "related": "https://api.didww.com/v3/voice_in_trunk_groups/72a60b4a-affb-46c7-8a8a-7e042c7611e8/voice_in_trunks"
          }
        }
      },
      "meta": {
        "trunks_count": 0
      }
    }
  ],
  "meta": {
    "total_records": 2
  },
  "links": {
    "first": "https://api.didww.com/v3/voice_in_trunk_groups?page%5Bnumber%5D=1&page%5Bsize%5D=50",
    "last": "https://api.didww.com/v3/voice_in_trunk_groups?page%5Bnumber%5D=1&page%5Bsize%5D=50"
  }
}

Other Responses

Code

Success

Description

401

No

Unauthorized