Query the Status of a Specific Shared Trunk
Query the status of a specific shared trunk.
Request URL
GET {base_url}/dm/open_api/v1/shared_trunk/{id}/status
Request parameter
Path parameter
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The ID of the shared trunk. Note: You can
query the trunk ID using Query all the Shared Trunks. |
Headers
| Parameter | Required | Type | Description |
|---|---|---|---|
| Authorization | Yes | String | Pass the access token in the header. Format: Bearer {access_token}. |
Response parameter
| 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:
|
| 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. status String The status of the shared trunk. E_REGISTER_SUCCESS_STATE: Registered / Reachable.E_REGISTER_ING_STATE: Registering / connecting.E_REGISTER_FAILED_STATE: Failed.
statusFailedReason String The reason why the shared trunk fails. REASON_AUTH: Authentication fail.REASON_TIMEOUT: Time out.REASON_ERROR: Error.
Example
Request exampleQuery the status of a shared trunk (ID: 6680).
GET /dm/open_api/v1/shared_trunk/6680/status HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer ******
Response example
HTTP/1.1 200 OK
{
"data": {
"id": 6680,
"status": "E_REGISTER_SUCCESS_STATE",
"statusFailedReason": ""
},
"requestId": "11bc7135cfaa97ad61747775176e133e",
"status": "Success",
"time": 1747031006
}