Search Tenant DIDs

Searches the DIDs that are assigned to the current tenant with pagination.

Request URL

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

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.
Body parameters
Parameter Required Type Description
pageNumber Yes Integer The page number to query, starting from 1.
pageSize Yes Integer The number of records per page. The value 0 returns all records without pagination; otherwise the value ranges from 1 to 500.
keyword No String The keyword used to search for DIDs, which matches the number or name. Multiple words are split by slashes and spaces and combined with AND.
sorts No Array<Sort_Condition> The sort conditions.
trunkId No String The ID of the trunk to filter by. The value 0 does not filter by trunk. A non-zero value must belong to the current tenant.
did No String The DID number to filter by, which matches the default display format or the E.164 number.
didName No String The DID name to filter by.
numberType No String The number type to filter by.
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<Tenant_DID_Search_Result> The search result of tenant DIDs.
Tenant_DID_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<Tenant_DID_Item> The list of DIDs on the current page.
Tenant_DID_Item
Parameter Type Description
id String The ID of the DID.
defaultDisplayFormat String The default display format of the DID number.
didName String The name of the DID.
numberType String The type of the DID number, such as Local and National.
callHandling String

The call handling method of the DID:

  • Unassigned: The DID is not assigned to any destination.
  • Direct Assignment: The DID is directly assigned to a destination.
  • Inbound Route: The DID is handled by an inbound route.
destination Object<DID_Destination> The call destination of the DID.
countryCode String The country code of the DID in ISO 3166-1 format, such as CN and US.
didE164 String The E.164 number of the DID.
nationalNumber String The national number of the DID, which is the number without the country code.
DID_Destination
Parameter Type Description
destinationType String

The type of the direct destination:

  • USER: An extension user.
  • QUEUE: A queue.
  • IVR: An IVR.
  • RING_GROUP: A ring group.
  • AI_ROUTE: An AI receptionist.

DID_DESTINATION_UNSPECIFIED indicates that the DID is handled by an inbound route.

destinationNumber String The number of the destination, such as the extension number 1001. This parameter is returned only when the DID is directly assigned.
destinationName String The name of the destination. This parameter is returned only when the DID is directly assigned.
routeName String The name of the matched inbound route. This parameter is returned only when the DID is handled by an inbound route; it is empty for a direct assignment.
destinationId String The resource ID of the destination. This parameter is returned only when the DID is directly assigned; the value is 0 for an inbound route or an unassigned DID.
timeConditionEnabled Boolean

Whether the time condition is enabled for the destination.

  • true: Enabled.
  • false: Disabled.

Example

Request example

