更新时间:2025-09-29 GMT+08:00
分享

获取资源总量统计信息

功能介绍

获取CPCS中\资源总量统计信息

调用方法

请参见如何调用API

URI

GET /v1/{project_id}/dew/cpcs/resource/statistic

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目id

表2 Query参数

参数

是否必选

参数类型

描述

cluster_id

String

集群id,默认为空,默认查询所有集群

app_id

String

应用id,默认为空,默认查询所有app

from

Long

查询的初始时间戳,毫秒级时间戳,默认查询前三天

to

Long

查询的终止时间戳,毫秒级时间戳,默认查询到当前时间

period

Integer

统计周期,默认为1,五分钟为一个周期

filter

String

统计值,默认为min:最小值

algorithm

String

算法,有:“sm2”,"rsa"

algorithm_type

String

算法类型,0:国密算法,1:国际算法

certificate_type

String

证书类型,0:根证书,1:业务证书

server_type

String

密码服务类型

请求参数

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

metric_name

String

资源名称

datapoints

Array of datapoints objects

资源分布

total_count

Long

总数

表4 datapoints

参数

参数类型

描述

data

Integer

数据

count

Long

数量

api_name

String

接口名称

tenant_id

String

租户ID

cluster_id

String

集群ID

server_type

String

服务类型

请求示例

密码服务资源信息

/v1/{project_id}/dew/cpcs/resource/statistic

响应示例

状态码:200

正常返回

{
  "metric_name" : "资源分布",
  "datapoints" : [ {
    "data" : 16,
    "count" : 0,
    "api_name" : "vpnThroughputRNumStatistic",
    "tenant_id" : "3bab8e245e854f68af5967c00dd43127",
    "cluster_id" : "3943ef7608a541caa28a5962f6e3ec19",
    "server_type" : "SSL_VPN"
  }, {
    "data" : 48,
    "count" : 0,
    "api_name" : "vpnThroughputSNumStatistic",
    "tenant_id" : "3bab8e245e854f68af5967c00dd43127",
    "cluster_id" : "3943ef7608a541caa28a5962f6e3ec19",
    "server_type" : "SSL_VPN"
  } ],
  "total_count" : 64
}

状态码

状态码

描述

200

正常返回

错误码

请参见错误码

相关文档