Query Trunks for Emergency Numbers

Query the trunks in a tenant that can be selected when adding or updating an emergency number.

Request URL

GET {base_url}/uc-cconfig/api/v1/emergency-numbers/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.

results Array<Trunk_List> The list of trunks that can be selected for emergency numbers.
Trunk_List
Parameter Type Description
id String The unique identifier of the trunk.
name String The name of the trunk.
type String The trunk type.
  • REGISTER: A register trunk.
  • PEER: A peer trunk.
  • ACCOUNT: An account trunk.

Example

Request example

GET /uc-cconfig/api/v1/emergency-numbers/trunks HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJyZWdpb24ta2V5LTEiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc4ODc4Njc2MCwiaWF0IjoxNzg4NzY1MTYwLCJqdGkiOiJkZDZmMGEzYS05NTg0LTRhOGQtYTZmYi0wOGQ2ZTE0ODdmZmUiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.1deRKiIDcYLXRg5CpWqCVFMN9a-YJT1sC3PcAHGCREP-Irc7vYOYkZT_OuV8KE2bQNRBb8P4krbM2bqXGMeen-X6cXFAVYRhcwHRgWJhZF3Xn8-uiHpESVhOAEPhEgoGS4rDmL-dzGomPQenp2C0D8l3Bwiw2cqRkHu8Y4ZxUtx7oOYvxyP84AhWPyLNX0Ge-C65ob18Lp3_m7_Z8j2EG0xnNbzk_C3IM-PozoDZJd_pccbfLI0bNWt_l5BUryRaAtz4MKHtHyPKjBH9EXxnLXwyZOC5PJ__bHTTh91MXsuiLUUHDbeTsTLQrYgPX2OGMnVwUPN8jho6YwL90rpW7g
x-tenant-code: jint

Response example

HTTP/1.1 200 OK
{
  "requestId": "4b9048bb07b8173bb3eff8d2d5bcc501",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "results": [
    {
      "id": "343306926664237056",
      "name": "222EVE",
      "type": "REGISTER"
    },
    {
      "id": "337909436766003200",
      "name": "ee",
      "type": "REGISTER"
    }
  ]
}