Search Trunks

Searches trunks with pagination.

Request URL

POST {base_url}/uc-cconfig/api/v1/trunks/search-page

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
pageNumber No Integer The page number to retrieve.
pageSize No Integer The number of records to retrieve per page.
trunkTypes No Array<String>

The list of trunk types to filter by.

Valid value:

  • ACCOUNT
  • REGISTER
  • PEER
owner No String The owner to filter by.
keyword No String The keyword used to search for trunks.
provider No String The provider to filter by.
name No String The name to search for.
hostAddress No String The host address to search for.
creator No String The creator to filter by.
remark No String The remark to search for.
sorts No Array<Sort_Condition> The sort conditions.
Sort_Condition
Parameter Required Type Description
property No String The name of the field to sort by.
direction No String The sort order.

Valid value:

  • asc: Sort in ascending order.
  • desc: Sort in descending order.

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.

result Object<Search_Result> The search result of trunks.
Search_Result
Parameter Type Description
pageSize Integer The number of records per page.
pageNumber Integer The current page number.
count String The total number of matching records.
results Array<Trunk_List_Item> The list of trunks on the current page.
Trunk_List_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:

  • ACCOUNT
  • REGISTER
  • PEER
provider String The provider of the trunk.
hostAddress String The host address of the trunk.
statusInfo Object<Status_Info> The registration and call status of the trunk.
ownerDisplay String The display name of the trunk owner.
ownerType String The type of the trunk owner.
creator String The creator of the trunk.
remark String The remark of the trunk.
Status_Info
Parameter Type Description
status String

The registration status of the trunk:

  • REGISTERED: The trunk is registered.
  • UNREGISTERED: The trunk is not registered.
  • DISABLED: The trunk is disabled.
  • REJECTED: The registration was rejected.
  • FAILED: The registration failed.
responseTimeMs Integer The response time of the trunk in milliseconds.
registrantAddress String The registrant address of the trunk.
busyLimits String The busy limits of the trunk.
inboundLimitReached Boolean

Whether the inbound call limit is reached.

  • true: Reached.
  • false: Not reached.
outboundLimitReached Boolean

Whether the outbound call limit is reached.

  • true: Reached.
  • false: Not reached.
totalLimitReached Boolean

Whether the total call limit is reached.

  • true: Reached.
  • false: Not reached.
rawStatus String The raw status string from the server.

Example

Request example

POST /uc-cconfig/api/v1/trunks/search-page 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
{
  "pageNumber": 1,
  "pageSize": 5
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "86d1fae197ca958f271684283b4b56aa",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "pageSize": 5,
    "pageNumber": 1,
    "count": 8,
    "results": [
      {
        "id": "368663599724421120",
        "name": "22",
        "trunkType": "PEER",
        "provider": "general",
        "hostAddress": "1.2.3.4:5060",
        "statusInfo": {
          "status": "DISABLED",
          "responseTimeMs": 0,
          "registrantAddress": "",
          "busyLimits": null,
          "rawStatus": ""
        },
        "ownerDisplay": "Admin / distributorexample@outlook.com",
        "ownerType": "admin",
        "creator": "DD li",
        "remark": "",
        "createdAt": "1791963451612",
        "updatedAt": "1793095771612",
        "assignedTo": "My Tenant",
        "didCount": 0,
        "assignedDidCount": 0,
        "activeCalls": 0,
        "totalLimit": -1,
        "peakCurrentMonth": 0,
        "peakLastMonth": 0
      },
      {
        "id": "367177966216302592",
        "name": "ccctest",
        "trunkType": "ACCOUNT",
        "provider": "general",
        "hostAddress": "",
        "statusInfo": {
          "status": "UNREACHABLE",
          "responseTimeMs": 138,
          "registrantAddress": "103.84.136.171:3920",
          "busyLimits": null,
          "rawStatus": ""
        },
        "ownerDisplay": "Admin / distributorexample@outlook.com",
        "ownerType": "admin",
        "creator": "DD li",
        "remark": "",
        "createdAt": "1791609248982",
        "updatedAt": "1792553294035",
        "assignedTo": "My Tenant",
        "didCount": 1,
        "assignedDidCount": 1,
        "activeCalls": 0,
        "totalLimit": -1,
        "peakCurrentMonth": 0,
        "peakLastMonth": 1
      },
      {
        "id": "347915916705816576",
        "name": "TenantX-Dedicated",
        "trunkType": "ACCOUNT",
        "provider": "general",
        "hostAddress": "",
        "statusInfo": {
          "status": "DISABLED",
          "responseTimeMs": 0,
          "registrantAddress": "",
          "busyLimits": null,
          "rawStatus": ""
        },
        "ownerDisplay": "Admin / distributorexample@outlook.com",
        "ownerType": "admin",
        "creator": "DD li",
        "remark": "",
        "createdAt": "1787016818507",
        "updatedAt": "1787017910722",
        "assignedTo": "My Tenant",
        "didCount": 1,
        "assignedDidCount": 1,
        "activeCalls": 0,
        "totalLimit": -1,
        "peakCurrentMonth": 0,
        "peakLastMonth": 0
      },
      {
        "id": "343306926664237056",
        "name": "222EVE",
        "trunkType": "REGISTER",
        "provider": "general",
        "hostAddress": "a.b.c:5060",
        "statusInfo": {
          "status": "DISABLED",
          "responseTimeMs": 0,
          "registrantAddress": "",
          "busyLimits": null,
          "rawStatus": ""
        },
        "ownerDisplay": "Admin / distributorexample@outlook.com",
        "ownerType": "admin",
        "creator": "DD li",
        "remark": "",
        "createdAt": "1785917949651",
        "updatedAt": "1792042132367",
        "assignedTo": "My Tenant, Reseller (2)",
        "didCount": 23,
        "assignedDidCount": 12,
        "activeCalls": 0,
        "totalLimit": 20,
        "peakCurrentMonth": 0,
        "peakLastMonth": 0
      },
      {
        "id": "338245631606931456",
        "name": "account",
        "trunkType": "ACCOUNT",
        "provider": "general",
        "hostAddress": "",
        "statusInfo": {
          "status": "DISABLED",
          "responseTimeMs": 0,
          "registrantAddress": "",
          "busyLimits": null,
          "rawStatus": ""
        },
        "ownerDisplay": "Admin / distributorexample@outlook.com",
        "ownerType": "admin",
        "creator": "DD li",
        "remark": "",
        "createdAt": "1784711242875",
        "updatedAt": "1787016338220",
        "assignedTo": "My Tenant, Reseller (3)",
        "didCount": 0,
        "assignedDidCount": 0,
        "activeCalls": 0,
        "totalLimit": -1,
        "peakCurrentMonth": 0,
        "peakLastMonth": 0
      }
    ],
    "ucTrunkCount": 7
  }
}
Note:

The response is condensed.