You need to enable JavaScript to run this app.
导航
GetAccountQuotaUsedTrend
最近更新时间:2024.07.03 14:44:20首次发布时间:2022.11.25 11:53:32

获取主账号下的资源用量趋势。

使用说明

子账号已授权该应用的管理员或成员权限。详情请参见权限管理

请求说明

  • 请求方式:POST
  • 请求地址:https://open.volcengineapi.com?Action=GetAccountQuotaUsedTrend&Version=2022-10-12
ServiceName: apmplus_openapi
Region: cn-beijing 
X-App-Ids: xxx
Content-Type: application/json

请求参数

Query

参数类型是否必选示例值描述
ActionStringGetAccountQuotaUsedTrend接口名称。当前 API 的名称为 GetAccountQuotaUsedTrend
VersionString2022-10-12接口版本。当前 API 的版本为 2022-10-12

Body

参数类型是否必选示例值描述
start_timeLong1665417600查询起始时间。
end_timeLong1666083280查询终止时间。

granularity

String

week

时间聚合粒度。

  • week
  • day
  • month
page_noInteger1页号,返回的资源用量中包含各Aid的用量,按照用量大小倒序排列。
page_sizeInteger10每页项数。
service_keysArray of String[app_monitor]服务列表,默认为空查全部,可选值由GetServiceList方法获取。

返回参数

参数类型示例值描述
dataObject of AccountEventTrendData-资源用量趋势。
error_msgString""错误信息,成功为空。
error_noInteger0错误码,成功为0。

AccountEventTrendData

参数类型示例值描述
totalObject of TrendLine-总用量趋势。
modulesArray of TrendLine-主账号下各AID用量趋势。
total_countInteger20主账号下AID数量。

TrendLine

参数类型示例值描述
nameStringtest123线的名称,在分组的情况下,name应该是分组维度的取值,比如用来显示曲线的图标。
pointsArray of TrendPoint-曲线上的点。

TrendPoint

参数类型示例值描述
alertObject of AlertPoint-提示信息。
valueDouble123指标值。
timestampLong1665417600unix时间戳。
readable_timestampString2022-10-11日历时间。

AlertPoint

参数类型示例值描述
msgString-提示信息。
alertBooleantrue是否需要提示。

请求示例

POST https://open.volcengineapi.com?Action=GetAccountQuotaUsedTrend&Version=2022-10-12
{
    "start_time": 1665417600,
    "end_time": 1666083280,
    "granularity": "week,day,month",
    "page_no": 1,
    "page_size": 10,
    "service_keys": "[app_monitor]"
}

返回示例

{
    "data": {
        "total_count": 869,
        "total": {
            "name": "test123",
            "points": [
                {
                    "readable_timestamp": "2022-10-11",
                    "alert": {
                        "alert": true,
                        "msg": ""
                    },
                    "value": 123,
                    "timestamp": 1665417600
                }
            ]
        },
        "modules": [
            {
                "points": [
                    {
                        "readable_timestamp": "2022-10-11",
                        "alert": {
                            "alert": true,
                            "msg": ""
                        },
                        "timestamp": 1665417600,
                        "value": 123
                    }
                ],
                "name": "test123"
            }
        ]
    },
    "error_no": 0,
    "error_msg": ""
}

错误码

本接口无特有的错误码。更多信息请参见错误码