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 |
|
No |
|
sort |
|
No |
Includes:
Value |
Description |
---|---|
voice_in_trunk |
Sorting:
Value |
Sorts by: |
---|---|
name |
The |
created_at |
The |
capacity_limit |
The |
Fielding:
Value |
Returns: |
---|---|
name |
The |
created_at |
The |
capacity_limit |
The |
Examples
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 -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"
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"
}
}
GET /v3/voice_in_trunk_groups?include=voice_in_trunks HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
curl -i -X GET 'https://api.didww.com/v3/voice_in_trunk_groups?include=voice_in_trunks' -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json"
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"data": [
{
"id": "a8176983-61c4-4768-b699-10d5f3245d90",
"type": "voice_in_trunk_groups",
"links": {
"self": "https://api.didww.com/v3/voice_in_trunk_groups/a8176983-61c4-4768-b699-10d5f3245d90"
},
"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/a8176983-61c4-4768-b699-10d5f3245d90/relationships/voice_in_trunks",
"related": "https://api.didww.com/v3/voice_in_trunk_groups/a8176983-61c4-4768-b699-10d5f3245d90/voice_in_trunks"
},
"data": [
{
"type": "voice_in_trunks",
"id": "5aa0b0ea-2bda-4424-a93c-104829d72c06"
}
]
}
},
"meta": {
"trunks_count": 1
}
},
{
"id": "def3b7b1-ce76-420d-9684-8dbdb69e17c1",
"type": "voice_in_trunk_groups",
"links": {
"self": "https://api.didww.com/v3/voice_in_trunk_groups/def3b7b1-ce76-420d-9684-8dbdb69e17c1"
},
"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/def3b7b1-ce76-420d-9684-8dbdb69e17c1/relationships/voice_in_trunks",
"related": "https://api.didww.com/v3/voice_in_trunk_groups/def3b7b1-ce76-420d-9684-8dbdb69e17c1/voice_in_trunks"
},
"data": [
]
}
},
"meta": {
"trunks_count": 0
}
}
],
"included": [
{
"id": "5aa0b0ea-2bda-4424-a93c-104829d72c06",
"type": "voice_in_trunks",
"attributes": {
"priority": 1,
"capacity_limit": 5,
"weight": 65535,
"name": "Office Mobile",
"cli_format": "e164",
"cli_prefix": null,
"description": null,
"ringing_timeout": null,
"configuration": {
"type": "pstn_configurations",
"attributes": {
"dst": "1xxxxxxxxx"
}
}
},
"relationships": {
"voice_in_trunk_group": {
"links": {
"self": "https://api.didww.com/v3/voice_in_trunks/5aa0b0ea-2bda-4424-a93c-104829d72c06/relationships/voice_in_trunk_group",
"related": "https://api.didww.com/v3/voice_in_trunks/5aa0b0ea-2bda-4424-a93c-104829d72c06/voice_in_trunk_group"
}
}
}
}
],
"meta": {
"total_records": 2
},
"links": {
"first": "https://api.didww.com/v3/voice_in_trunk_groups?include=voice_in_trunks&page%5Bnumber%5D=1&page%5Bsize%5D=50",
"last": "https://api.didww.com/v3/voice_in_trunk_groups?include=voice_in_trunks&page%5Bnumber%5D=1&page%5Bsize%5D=50"
}
}
Other Responses
Code |
Success |
Description |
---|---|---|
401 |
No |