Query All the DID Numbers

Query the information of all the DID numbers.

Request URL

GET {base_url}/dm/open_api/v1/did_management

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String Pass the access token in the header.

Format: Bearer {access_token}.

Query parameters
Parameter Required Type Description
pageSize No Integer Define how many records per page.
  • Default value: 10
  • Maximum value: 50
pageNumber No Integer Define which page is displayed.
  • Default value: 1
search No String Search keyword.

Response parameters

Parameter Type Description
data Object <Details> The detailed information.
requestId String The unique ID of the request, which can be used to quickly locate the request.
status String Request result:
  • Success
  • Failed
time Long The response time.
Note: The YCM API response returns a timestamp, you can convert the timestamp to detailed date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
Details
Parameter Type Description
pageSize Integer How many records are displayed per page.
pageNumber Integer Which page is displayed.
total Integer The total number of DID numbers.
list Array <DID_Info> The information list of the DID numbers.
DID_Info
Parameter Type Description
id Integer The unique ID of the DID number.
did String DID number.
didName String The name of the DID number.
creator String The creator who adds the DID number.
trunkIds Array<Integer> The list of trunk IDs to which the DID number is associated.
cloudPbxId String The ID of the PBX instance to which the DID number is assigned.

Example

Request example

Query the DID number list:
  • Display 3 records per page.
  • Display Page 1.
  • Search for the DID numbers with the name London Support Tier 2.
GET /dm/open_api/v1/did_management?pageSize=3&pageNumber=1&search=London Support Tier 2 HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer ******

Response example

HTTP/1.1 200 OK
{
    "data": {
        "pageSize": 3,
        "pageNumber": 1,
        "total": 10,
        "list": [
            {
                "id": 11,
                "did": "+4410001100010",
                "didName": "London Support Tier 2",
                "creator": "Leo Ball",
                "trunkIds": [
                    2,
                    3,
                    6679,
                    6680,
                    6682
                ],
                "cloudPbxId": "4768"
            },
            {
                "id": 10,
                "did": "+4410001100009",
                "didName": "London Support Tier 2",
                "creator": "Leo Ball",
                "trunkIds": [
                    2,
                    3,
                    6679,
                    6680
                ],
                "cloudPbxId": "4768"
            },
            {
                "id": 9,
                "did": "+4410001100008",
                "didName": "London Support Tier 2",
                "creator": "Leo Ball",
                "trunkIds": [
                    2,
                    3,
                    6679,
                    6680
                ],
                "cloudPbxId": "4768"
            }
        ]
    },
    "requestId": "636fc9504d20bb9912521ed44ee1f580",
    "status": "Success",
    "time": 1747021072
}