Get Available Trunks for Tenant DID

Retrieves the list of trunks that are available for tenant DID assignment.

Request URL

GET {base_url}/uc-cconfig/api/v1/tenants/available-trunks

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

x-tenant-code Yes String The tenant name.
Note: You can obtain tenant name using the Query Tenants interface.

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.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

trunks Array<Available_Trunk> The list of available trunks.
Available_Trunk
Parameter Type Description
id String The ID of the trunk.
name String The name of the trunk.
provider String The provider of the trunk.
sipCustomHeaders Object The custom SIP headers of the trunk. This parameter is null when no custom headers are set.

Example

Request example

GET /uc-cconfig/api/v1/tenants/available-trunks HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzYwNzEyNywiaWF0IjoxNzkzNTg1NTI3LCJqdGkiOiI0YmZiY2NhOS05NDg5LTQzZjktOGZiMy1iZTA4ZmE2OWUwZWQiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.DPc3DaxJmt4WR6qcQ6f0iVYUT139u-iFoVmP0n41Sw9tefL7ByH-TpYm_X9ir4EOVmPGH-mXoFnKEIsGbPkWxLGHDD1T4c0568XmrXlW0KD93oe7IxE5tWH1sVtrrBS1w2Gpa79mf02Z4GQuzu_fMIiP0zDVL5TfKrszYpp1XcEUHrSIFvfETzBq6WkICJ1ezk5meXSlOuhr1cu-bfVcSVVELehcBKobBAwbLRZbs6n69VfJml108lWJ-0movcL08dZjU47njuuOpfO-d12Ylg6u7Y6SKn0g0pb58L9avjKZni3Aey_VzEFhiDc15RGflbw-cpcpw2--u52gECIy5A
x-tenant-code: jint

Response example

HTTP/1.1 200 OK
{
  "requestId": "0c1213002d776956de87b633dc296193",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "trunks": [
    {
      "id": "368663599724421120",
      "name": "22",
      "provider": "general",
      "sipCustomHeaders": null
    },
    {
      "id": "367177966216302592",
      "name": "ccctest",
      "provider": "general",
      "sipCustomHeaders": null
    },
    {
      "id": "347915916705816576",
      "name": "TenantX-Dedicated",
      "provider": "general",
      "sipCustomHeaders": null
    },
    {
      "id": "343306926664237056",
      "name": "222EVE",
      "provider": "general",
      "sipCustomHeaders": {
        "headers": [
          {
            "name": "eee",
            "id": "ebc58275-64c1-40db-8570-26eedafee204"
          },
          {
            "name": "222",
            "id": "c42543a2-ec62-49dc-985d-6d620ddfdf03"
          }
        ]
      }
    },
    {
      "id": "338245631606931456",
      "name": "account",
      "provider": "general",
      "sipCustomHeaders": null
    },
    {
      "id": "332790244773748736",
      "name": "3333",
      "provider": "general",
      "sipCustomHeaders": null
    }
  ]
}
Note:

The response is condensed.