云服务器内容精选

  • 响应示例 返回状态码为200:接口调用成功,响应体参考DeviceResourceStatisticsOutput。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "error_code" : "0", "error_msg" : "", "resourceStatistics" : [ { "cpu_usage" : 88, "mem_size" : 256, "mem_usage" : 50, "contrack_count" : 1, "user_count" : 1, "report_time" : "2023-06-05 16:35:00.0" } ] } 返回状态码为400:输入参数错误。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:其余应用异常。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • URI /v1/equipment/devices/resource-statistics 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 device_id 否 string 0~64个字符。 - 设备id,UUID "63291b9f-94ff-47c2-a501-0676bf81a009" start_time 否 string 13~15个字符。 - 统计起始时间 "1675872000716" end_time 否 string 13~15个字符。 - 统计结束时间 "1675872000716" dimension 否 int32 [0-2] - 时间维度,0-天,1-周,2-月 0
  • 请求示例 HTTP的示例 GET /v1/equipment/devices/resource-statistics?device_id=63291b9f-94ff-47c2-a501-0676bf81a009&start_time=1675872000716&end_time=1675872000716&dimension=0 HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AC CES S-TOKEN: x-yyyyyy
  • 响应参数 返回状态码为200:接口调用成功,响应体参考DeviceResourceStatisticsOutput。 表2 DeviceResourceStatisticsOutput对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 error_code string 0~256个字符。 - 错误码 "0" error_msg string 0~256个字符。 - 错误描述 "" resourceStatistics ARRAY_REFERENCE 0-200个列表项,详细请参见表3。 设备状态统计 - 表3 DeviceResourceStatistics对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 cpu_usage int32 [0-100] - CPU 使用率,比如是80%,则此处数字为80 88 mem_size int32 [0-21474836473] - 内存总大小,单位是MB 256 mem_usage int32 [0-100] - 内存使用率,比如是30%,则此处数字为30 50 contrack_count int32 [0-100] - 当前会话数 1 user_count int32 [0-100] - 在线用户数 1 report_time string 0~64个字符。 - 统计时间 "2023-06-05 16:35:00.0" 返回状态码为400:输入参数错误。 详细信息请参见实际响应消息体。 返回状态码为500:其余应用异常。 详细信息请参见实际响应消息体。
  • 响应参数 返回状态码为200:接口调用成功,响应体参考DeviceInterfaceStatisticsOutput。 表2 DeviceInterfaceStatisticsOutput对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 error_code string 0~256个字符。 - 错误码 "0" error_msg string 0~256个字符。 - 错误描述 "" resourceStatistics ARRAY_REFERENCE 0-200个列表项,详细请参见表3。 设备状态统计 - 表3 DeviceInterfaceStatistics对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 interf_name string 0~64个字符。 - 接口名称 "GE/0/0/1" send_rate int32 [0-100] - 上行速率 32 send_bytes int32 [0-21474836473] - 本周期内上行口的上行流量,单位是Bytes 128 receive_rate int32 [0-100] - 下行速率,比如是30%,则此处数字为30 30 receive_bytes int32 [0-21474836473] - 本周期内上行口的下行总流量,单位是Bytes 256 report_time string 0~64个字符。 - 统计时间 "2023-06-05 16:35:00.0" 返回状态码为400:参数非法,查询失败。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:接口调用成功,响应体参考DeviceInterfaceStatisticsOutput。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "error_code" : "0", "error_msg" : "", "resourceStatistics" : [ { "interf_name" : "GE/0/0/1", "send_rate" : 32, "send_bytes" : 128, "receive_rate" : 30, "receive_bytes" : 256, "report_time" : "2023-06-05 16:35:00.0" } ] } 返回状态码为400:参数非法,查询失败。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 GET /v1/equipment/devices/interf-statistics?device_id=63291b9f-94ff-47c2-a501-0676bf81a009&start_time=1675872000716&end_time=1675872000716&dimension=0 HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy
  • URI /v1/equipment/devices/interf-statistics 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 device_id 否 string 0~64个字符。 - 设备id,UUID "63291b9f-94ff-47c2-a501-0676bf81a009" start_time 否 string 13~15个字符。 - 统计起始时间 "1675872000716" end_time 否 string 13~15个字符。 - 统计结束时间 "1675872000716" dimension 否 int32 [0-2] - 时间维度,0-天,1-周,2-月 0