华为云用户手册

  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 id Integer id编号。 gmt_create String 创建时间。 gmt_modify String 修改时间。 region String 当前局点。 accessPoint String 接入点地址。 token String 应用的token。 hidden_token String token隐藏字符。 sw_business_id Integer 应用ID。 agent_download_url String agent下载地址。
  • 响应示例 状态码: 200 OK,请求响应成功。 { "region" : "cn-north-7-first-server1", "accessPoint" : "xx.xx.xx.xx:xx", "id" : null, "gmt_create" : "2024-04-19T02:51:21.000+00:00", "gmt_modify" : "2024-04-19T02:51:21.000+00:00", "token" : null, "hidden_token" : "******", "sw_business_id" : 404548, "agent_download_url" : "https://skywalking.apache.org/downloads/"}
  • 支持的授权项 策略包含系统策略和自定义策略,如果系统策略不满足授权要求,管理员可以创建自定义策略,并通过给用户组授予自定义策略来进行精细的访问控制。策略支持的操作与API相对应,授权项列表说明如下: 权限:自定义策略中授权项定义的内容即为权限。 对应API接口:自定义策略实际调用的API接口。 授权项:自定义策略中支持的Action,在自定义策略中的Action中写入授权项,可以实现授权项对应的权限功能。 依赖的授权项:部分Action存在对其他Action的依赖,需要将依赖的Action同时写入授权项,才能实现对应的权限功能。 IAM 项目(Project)/企业项目(Enterprise Project):自定义策略的授权范围,包括IAM项目与企业项目。授权范围如果同时支持IAM项目和企业项目,表示此授权项对应的自定义策略,可以在IAM和企业管理两个服务中给用户组授权并生效。如果仅支持IAM项目,不支持企业项目,表示仅能在IAM中给用户组授权并生效,如果在企业管理中授权,则该自定义策略不生效。关于IAM项目与企业项目的区别,详情请参见IAM与企业管理的区别。 API授权项列表 权限 对应API接口 授权项 IAM项目(Project) 企业项目(Enterprise Project) 获取该用户创建的ak/sk列表 GET /v1/apm2/openapi/systemmng/get-ak-sk-list apm:apm2AkSk:read √ √ 查询对应用户下的应用 GET /v1/apm2/openapi/cmdb/business/get-business-list - √ √ 根据region名称获取该名称下的master服务podlb地址信息 GET /v1/apm2/openapi/systemmng/get-master-address - √ √ “√”表示支持,“x”表示暂不支持。
  • 响应参数 状态码: 200 表5 响应Body参数 参数 参数类型 描述 result_id String 结果的ID信息,分页查询的时候带过来。 row_list Array of FrontRow objects 数据行列表。 latest_data_Time Long 最近一笔数据的时间。 table_direction String 表格的方向,H:默认,表头横向,V:表头纵向。 枚举值: H V real_start_time Long 实际开始的时间。 real_end_time Long 实际结束的时间。 notice_msg String 提示信息。 total_count Integer 总数。 表6 FrontRow 参数 参数类型 描述 cell_list Array of FrontCell objects 数据单元集合。 filter String 将group by的字段拼接成过滤字符串,用于后续点网格单击使用。 header Boolean 是否是header信息。 tx_id Long Url跟踪id。 表7 FrontCell 参数 参数类型 描述 data_type String 数据类型。 function String 函数。 trace Boolean 是否调用链。 span Boolean 是否是span信息,如果是就跳到调用链搜索页面。 span_field String span字段。 precision Integer 小数点位数。 text String 文本信息。 unit String 单位。 visible Boolean 是否可见。
  • 请求示例 获取汇总表格数据,入参为view_type参数为sumtable的视图配置,可从查询监控项配置信息接口获取。 /v1/apm2/openapi/view/metric/sum-table{ "end_time" : "2022-10-25 15:17:46", "env_id" : "11", "monitor_item_id" : 78, "page" : 1, "page_size" : 10, "start_time" : "2022-10-25 14:57:46", "view_config" : { "latest" : null, "span" : true, "collector_name" : "Url", "metric_set" : "url", "title" : "接口维度汇总", "table_direction" : null, "group_by" : "url,method", "filter" : "", "field_item_list" : [ { "trace" : null, "function" : "SUM(invokeCount)", "as" : "调用次数", "default_value" : null, "precision" : null, "unit" : null, "visible" : true }, { "trace" : null, "function" : "SUM(totalTime)/SUM(invokeCount)", "as" : "平均响应时间(ms)", "default_value" : null, "precision" : null, "unit" : null, "visible" : true }, { "trace" : null, "function" : "SUM(errorCount)", "as" : "错误数", "default_value" : null, "precision" : null, "unit" : null, "visible" : true }, { "trace" : null, "function" : "MAX(concurrentMax)", "as" : "最大并发", "default_value" : null, "precision" : null, "unit" : null, "visible" : true }, { "trace" : null, "function" : "MAX(maxTime)", "as" : "最慢调用(ms)", "default_value" : null, "precision" : null, "unit" : null, "visible" : true }, { "trace" : null, "function" : "SUM(range1)", "as" : "0ms-10ms", "default_value" : null, "precision" : null, "unit" : null, "visible" : false }, { "trace" : null, "function" : "SUM(range2)", "as" : "10ms-100ms", "default_value" : null, "precision" : null, "unit" : null, "visible" : false }, { "trace" : null, "function" : "SUM(range3)", "as" : "100ms-500ms", "default_value" : null, "precision" : null, "unit" : null, "visible" : false }, { "trace" : null, "function" : "SUM(range4)", "as" : "500ms-1s", "default_value" : null, "precision" : null, "unit" : null, "visible" : false }, { "trace" : null, "function" : "SUM(range5)", "as" : "1s-10s", "default_value" : null, "precision" : null, "unit" : null, "visible" : false }, { "trace" : null, "function" : "SUM(range6)", "as" : "10s-n", "default_value" : null, "precision" : null, "unit" : null, "visible" : false } ], "span_field" : "source", "view_type" : "sumtable" }}
  • 响应示例 状态码: 200 OK,请求响应成功。 { "result_id" : "12ece6d8-b146-435d-ad51-be0e43e27490", "row_list" : [ { "header" : true, "cell_list" : [ { "trace" : false, "span" : true, "data_type" : "ENUM", "function" : "", "span_field" : "source", "precision" : null, "text" : "url", "unit" : null, "visible" : true }, { "trace" : false, "span" : null, "data_type" : "ENUM", "function" : "", "span_field" : null, "precision" : null, "text" : "method", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : "INT", "function" : "SUM(invokeCount) as=调用次数", "span_field" : null, "precision" : null, "text" : "调用次数", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : "DOUBLE", "function" : "SUM(totalTime)/SUM(invokeCount) as=平均响应时间(ms)", "span_field" : null, "precision" : null, "text" : "平均响应时间(ms)", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : "INT", "function" : "SUM(errorCount) as=错误数", "span_field" : null, "precision" : null, "text" : "错误数", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : "INT", "function" : "MAX(concurrentMax) as=最大并发", "span_field" : null, "precision" : null, "text" : "最大并发", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : "INT", "function" : "MAX(maxTime) as=最慢调用(ms)", "span_field" : null, "precision" : null, "text" : "最慢调用(ms)", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : "INT", "function" : "SUM(range1) as=0ms-10ms", "span_field" : null, "precision" : null, "text" : "0ms-10ms", "unit" : null, "visible" : false }, { "trace" : null, "span" : null, "data_type" : "INT", "function" : "SUM(range2) as=10ms-100ms", "span_field" : null, "precision" : null, "text" : "10ms-100ms", "unit" : null, "visible" : false }, { "trace" : null, "span" : null, "data_type" : "INT", "function" : "SUM(range3) as=100ms-500ms", "span_field" : null, "precision" : null, "text" : "100ms-500ms", "unit" : null, "visible" : false }, { "trace" : null, "span" : null, "data_type" : "INT", "function" : "SUM(range4) as=500ms-1s", "span_field" : null, "precision" : null, "text" : "500ms-1s", "unit" : null, "visible" : false }, { "trace" : null, "span" : null, "data_type" : "INT", "function" : "SUM(range5) as=1s-10s", "span_field" : null, "precision" : null, "text" : "1s-10s", "unit" : null, "visible" : false }, { "trace" : null, "span" : null, "data_type" : "INT", "function" : "SUM(range6) as=10s-n", "span_field" : null, "precision" : null, "text" : "10s-n", "unit" : null, "visible" : false } ], "filter" : null, "tx_id" : null }, { "header" : null, "cell_list" : [ { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "/apm2/health/v1/health-check", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "GET", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "144", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "0.89", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "0", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "1", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "2", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "144", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "0", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "0", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "0", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "0", "unit" : null, "visible" : true }, { "trace" : null, "span" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "0", "unit" : null, "visible" : true } ], "filter" : "url=/apm2/health/v1/health-check^method=GET", "tx_id" : null } ], "latest_data_Time" : 1666682040000, "table_direction" : "H", "real_start_time" : 1666681020000, "real_end_time" : 1666682220000, "notice_msg" : null, "total_count" : 1}
  • 请求参数 表1 请求Header参数 参数 是否必选 参数类型 描述 x-business-id 是 Long 应用id。 X-Auth-Token 是 String 从IAM服务获取的用户Token。 表2 请求Body参数 参数 是否必选 参数类型 描述 request_id 否 String 上次请求的id。 view_config 是 SumTableView object 视图配置信息。 strategy 否 String 策略。 page 是 Integer 当前页码。 page_size 是 Integer 每页数据总数。 order_by 否 String 排序规则。 search_word 否 String 搜索关键字。 instance_id 否 Long 实例id。 monitor_item_id 否 Long 监控项id。 env_id 是 Long 环境id。 start_time 是 String 起始时间。 end_time 是 String 结束时间。 表3 SumTableView 参数 是否必选 参数类型 描述 view_type 否 String 视图类型。 枚举值: trend sumtable rawtable collector_name 是 String 采集器名称。 metric_set 是 String 视图对应的指标集的名称。 title 否 String 图标所需展示的标题。 table_direction 否 String 表格的方向,H:默认,表头横向,V:表头纵向。 枚举值: H V group_by 否 String 分组规则。 filter 否 String 过滤列表模型。 field_item_list 是 Array of FieldItem objects 所需展示的字段列表模型列表。 span 否 Boolean 跨度。 span_field 否 String 跨度字段。 order_by 否 String 排序规则。 latest 否 Boolean 是否只展示最近一笔数据。 表4 FieldItem 参数 是否必选 参数类型 描述 function 是 String 表达式。 as 否 String 作为。 default_value 否 String 默认值。 trace 否 Boolean 是否是trace。 precision 否 Integer 百分比。 unit 否 String 单位。 visible 否 Boolean 是否可见。
  • 响应示例 状态码: 200 OK,请求响应成功。 { "span_event_list" : [ { "global_trace_id" : "16-1666684411910-1326", "global_path" : null, "trace_id" : "16-1666684411910-1326", "span_id" : "1", "env_id" : 11, "instance_id" : 16, "app_id" : 11, "biz_id" : 162, "domain_id" : 1, "source" : "/apm2/health/v1/health-check", "real_source" : "/apm2/health/v1/health-check", "start_time" : 1666684411910, "time_used" : 1, "code" : 200, "class_name" : "org/apache/catalina/core/StandardHostValve", "is_async" : false, "tags" : { }, "has_error" : false, "error_reasons" : null, "type" : "Tomcat", "http_method" : "GET", "biz_code" : null, "event_id" : "1", "next_spanId" : null, "source_event_id" : null, "method" : "invoke", "children_event_count" : 0, "discard" : [ ], "argument" : "(GET)(/apm2/health/v1/health-check)(200)", "attachment" : null, "host_name" : "apm2-apm-pu-task-6b5bbfc84d-gtrrs", "ip_address" : "*.*.*.*", "instance_name" : "default", "region" : "xxx-roma-2", "env_name" : "xxx-roma-2", "app_name" : "apm-pu-task", "indent" : 0, "id" : "1+1" } ]}
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 front_alarm_notify_results Array of FrontAlarmNotifyResult objects 告警通知列表。 total_count Integer 消息总数。 表4 FrontAlarmNotifyResult 参数 参数类型 描述 id Long 告警通知id。 gmt_create String 创建时间。 notify_type String 通知类型。 alarm_rule_id Long 告警规则id。 template_id Long 模板id。 alarm_data_event_id Long 关联事件id。 notify_status Boolean 通知结果。 alarm_content String 通知内容。
  • 响应示例 状态码: 200 OK,请求响应成功。 { "front_alarm_notify_results" : [ { "id" : 1741, "gmt_create" : "2022-10-09 22:58:27", "notify_type" : "RECOVER", "alarm_rule_id" : 3, "template_id" : 2, "alarm_data_event_id" : 42, "notify_status" : false, "alarm_content" : "CPU0.017使用率为0.017" }, { "id" : 1735, "gmt_create" : "2022-10-09 22:58:26", "notify_type" : "RECOVER", "alarm_rule_id" : 3, "template_id" : 2, "alarm_data_event_id" : 42, "notify_status" : false, "alarm_content" : "CPU0.017使用率为0.017" }, { "id" : 682, "gmt_create" : "2022-10-09 21:20:11", "notify_type" : "RECOVER", "alarm_rule_id" : 3, "template_id" : 2, "alarm_data_event_id" : 42, "notify_status" : false, "alarm_content" : "CPU0.017使用率为0.017" }, { "id" : 639, "gmt_create" : "2022-10-09 21:16:04", "notify_type" : "ALARM", "alarm_rule_id" : 3, "template_id" : 2, "alarm_data_event_id" : 42, "notify_status" : false, "alarm_content" : "CPU0.021使用率为0.021" } ], "total_count" : 4}
  • 请求参数 表1 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 从IAM服务获取的用户Token。 x-business-id 是 Long 应用id,用于鉴权。 表2 请求Body参数 参数 是否必选 参数类型 描述 page 否 Integer 页码。 page_size 否 Integer 每页数量。 alarm_data_id 是 Integer 告警事件id。 region 是 String region英文名称。
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 envs Array of EnvNodeModel objects 环境信息列表。 表4 EnvNodeModel 参数 参数类型 描述 id Long 环境id。 gmt_create String 创建时间。 gmt_modify String 修改时间。 app_id Long 组件id。 business_name String 应用名称。 inner_domain_id Integer 租户id。 name String 环境名称。 is_default Boolean 是否是默认环境。 app_name String 组件名称。 business_id Long 应用id。 region String 区域。 data_source String 数据来源。
  • 响应示例 状态码: 200 OK,请求响应成功。 { "envs" : [ { "id" : 11, "gmt_create" : null, "gmt_modify" : null, "app_id" : 11, "business_name" : null, "inner_domain_id" : null, "name" : "xxx-roma-2", "is_default" : false, "app_name" : null, "business_id" : 162, "region" : "xxx-roma-2" } ]}
  • 响应示例 状态码: 200 OK,请求响应成功。 { "region_list" : [ { "region_id" : "xx-xxxx-xxx", "region_name" : "xxx", "region" : "xx-xxxx-xxx", "project_id" : "c6******7b", "status" : "NORMAL_STATUS" } ]}
  • 响应示例 状态码: 200 OK,请求响应成功。 { "env_entry_list" : [ { "env_id" : 48, "env_name" : "apm-api:xx-xxxx-xxx-az1" }, { "env_id" : 51, "env_name" : "config-web:xx-xxxx-xxx" }, { "env_id" : 52, "env_name" : "lubanops-web:xx-xxxx-xxx" }, { "env_id" : 295, "env_name" : "lubanops-api:xx-xxxx-xxx" } ]}
  • 请求参数 表1 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 从IAM服务获取的用户Token。 x-business-id 是 Long 应用id。 表2 请求Body参数 参数 是否必选 参数类型 描述 business_id 是 Long 应用id。 region 否 String region英文名称。 start_time 否 String 开始时间。 end_time 否 String 结束时间。
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 region_list Array of Region objects region列表。 表3 Region 参数 参数类型 描述 region_id String 区域id。 region_name String 区 域名 称。 region String 区域。 project_id String 企业项目id。 status String 区域状态。
  • 响应示例 状态码: 200 OK,请求响应成功。 { "row_list" : [ { "header" : true, "cell_list" : [ { "span" : null, "trace" : null, "data_type" : "STRING", "function" : null, "span_field" : null, "precision" : null, "text" : "time", "unit" : null, "visible" : true }, { "span" : null, "trace" : null, "data_type" : "CLOB", "function" : null, "span_field" : null, "precision" : null, "text" : "异常堆栈", "unit" : null, "visible" : true } ], "filter" : null, "tx_id" : null }, { "header" : null, "cell_list" : [ { "span" : null, "trace" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "2022-11-03 08:41:00", "unit" : null, "visible" : true }, { "span" : null, "trace" : null, "data_type" : null, "function" : null, "span_field" : null, "precision" : null, "text" : "6-973f4c1c78928bcf67d67dfaccc9d3a09f3cef97b2de70bd11f103a1af449b94", "unit" : null, "visible" : true } ], "filter" : null, "tx_id" : null } ], "latest_data_Time" : "2022-11-03 08:41:00", "table_direction" : "H", "result_id" : null, "real_start_time" : 1667435400000, "real_end_time" : 1667436600000}
  • 请求示例 入参为view_type参数为rawtable的视图配置,可从查询监控项配置信息接口获取。 /v1/apm2/openapi/view/metric/raw-table{ "end_time" : 1667436600000, "env_id" : "913", "instance_id" : "13", "monitor_item_id" : 10499, "page" : 1, "page_size" : 10, "search_word" : "", "start_time" : 1667435400000, "view_config" : { "span" : null, "latest" : null, "collector_name" : "Exception", "metric_set" : "exception", "title" : "异常堆栈", "table_direction" : null, "group_by" : "", "filter" : "className=com.*.*.*.*.apm.alarm.service.impl.AviatorService^exceptionType=java.lang.ClassCastException^logType=sl4j_logback_error", "field_item_list" : [ { "trace" : null, "function" : "stackTrace", "as" : "异常堆栈", "default_value" : null, "precision" : null, "unit" : null, "visible" : true } ], "span_field" : null, "view_type" : "rawtable" }}
  • 响应参数 状态码: 200 表5 响应Body参数 参数 参数类型 描述 row_list Array of FrontRow objects 数据行。 latest_data_Time String 最近一笔数据的时间。 table_direction String 表格的方向,H:默认,表头横向,V:表头纵向。 枚举值: H V result_id String 上次请求id。 real_start_time Long 实际开始的时间,主要用于下一次调用,特别是分页调用的时候传的参数。 real_end_time Long 实际结束的时间。 表6 FrontRow 参数 参数类型 描述 cell_list Array of FrontCell objects 数据单元集合。 filter String 将group by的字段拼接成过滤字符串,用于后续点网格单击使用。 header Boolean 是否是header信息。 tx_id Long Url跟踪id。 表7 FrontCell 参数 参数类型 描述 data_type String 数据类型。 function String 函数。 trace Boolean 是否调用链。 span Boolean 是否是span信息,如果是就跳到调用链搜索页面。 span_field String span字段。 precision Integer 小数点位数。 text String 文本信息。 unit String 单位。 visible Boolean 是否可见。
  • 请求参数 表1 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 从IAM服务获取的用户Token。 x-business-id 是 Long 应用id。 表2 请求Body参数 参数 是否必选 参数类型 描述 last_row_id 否 String 上一次扫描的数据ID。 view_config 是 RawTableView object 原始数据表格视图。 page 是 Integer 当前页码。 page_size 是 Integer 每页数据总数。 order_by 否 String 排序。 search_word 否 String 搜索关键字。 instance_id 否 Long 实例id。 monitor_item_id 否 Long 监控项id。 env_id 是 Long 环境id。 start_time 是 String 开始时间。 end_time 是 String 结束时间。 表3 RawTableView 参数 是否必选 参数类型 描述 view_type 否 String 视图类型。 枚举值: trend sumtable rawtable collector_name 是 String 采集器名称。 metric_set 是 String 视图对应的指标集的名称。 title 是 String 图标所需展示的标题。 table_direction 是 String 表格的方向,H:默认,表头横向,V:表头纵向。 枚举值: H V group_by 是 String 分组规则。 filter 是 String 过滤列表模型。 field_item_list 是 Array of FieldItem objects 所需展示的字段列表模型集合。 span 是 Boolean 跨度。 span_field 是 String 跨度字段。 order_by 否 String 排序规则。 latest 否 Boolean 是否只展示最近一笔数据。 表4 FieldItem 参数 是否必选 参数类型 描述 function 是 String 表达式。 as 否 String 作为。 default_value 否 String 默认值。 trace 否 Boolean 是否是trace。 precision 否 Integer 百分比。 unit 否 String 单位。 visible 否 Boolean 是否可见。
  • 请求参数 表1 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 从IAM服务获取的用户Token。 x-business-id 是 Long 应用id。 表2 请求Body参数 参数 是否必选 参数类型 描述 business_id 是 Long 应用id。 env_id 否 Long 环境id status 否 String 探针状态。 枚举值: online disable offline region 是 String region英文名称。 order_by_status 否 String 是否按照采集状态排序,默认不填则不按状态排序,填y则按照状态排序。 page 是 Integer 需要查询的页码,最小数为1。 page_size 否 Integer 查询结果每页最多显示的条数。 keyword 否 String 关键字。
  • 响应示例 状态码: 200 OK,请求响应成功。 { "total_page" : 1, "total_count" : 1, "online_count" : 1, "offline_count" : 0, "disable_count" : 0, "agent_info_list" : [ { "instance_id" : 5298, "business_name" : "LubanApm", "business_id" : null, "app_name" : "apm-data-deliver/xx-xxxx-xxx", "host_name" : "szv*******1", "instance_name" : "default", "ip_address" : "*.*.*.*", "env_id" : 1105, "agent_version" : "2.1.16", "last_heartbeat" : 1669684246000, "register_time" : 1657762671000, "last_modify_user_id" : "70iWY********VHVd", "instance_status" : 0, "last_modify_user_name" : "yWX", "last_modify_time" : 1667839085000 } ]}
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 total_page Integer 总页数。 total_count Integer 总个数。 online_count Integer 正常个数。 offline_count Integer 心跳异常个数。 disable_count Integer 被关闭的个数。 agent_info_list Array of InstanceInfo objects agent地址列表。 表4 InstanceInfo 参数 参数类型 描述 instance_id Long 实例id。 business_name String 应用名称。 business_id Long 应用id。 app_name String 组件名称。 host_name String 主机名称。 instance_name String 实例名称。 ip_address String 主机ip地址。 env_id Long 环境ID。 agent_version String Javaagent版本。 last_heartbeat Long 最后心跳时间。 register_time Long 注册时间。 last_modify_user_id String 最后修改用户id。 instance_status Integer 实例状态,0表示启用,1表示停用,2表示离线。 last_modify_user_name String 最后修改用户名称。 last_modify_time Long 最后修改时间。
  • 请求参数 表1 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 从IAM服务获取的用户Token。 x-business-id 是 Long 应用id。 表2 请求Body参数 参数 是否必选 参数类型 描述 business_id 是 Long 应用id。 region 是 String 区域名称。 page 是 Integer 页码。 page_size 否 Integer 每页条数。 keyword 否 String 关键字。
  • 响应示例 状态码: 200 OK,请求响应成功。 { "app_info_list" : [ { "env_name" : "beta", "env_id" : 1, "app_name" : "application_name", "app_id" : 2, "online_count" : 2, "disable_count" : 1, "offline_count" : 1 } ], "app_total_count" : 4, "app_info_map" : { "additionalProp1" : { "env_name" : "string", "env_id" : 0, "app_name" : "string", "app_id" : 0, "online_count" : 0, "disable_count" : 0, "offline_count" : 0 }, "additionalProp2" : { "env_name" : "string", "env_id" : 0, "app_name" : "string", "app_id" : 0, "online_count" : 0, "disable_count" : 0, "offline_count" : 0 }, "additionalProp3" : { "env_name" : "string", "env_id" : 0, "app_name" : "string", "app_id" : 0, "online_count" : 0, "disable_count" : 0, "offline_count" : 0 } }}
  • 调用API获取项目ID 项目ID还可通过调用查询指定条件下的项目信息API获取。 获取项目ID的接口为“GET https://{Endpoint}/v3/projects/”,其中{Endpoint}为IAM的终端节点,可以从地区和终端节点获取。 响应示例如下,其中projects下的“id”即为项目ID。 { "projects": [ { "domain_id": "65382450e8f64ac0870cd180d14e684b", "is_domain": false, "parent_id": "65382450e8f64ac0870cd180d14e684b", "name": "cn-north-4", "description": "", "links": { "next": null, "previous": null, "self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99" }, "id": "a4a5d4098fb4474fa22cd05f897d6b99", "enabled": true } ], "links": { "next": null, "previous": null, "self": "https://www.example.com/v3/projects" } }
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 business_nodes Array of BusinessNodeModel objects 获取应用列表数据结构。 表3 BusinessNodeModel 参数 参数类型 描述 default Boolean 默认应用。 display_name String 应用展示名称。 eps_id String 企业项目的id。 gmt_create String 创建时间。 gmt_modify String 修改时间。 id Long 应用id。 inner_domain_id Integer 内部租户id。 is_default Boolean 是否是默认的应用。 name String 应用的英文名称。
  • 响应示例 状态码: 200 OK,请求响应成功。 { "business_nodes" : [ { "default" : true, "id" : 2, "gmt_create" : null, "gmt_modify" : null, "name" : "apm", "display_name" : "apm", "is_default" : true, "inner_domain_id" : 1, "eps_id" : "**********" } ]}
  • 响应示例 状态码: 200 OK,请求响应成功。 { "total_page" : 1, "total_count" : 1, "online_count" : 1, "offline_count" : 0, "disable_count" : 0, "agent_info_list" : [ { "instance_id" : 5298, "business_name" : "LubanApm", "business_id" : null, "app_name" : "apm-data-deliver/xx-xxxx-xxx", "host_name" : "szv*******1", "instance_name" : "default", "ip_address" : "*.*.*.*", "env_id" : 1105, "agent_version" : "2.1.16", "last_heartbeat" : 1669684246000, "register_time" : 1657762671000, "last_modify_user_id" : "70iWY********VHVd", "instance_status" : 0, "last_modify_user_name" : "yWX", "last_modify_time" : 1667839085000 } ]}
共100000条
提示

您即将访问非华为云网站,请注意账号财产安全