Query Specific Trunk Access Permissions Granted to Specific User

Query access permissions of specific trunks granted to a specific user.

Request URL

GET {base_url}/dm/open_api/v1/trunk_acl/dids

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
userId Yes Long The ID of the subordinate user.
Note: You can query the user ID using Query All Trunk Access Permissions.
trunkIds Yes Array<Integer> The ID list of assigned shared trunks.
Note:

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
trunkId Integer The ID of the shared trunk.
trunkName String The name of the shared trunk.
didList Array<DID_Info> The information of DID numbers associated with the shared trunk.
DID_Info
Parameter Type Description
didId Integer The ID of the DID number.
did String The DID number.

Example

Request example

Query access permissions of the trunks (ID: 5111 and 5096) granted to the subordinate user (ID: 1163).

GET /dm/open_api/v1/trunk_acl/dids?userId=1163&trunkIds=5111,5096 HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer ******

Response example

HTTP/1.1 200 OK
{
    "data": [
        {
            "trunkId": 5111,
            "trunkName": "dxy_9CY41J",
            "didList": [
                {
                    "didId": 28075,
                    "did": "1212001"
                },
                {
                    "didId": 28176,
                    "did": "12120029"
                }
            ]
        },
        {
            "trunkId": 5096,
            "trunkName": "dxy_35VJJ7",
            "didList": [
                {
                    "didId": 28051,
                    "did": "8989012"
                },
                {
                    "didId": 28052,
                    "did": "8989013"
                },
                {
                    "didId": 28053,
                    "did": "8989014"
                },
                {
                    "didId": 28054,
                    "did": "8989015"
                }
            ]
        }
    ],
    "requestId": "S0V4PYds",
    "status": "Success",
    "time": 1766386989
}