Query Trunk Capacity Trend
Query the trunk capacity trend (peak number of concurrent calls and concurrent call limit) of SIP trunk(s) owned by you and your resellers.
Request URL
POST {base_url}/uc-dashboard/api/v1/dashboard/trends/trunk-capacity
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.
- Body parameters
-
Parameter Required Type Description region No String The region for which to query the trunk capacity trend. Valid value:
null: The current region.: All regions.all- Region code: Specified region.Note: You can query available region codes using the Get the Region List interface.
grain No String The aggregation granularity used to return peak number of concurrent calls and concurrent call limit. Valid value:
minutehourday
timeRange No String The time range. Valid value:
today: The current day.this_month: The current month.last_month: The previous month.
trunkId No Integer The trunk ID. Valid value:
0: All trunks.- Trunk ID: Specified trunk.Note:
- This value takes effect only when
regionis set to a region code. - You can query the trunk ID using the Search Trunks interface.
- This value takes effect only when
timezone No String The timezone used to determine the natural day and month boundaries, in IANA format (e.g., Asia/Shanghai).
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.
|
| 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<Trunk_Capacity_Trend> | The trunk capacity trend data. |
- Trunk_Capacity_Trend
-
Parameter Type Description widgetVisibility Object<Widget_Visibility> The visibility of the Trunk Capacity Trends widget in the portal interface. points Array<Trend_Point> The trunk capacity trend for each trend point grouped by specified aggregation granularity in the specified time range. summary Object<Summary> The peak number of concurrent calls and concurrent call limit within the specified time range. freshness Object<Freshness> The data aggregation status and degradation information.
- Widget_Visibility
-
Parameter Type Description trunk_capacity_trends Object<Visibility> The visibility of the Trunk Capacity Trends widget in the portal interface.
- Trend_Point
-
Parameter Type Description bucketStartMs Integer Start timestamp of the trend point (unit: milliseconds). primary Integer The peak number of concurrent calls at the trend point. secondary Integer The concurrent call limit at the trend point. Note: If the value is-1, it indicates that the concurrent calls for at least one trunk are unlimited.primaryGap Boolean Whether a value of 0forprimaryindicates that the actual peak number of concurrent calls at the trend point is unknown.true: The actual peak number of concurrent calls is unknown.false: The actual peak number of concurrent calls is 0.
secondaryGap Boolean Whether a value of 0forsecondaryindicates that the actual concurrent call capacity at the trend point is unknown.true: The actual concurrent call capacity is unknown.false: The actual concurrent call capacity is 0.
- Summary
-
Parameter Type Description primary Integer The peak number of concurrent calls within the specified time range. secondary Integer The concurrent call limit of the SIP trunk(s). Note: If the value is-1, it indicates that the concurrent calls for at least one trunk are unlimited.
- Freshness
-
Parameter Type Description status String Data aggregation status. normal:Data aggregation completed normally.delayed: Partial data missing.failed: Data aggregation failed.
unavailableRegions Array<String> The list of regions that are unavailable or timed out, which are skipped during degradation.
Example
Request example
POST /uc-dashboard/api/v1/dashboard/trends/trunk-capacity HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJyZWdpb24ta2V5LTEiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc4ODQzNDU2NywiaWF0IjoxNzg4NDEyOTY3LCJqdGkiOiJhYzYwMWJkOC02NDdkLTRlNzUtOGI2MS1mNmRiZmZhZDk1YzkiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.4RbFpLSVFGMpgp-xAFfNMU82J4I4WbxIskKD27vp4ge3pEhdUsr-qHnHh3Qm78xPx7cbXl8pp5UmNfQWH7pZ1u4Rx2WlR-WcfrdPJvCSxnru4UbBxU9BC9DBQyEVOKYmnTHqEosEZkoaHdlDySHdNCg1mxgcVwk3mczlognjSpAkuoMTNydq_gReUToc-v0SPS3YMDhJsCSC_NDuG4b9jc8B703hiM-FzVfOUdrluVfIsjT-skM7ZwOWH7p7uT_Y_uEi1QUuQUgB-bKc2Vb7PTajXRETtdvJS-yxca5Gv8Z5EGEzk4ThEuSh1xrxelYpMzvwyEjbW5Nak4joLiE_lQ
Content-Type: application/json
{
"region": "all",
"grain": "minute",
"timeRange": "last_month",
"trunkId": 0,
"timezone": "Asia/Shanghai"
}
Response example
HTTP/1.1 200 OK { "result": { "widgetVisibility": { "trunk_capacity_trends": { "hidden": false } }, "points": [ { "bucketStartMs": 1788220800000, "primary": 0, "secondary": -1, "primaryGap": false, "secondaryGap": false, "gap": false }, ... { "bucketStartMs": 1790805600000, "primary": 1, "secondary": -1, "primaryGap": false, "secondaryGap": false, "gap": false }, { "bucketStartMs": 1790809200000, "primary": 0, "secondary": -1, "primaryGap": false, "secondaryGap": false, "gap": false } ], "summary": { "primary": 2, "secondary": -1 }, "freshness": { "status": "delayed", "unavailableRegions": [ "afs-1", "de-0", "gke-hk-0" ] } }, "requestId": "8ead25945b3c965029e0fd8f746bb62d", "code": "200", "message": "SUCCESS"}
Note: The
points array field contains 1011 items. The
value shown above is abbreviated.