POST /uc-cconfig/api/v1/tenant-dids/search-page HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxMDAwQGNvbG9ydGVzdDIiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX25hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXSwiY2xpZW50X2V4dCI6eyJkZXNjcmlwdGlvbiI6IueuoeeQhuWQjuWPsFdlYuW6lOeUqCIsInBsYXRmb3JtIjoid2ViIn0sImV4cCI6MTc5MzYyMzU3MywiaWF0IjoxNzkzNjAxOTczLCJqdGkiOiI3OTlmMzNkYS0yNmI0LTRkNDEtYmZkMC0zZGJiMjIxYzRhNmYiLCJjbGllbnRfaWQiOiJub3ZvLWFkbWluLXdlYiIsInNpZCI6ImMwZjlmOGU3LWQ1M2QtNDFjOS04ZmZmLTNhYTQzZWUyNzU2YyIsInVzZXJfZXh0Ijp7InJvbGVJZHMiOlsxMDJdLCJwdWlkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJ0ZW5hbnRJZCI6MjA3OTUwNDIwNTMwOTE5NDI0MSwicGFyZW50VWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5NiwidGVuYW50Q29kZSI6ImNvbG9ydGVzdDIiLCJ0eXBlIjoiVF9VU0VSIiwidXNlcklkIjoyMDc5NzQ2OTE1Mzg4MDc2MDMzLCJlbWFpbCI6Imxlb0BzYW1wbGUuY29tIiwidXNlcm5hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJ1Y0lkIjozMDc2OTEzNjQ0ODkwODMyODk2fX0.Pi7k5H5k8i02gpC3ry4JWNlkc836SfaD6a3wITzgerCEjyz9YFwX5VDYuqrQiYIsL6raVkBz_vwUaTnPdRN0xQxOeRIKOLEPaCBZCjJ_lB7IXyNrNU3O62nXefT6OpWbas6rap9K-3zpppBzxorHWD57yso1OzD-kWUhCRb3rkybe-gtOFhExl7gc3WqBgJA1V7IGoQfX4aRGhwuJ1DAC_CY5oqhE6vjw5rxWx_nCoMiN-wmsY2ou22Py7oeC83b0W21lEQY0nyECk-GCYKdJ0CBSeNKTY5ridST_QX9FBn3ETj2GrjlODRWj4tniWY2PJszVp2XswULShQoXuMsXw
x-tenant-code: jint
Content-Type: application/json
{
  "pageNumber": 1,
  "pageSize": 5
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "662651095f0ae682d78bbfab3c3a1a16",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "pageSize": 5,
    "pageNumber": 1,
    "count": 6,
    "results": [
      {
        "id": "367178921942994944",
        "defaultDisplayFormat": "364 726 328",
        "didName": "cc测试",
        "numberType": "Local",
        "callHandling": "Inbound Route",
        "destination": {
          "destinationType": "DID_DESTINATION_UNSPECIFIED",
          "destinationNumber": "",
          "destinationName": "",
          "routeName": "CCtest",
          "destinationId": "0",
          "timeConditionEnabled": false
        },
        "countryCode": "IT",
        "didE164": "+39364726328",
        "nationalNumber": "364726328"
      },
      {
        "id": "349095413464047619",
        "defaultDisplayFormat": "612 34 56 03",
        "didName": "啊哈哈哈",
        "numberType": "National",
        "callHandling": "Inbound Route",
        "destination": {
          "destinationType": "DID_DESTINATION_UNSPECIFIED",
          "destinationNumber": "",
          "destinationName": "",
          "routeName": "CCtest",
          "destinationId": "0",
          "timeConditionEnabled": false
        },
        "countryCode": "ES",
        "didE164": "+34612345603",
        "nationalNumber": "612345603"
      },
      {
        "id": "349095413464047618",
        "defaultDisplayFormat": "612 34 56 02",
        "didName": "啊哈哈哈",
        "numberType": "National",
        "callHandling": "Inbound Route",
        "destination": {
          "destinationType": "DID_DESTINATION_UNSPECIFIED",
          "destinationNumber": "",
          "destinationName": "",
          "routeName": "CCtest",
          "destinationId": "0",
          "timeConditionEnabled": false
        },
        "countryCode": "ES",
        "didE164": "+34612345602",
        "nationalNumber": "612345602"
      },
      {
        "id": "349095413464047617",
        "defaultDisplayFormat": "612 34 56 01",
        "didName": "啊哈哈哈",
        "numberType": "National",
        "callHandling": "Inbound Route",
        "destination": {
          "destinationType": "DID_DESTINATION_UNSPECIFIED",
          "destinationNumber": "",
          "destinationName": "",
          "routeName": "CCtest",
          "destinationId": "0",
          "timeConditionEnabled": false
        },
        "countryCode": "ES",
        "didE164": "+34612345601",
        "nationalNumber": "612345601"
      },
      {
        "id": "349095413464047616",
        "defaultDisplayFormat": "612 34 56 00",
        "didName": "啊哈哈哈",
        "numberType": "National",
        "callHandling": "Inbound Route",
        "destination": {
          "destinationType": "DID_DESTINATION_UNSPECIFIED",
          "destinationNumber": "",
          "destinationName": "",
          "routeName": "CCtest",
          "destinationId": "0",
          "timeConditionEnabled": false
        },
        "countryCode": "ES",
        "didE164": "+34612345600",
        "nationalNumber": "612345600"
      }
    ]
  }
}
Note:

The response is condensed. The array contains 6 items.