Get Available Trunks for DID
Retrieves the list of trunks that are available for DID assignment, based on the specified DID IDs.
Request URL
POST {base_url}/uc-cconfig/api/v1/trunks/available-for-did
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.
- Body parameters
-
Parameter Required Type Description didIds No Array<String> The list of DID IDs to filter trunks by.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| results | Array<Trunk_Item> | The list of trunks available for DID assignment. |
- Trunk_Item
-
Parameter Type Description id String The ID of the trunk. name String The name of the trunk. trunkType String The type of the trunk:
ACCOUNTREGISTERPEER
Example
Request example
POST /uc-cconfig/api/v1/trunks/available-for-did HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzYxMjE2OSwiaWF0IjoxNzkzNTkwNTY5LCJqdGkiOiJhODQ5ZTIwZS1mMTNjLTQyNjEtYWQ1ZS05MjU5MTJmYTFiNDgiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.K9aZBSRYSw7sSaHgcl98sZYs1cLsZiBMFzX8TGnDieUhoSgHxj1I0b1Z1uvdS-klZlrJiD4eDBZ9YAT7Vz1fObZoQMutkWLCjOx0YsOXoMEknii3_ZMz_wCzCAAonhFL8wI9GOr_6HqA7Z3rXMw4TA1wlujndK7qKWFD-fIH5Woa9cvYrGE8p6Q66Gj_x3FwAddVj1Xoca-3xV7kPvbw47CPlNfInsNOMlVNksHz3gZPX-DKCZVRRCqbQ9WA0bs4OFD2j0J-5M8K8dw7E-BBN4PwJkEg6a_fyrc0gm11DlE2tJgZ8ag5mFRc8DN3PP62OGOSJBWYOkauhZkuZhQ8_w
Content-Type: application/json
{
"didIds": [
"367178921942994944"
]
}
Response example
HTTP/1.1 200 OK { "requestId": "a5895902efaf5dd260fafc56f50ac2ea", "code": "200", "message": "SUCCESS", "detailMessage": "", "results": [ { "id": "368663599724421120", "name": "22", "trunkType": "PEER" }, { "id": "367177966216302592", "name": "ccctest", "trunkType": "ACCOUNT" }, { "id": "347915916705816576", "name": "TenantX-Dedicated", "trunkType": "ACCOUNT" }, { "id": "343306926664237056", "name": "222EVE", "trunkType": "REGISTER" }, { "id": "338245631606931456", "name": "account", "trunkType": "ACCOUNT" }, { "id": "332790244773748736", "name": "3333", "trunkType": "PEER" }, { "id": "332788982565068800", "name": "22222", "trunkType": "PEER" } ] }