Query Available Shared Trunks

Query base information of available shared trunks, including those you created and those authorized by your service provider.

Request URL

GET {base_url}/dm/open_api/v1/shared_trunk/name/acl

Request parameters

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

Format: Bearer {access_token}.

Response parameters

Parameter Type Description
data Array <Details> The list of shared trunks' base 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
id Integer The ID of the shared trunk.
name String The name of the shared trunk.
type String The type of the shared trunk.
  • register: Register trunk.
  • did_based: Peer trunk (DID based).
  • port_based: Peer trunk (Port based).

Example

Request example

GET /dm/open_api/v1/shared_trunk/name/acl HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer ******

Response example

HTTP/1.1 200 OK
{
    "data": [
        {
            "id": 325,
            "name": "A1_07L3RG",
            "type": "register"
        },
        {
            "id": 7863,
            "name": "register_2PNG39",
            "type": "register"
        },
        {
            "id": 111269,
            "name": "register_1U4CZ4",
            "type": "did_based"
        },
        {
            "id": 111270,
            "name": "register_2V03D2",
            "type": "register"
        },
        {
            "id": 112129,
            "name": "register_5FOV41",
            "type": "register"
        }
    ],
    "requestId": "e1e7c70b1709dbaef13dfae2bf0a0cae",
    "status": "Success",
    "time": 1766552825
}