华为云用户手册

  • 响应示例 状态码: 200 Ok { "metrics" : [ { "metric" : { "namespace" : "abc", "metricName" : "def", "dimensions" : [ { "name" : "ghi", "value" : "lmn" } ] }, "dataPoints" : [ { "timestamp" : "1467892800000", "unit" : "Percent", "statistics" : [ { "statistic" : "maximum", "value" : "23" } ] } ] } ]} 状态码: 400 Bad Request { "error_code" : " BCS .4004021", "error_msg" : "GetOrgInstanceMetricDetail operation does not support IEF cluster type"} 状态码: 401 Unauthorized { "error_code" : "B CS .4010401", "error_msg" : "Incorrect token or token resolution failed"} 状态码: 403 Forbidden { "error_code" : "BCS.4030403", "error_msg" : "No permissions to request this method"} 状态码: 404 Not Found { "error_code" : "BCS.4040404", "error_msg" : "Not Found:the url is not found"} 状态码: 500 InternalServerError { "error_code" : "BCS.5000500", "error_msg" : "Internal Server Error"}
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 metrics Array of MetricItemResultAPI objects 指标对象列表。 表5 MetricItemResultAPI 参数 参数类型 描述 metric MetricDemision object 指标描述信息 dataPoints Array of MetricDataPoints objects 监控数据信息 表6 MetricDemision 参数 参数类型 描述 namespace String 命名空间 metricName String 指标名称 dimensions Array of Dimension objects 维度列表 表7 Dimension 参数 参数类型 描述 name String 维度名称。 value String 维度取值。 表8 MetricDataPoints 参数 参数类型 描述 timestamp Long 时间戳。 unit String 指标单位。 statistics Array of StatisticValue objects 统计方式。 表9 StatisticValue 参数 参数类型 描述 statistic String 统计方式。 value Double 统计结果。 状态码: 400 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 401 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 403 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 404 表13 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 500 表14 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 result String 请求结果 operation_id String 操作记录ID 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 401 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 404 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 500 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
  • 请求示例 { "inviter_bcsid" : "a30962b6-xxxxx-f7ff1a0ec561", "inviter_projectid" : "b45a57xxxxx8a5", "inviter_domainid" : "a38c7xxxxd374d", "inviter_username" : "bcs-test", "channel_name" : "channel", "invitee_bcsid" : "e97ae066-xxxxx-f6bdb4fd3df1", "invitee_projectid" : "e64e7xxxxx65e1", "invitee_domainid" : "a38c7xxxxx374d"}
  • 响应示例 状态码: 200 Ok { "result" : "success", "operation_id" : "B CSS VC01-03-1617158790255323683"} 状态码: 400 Bad Request { "error_code" : "BCS.4006003", "error_msg" : "Invalid Parameter notification status"} 状态码: 401 Unauthorized { "error_code" : "BCS.4010401", "error_msg" : "Incorrect token or token resolution failed"} 状态码: 403 Forbidden { "error_code" : "BCS.4030403", "error_msg" : "No permissions to request this method"} 状态码: 404 Not Found { "error_code" : "BCS.4040404", "error_msg" : "Not Found:the url is not found"} 状态码: 500 InternalServerError { "error_code" : "BCS.5000500", "error_msg" : "Internal Server Error"}
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 count Integer 实例总数量 instances Array of InstanceInfo objects 实例列表 表5 InstanceInfo 参数 参数类型 描述 id String 实例ID name String 实例名称 status String 实例状态:正常(Available)、不可用(Unavailable)、异常(Exception)、待付款(Unpaid)、创建中(Creating)、删除中(Deleting)、升级中(Upgrading)、组织创建中(OrgCreating)、组织删除中(OrgDeleting) edition String 版本类型: 专业版(Professional)、企业版(Enterprise)、铂金版(Platinum) kind String 实例类型,HuaweiCloudChain,Besu data_management String 数据管理模式:云端管理(Cloud) chain_engine_version String 实例 区块链 引擎版本 orgs Array of InstanceOrg objects 实例组织信息 chains Array of InstanceChain objects 实例链信息 create_time String 实例创建时间 update_time String 实例数据更新时间 enterprise_project_id String 企业项目id enterprise_project_name String 企业项目名称 表6 InstanceOrg 参数 参数类型 描述 name String 组织名称 status String 组织状态:正常(Available)、不可用(Unavailable)、异常(Exception)、待付款(Unpaid)、创建中(Creating)、删除中(Deleting) is_consensus Boolean 是否为共识组织,共识组织为true,非共识组织为false 表7 InstanceChain 参数 参数类型 描述 chain_id String 链ID consensus ConsensusType object 区块链共识类型:raft sign_algorithm String 区块链签名算法:ECDSA(ecdsa_with_sha256)、国密(sm2_with_sm3) contract_num Integer 合约数量 block_num Integer 区块数量 transaction_num Integer 交易数量 表8 ConsensusType 参数 参数类型 描述 - String 区块链共识类型:raft,IBFT2.0 状态码: 400 表9 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 401 表10 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 500 表11 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息
  • 响应示例 状态码: 200 请求成功 { "count" : 1, "instances" : [ { "id" : "e543adf0-c61e-11ec-a1c5-0255ac100408", "name" : "huawei-chain-01", "status" : "Available", "edition" : "Professional", "data_management" : "Cloud", "chain_engine_version" : "1.0.1.2", "orgs" : [ { "name" : "org1", "status" : "Available", "is_consensus" : true }, { "name" : "org2", "status" : "Available", "is_consensus" : false } ], "chains" : [ { "chain_id" : "huawei-chain-01-egger394n", "consensus" : "raft", "sign_algorithm" : "ecdsa_with_sha256", "contract_num" : 1, "block_num" : 5, "transaction_num" : 9 } ], "create_time" : "2022-04-16T07:20:05Z", "update_time" : "2022-04-16T07:20:05Z", "enterprise_project_id" : "0", "enterprise_project_name" : "default" } ]}
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 count Integer 凭据总数 tokens Array of BesuTokensResponse objects 凭据信息 表4 BesuTokensResponse 参数 参数类型 描述 token_id String 凭据ID description String 描述信息 create_time String 创建时间 状态码: 400 表5 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 401 表6 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 403 表7 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 500 表8 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用 IAM 服务获取用户Token接口获取。 表4 请求Body参数 参数 是否必选 参数类型 描述 time_range 是 String timeRange用于指标查询时间范围,主要用于解决客户端时间和服务端时间不一致情况下,查询最近N分钟的数据。另可用于精确查询某一段时间的数据。 step 是 Long 统计步长。毫秒数 search 否 String 模糊查询匹配字段,可以为空 metadata_relation 否 Array of EventMetadataRelation objects 查询条件组合,可以为空 sort 否 EventResultSort object 返回列表的排序方式,可以为空 表5 EventMetadataRelation 参数 是否必选 参数类型 描述 key 否 String 指定查询字段的key,对应metadata里面的key value 否 Array of strings 查询条件中指定key的值 relation 否 String 该条件与其他条件的组合方式 枚举值: AND OR NOT 表6 EventResultSort 参数 是否必选 参数类型 描述 order_by 否 Array of strings 排序字段列表。会根据列表中定义顺序对返回列表最排序 order 否 String 排序方式枚举值。asc代表正序,desc代表倒序 枚举值: asc desc
  • 响应参数 状态码: 200 表7 响应Body参数 参数 参数类型 描述 metrics Array of MetricItemResultAPI objects 指标对象列表。 表8 MetricItemResultAPI 参数 参数类型 描述 metric MetricDemision object 指标描述信息 dataPoints Array of MetricDataPoints objects 监控数据信息 表9 MetricDemision 参数 参数类型 描述 namespace String 命名空间 metricName String 指标名称 dimensions Array of Dimension objects 维度列表 表10 Dimension 参数 参数类型 描述 name String 维度名称。 value String 维度取值。 表11 MetricDataPoints 参数 参数类型 描述 timestamp Long 时间戳。 unit String 指标单位。 statistics Array of StatisticValue objects 统计方式。 表12 StatisticValue 参数 参数类型 描述 statistic String 统计方式。 value Double 统计结果。 状态码: 400 表13 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 401 表14 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 403 表15 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 404 表16 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 500 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
  • 响应示例 状态码: 200 Ok { "events" : [ { "annotations" : { "alarm_probableCause_zh_cn" : "可能原因", "message" : "告警详情", "alarm_fix_suggestion_zh_cn" : "修复建议" }, "attach_rule" : { }, "ends_at" : 0, "id" : "6775161208461480000", "metadata" : { "event_type" : "alarm", "event_severity" : "Major", "resource_type" : "blockchain", "event_name" : "test", "resource_id" : "d2e2deba-797d-872f-516c-9f96870be67e", "resource_provider" : "BCS" }, "starts_at" : 16377362908000, "timeout" : 60000 } ]} 状态码: 400 Bad Request { "error_code" : "BCS.4001108", "error_msg" : "metric names is wrong"} 状态码: 401 Unauthorized { "error_code" : "BCS.4010401", "error_msg" : "Incorrect token or token resolution failed"} 状态码: 403 Forbidden { "error_code" : "BCS.4030403", "error_msg" : "No permissions to request this method"} 状态码: 404 Not Found { "error_code" : "BCS.4040404", "error_msg" : "Not Found:the url is not found"} 状态码: 500 InternalServerError { "error_code" : "BCS.5000500", "error_msg" : "Internal Server Error"}
  • URI POST /v2/{project_id}/blockchains/{blockchain_id}/events 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 租户从IAM申请到的projectid,一般为32位字符串。 blockchain_id 是 String 区块链服务id 表2 Query参数 参数 是否必选 参数类型 描述 type 否 String 查询类型。type=active_alert代表查询活动告警,type=history_alert代表查询历史告警。不传或者传其他值则返回指定查询条件的所有信息。 枚举值: history_alert active_alert
  • 响应示例 状态码: 200 Ok { "channels" : [ { "name" : "channel", "peers" : { "organization" : [ "peer-328000cb35d8971e0b0388f6182f95eaa4100784-0", "peer-328000cb35d8971e0b0388f6182f95eaa4100784-1" ] }, "consensusNodes" : { "organization" : [ "peer-328000cb35d8971e0b0388f6182f95eaa4100784-0" ] }, "consensus" : "etcdraft", "description" : "", "create_time" : "2020-10-15T10:24:51Z" } ]} 状态码: 400 Bad Request { "error_code" : "BCS.4006005", "error_msg" : "keyType error, keyType: blok not supported"} 状态码: 401 Unauthorized { "error_code" : "BCS.4010401", "error_msg" : "Incorrect token or token resolution failed"} 状态码: 403 Forbidden { "error_code" : "BCS.4030403", "error_msg" : "No permissions to request this method"} 状态码: 404 Not Found { "error_code" : "BCS.4040404", "error_msg" : "Not Found:the url is not found"} 状态码: 500 InternalServerError { "error_code" : "BCS.5000500", "error_msg" : "Internal Server Error"}
  • 响应示例 状态码: 200 请求成功 { "count" : 0, "contracts" : [ { "address" : "string", "status" : "string", "abi" : "string", "bytecode" : "string", "description" : "string", "create_time" : "string" } ]}
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 count Integer 合约数量 contracts Array of BesuContractsRes objects 合约信息 表5 BesuContractsRes 参数 参数类型 描述 address String 合约地址 status String 合约状态 abi String 合约ABI bytecode String 合约字节码 description String 实体文字描述的一个或多个段落。 create_time String 实体的创建时间戳。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 401 表7 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 500 表8 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息
  • URI GET /v2/{project_id}/besu/instances/{instance_id}/chain/contracts 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID instance_id 是 String 实例ID 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Integer 偏移量,表示查询该偏移量后面的记录 limit 否 Integer 每页返回的条目数量
  • 响应示例 状态码: 200 返回值 { "count" : 0, "backups" : [ { "id" : "string", "name" : "string", "instance_name" : "string", "instance_id" : "string", "status" : "string", "reason" : "string", "type" : "string", "create_time" : "string" } ]}
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 count Integer 个数 backups Array of BackupsResponse objects 备份列表 表4 BackupsResponse 参数 参数类型 描述 id String 备份ID name String 备份名称 instance_name String 备份实例名称 instance_id String 备份实例ID status String 状态; 备份中(Backuping),可用(Active),失败(Fail) reason String 失败原因 只有Status为失败(Fail)才有值 type String 备份方式:手动备份(ManualBackup),自动备份(AutoBackup) create_time String 备份创建时间 状态码: 400 表5 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 401 表6 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 403 表7 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 500 表8 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 notifications Array of NotificationList objects 通知列表 表4 NotificationList 参数 参数类型 描述 channel_name String 通道名称 status String 当前状态 updated_time String 更新时间 tc3_need Boolean 是否开启可信 invitor_info InvitorInfo object 邀请方信息 invitee_info InviteeInfo object 被邀请方信息 hide Long 是否删除 invitee_orgs Array of OrganizationV2 objects 被邀请的组织信息 read_status Long 阅读状态值 cross_version_upgrade String 跨版本进行升级 表5 InvitorInfo 参数 参数类型 描述 invitor_id String 邀请方用户id invitor_name String 邀请方用户名 invitor_bcs_id String 邀请方的服务实例id invitor_bcs_name String 邀请方的服务实例名 invitor_consensus String 邀请方的共识 invitor_project_id String 邀请方的projectID invitor_cluster_type String 邀请方的集群类型 invitor_database_type String 邀请方数据库类型 invitor_signature_algorithm String 邀请方的签名算法 invitor_fabric_version String 邀请方的fabric版本 order_fade_enabled Boolean 是否允许共识节点老化 order_fade_cache Long 共识节点的老化阈值 表6 InviteeInfo 参数 参数类型 描述 invitee_id String 被邀请用户id invitee_name Long 被邀请租户名称 invitee_bcs_name String 被邀请的服务实例名称 invitee_bcs_id String 被邀请的服务实例id invitee_project_id String 被邀请的项目id 表7 OrganizationV2 参数 参数类型 描述 name String 组织名称 name_hash String 组织hash node_count Integer 组织节点 status String 状态 status_detail String 状态描述 状态码: 400 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 401 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 403 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 404 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 500 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
  • 响应示例 状态码: 400 Bad Request { "error_code" : "BCS.4006014", "error_msg" : "Invalid Parameter quotasType : ecs"} 状态码: 401 Unauthorized { "error_code" : "BCS.4010401", "error_msg" : "Incorrect token or token resolution failed"} 状态码: 403 Forbidden { "error_code" : "BCS.4030403", "error_msg" : "No permissions to request this method"} 状态码: 404 Not Found { "error_code" : "BCS.4040404", "error_msg" : "Not Found:the url is not found"} 状态码: 500 InternalServerError { "error_code" : "BCS.5000500", "error_msg" : "Internal Server Error"}
  • 响应示例 状态码: 200 Ok { "count" : 1, "operation_records" : [ { "operation_id" : "BCSSVC01-99-1618218591906093855", "resource_type" : "BCSSVC01", "operation_type" : "99", "domain_id" : "051ddda36880d3420f9bc01403fd8da0", "project_id" : "051ddda57400d2982fccc014fab5749d", "blockchain_id" : "23604f57-eac9-3777-e9f5-ae87457f2338", "blockchain_name" : "bcs-i3b0ms", "cluster_info" : { "cluster_type" : "cce", "name" : "asdfasf", "cluster_id" : "4df5652f-96dc-11eb-b49c-0255ac100b08", "node_infos" : null }, "operation_process" : { "Create Other Dependent Resource" : { "step_name" : "Create Other Dependent Resource", "status" : "processing", "detail" : "", "sub_steps" : { "Create EIP" : { "substep_name" : "Create EIP", "detail" : null, "status" : "finished", "message" : null, "start_time" : 1618219038464462600, "end_time" : 1618219038464462600, "serial_num" : 1 }, "Create network storage" : { "substep_name" : "Create network storage", "detail" : "waiting", "status" : "", "message" : null, "start_time" : 0, "end_time" : 0, "serial_num" : 2 } }, "serial_num" : 2 }, "Preparation" : { "step_name" : "Preparation", "status" : "finished", "detail" : "", "sub_steps" : { "Generate basic configurations" : { "substep_name" : "Generate basic configurations", "detail" : null, "status" : "finished", "message" : null, "start_time" : 1618218591951266000, "end_time" : 1618218591951266000, "serial_num" : 3 } }, "serial_num" : 1 } }, "record_time" : 1618218591906100000, "operation_status" : "processing", "message" : null, "desc" : null } ]} 状态码: 400 Bad Request { "error_code" : "BCS.4006005", "error_msg" : "keyType error, keyType: blok not supported"} 状态码: 401 Unauthorized { "error_code" : "BCS.4010401", "error_msg" : "Incorrect token or token resolution failed"} 状态码: 403 Forbidden { "error_code" : "BCS.4030403", "error_msg" : "No permissions to request this method"} 状态码: 404 Not Found { "error_code" : "BCS.4040404", "error_msg" : "Not Found:the url is not found"} 状态码: 500 InternalServerError { "error_code" : "BCS.5000500", "error_msg" : "Internal Server Error"}
  • URI GET /v2/{project_id}/operation/record 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 租户从IAM申请到的项目ID,一般为32位字符串 表2 Query参数 参数 是否必选 参数类型 描述 blockchain_id 否 String 区块链ID operation_status 否 String 操作状态, 可选数值如下(括号中为该数值对应的操作状态含义):waiting(等待执行),processing(处理中),finished(操作完成,成功),failed(操作失败),stop(操作中断) 枚举值: waiting processing finished failed stop resource_type 否 String 资源类型, 可选数值如下(括号中为该数值对应的资源类型含义):BCSSVC01(BCS变更操作),BCSSVC02(UGBaaS变更操作),PLUGIN01(RestAPI插件变更操作),PLUGIN02(TC3插件变更操作),PLUGIN03(轻节点插件变更操作) 枚举值: BCSSVC01 BCSSVC02 PLUGIN01 PLUGIN02 PLUGIN03 operation_type 否 String 操作类型, 可选数值如下(括号中为该数值对应的操作类型含义):99(OpCreate),00(OpDelete),01(OpUpgrade),91(OpUpgradeRb),02(OpAddOrg),03(OpScaleOrg),04(OpJoinChannel),05(OpJoinUnion) 枚举值: 99 00 01 91 02 03 04 05 operation_id 否 String 操作记录ID
  • URI GET /v2/{project_id}/besu/instances/{instance_id}/chain/blocks 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID instance_id 是 String 实例ID 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Integer 分页查询起始位置 limit 否 Integer 每页返回的条目数量
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 count Integer 区块总数量 blocks Array of BesuBlockInfo objects 区块列表 表5 BesuBlockInfo 参数 参数类型 描述 block_height String 区块高度 transaction_num Integer 区块包含交易数量 body_hash String 区块hash parent_hash String 父区块hash create_time String 区块创建时间 状态码: 400 表6 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 401 表7 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 500 表8 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息
  • URI GET /v2/{project_id}/huaweicloudchain/instances/{instance_id}/chain/blocks 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID instance_id 是 String 实例ID 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Integer 分页查询起始位置 limit 否 Integer 每页返回的条目数量
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 count Integer 区块总数量 blocks Array of BlockInfo objects 区块列表 表5 BlockInfo 参数 参数类型 描述 block_height Integer 区块高度 transaction_num Integer 区块包含交易数量 body_hash String 区块体hash parent_hash String 父区块hash create_time String 区块创建时间 状态码: 400 表6 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 401 表7 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息 状态码: 500 表8 响应Body参数 参数 参数类型 描述 code String 状态码 error_code String 错误码 error_msg String 错误信息 message String 错误详细信息
  • 响应示例 状态码: 200 请求成功 { "count" : 2, "blocks" : [ { "block_height" : 1, "transaction_num" : 1, "body_hash" : "sDkqoUXCuDPJHBeV5FOpDBh1RygliHVEA0LqhPCZSuk=", "parent_hash" : "Pr25oSO7eImsxLFXUgppq3Q76QYcF1Rn6WiSMDkIh+g=", "create_time" : "2022-04-26T12:37:16Z" }, { "block_height" : 0, "transaction_num" : 1, "body_hash" : "O4UOrSyGzCgeu27+4DINOwTtpEEL+s/rKvXFEQGOuwk==", "parent_hash" : "A950LMuE2sjd6Mxys+tO9IVYeQwfdC1RTlRFoCNvgSw=", "create_time" : "2022-04-26T12:37:15Z" } ]}
  • 响应示例 状态码: 200 Ok { "series" : [ { "event_severity" : "Minor", "values" : [ 0, 0, 0, 0, 0, 0 ] }, { "event_severity" : "Info", "values" : [ 0, 0, 0, 0, 0, 0 ] } ], "step" : 60000, "timestamps" : [ 1642820700000, 1642820760000, 1642820820000, 1642820880000, 1642820940000, 1642821000000 ]} 状态码: 400 Bad Request { "error_code" : "BCS.4001108", "error_msg" : "metric names is wrong"} 状态码: 401 Unauthorized { "error_code" : "BCS.4010401", "error_msg" : "Incorrect token or token resolution failed"} 状态码: 403 Forbidden { "error_code" : "BCS.4030403", "error_msg" : "No permissions to request this method"} 状态码: 404 Not Found { "error_code" : "BCS.4040404", "error_msg" : "Not Found:the url is not found"} 状态码: 500 InternalServerError { "error_code" : "BCS.5000500", "error_msg" : "Internal Server Error"}
  • URI POST /v2/{project_id}/blockchains/{blockchain_id}/events/statistic 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 租户从IAM申请到的projectid,一般为32位字符串。 blockchain_id 是 String 区块链服务id 表2 Query参数 参数 是否必选 参数类型 描述 type 否 String 查询类型。type=active_alert代表查询活动告警,type=history_alert代表查询历史告警。不传或者传其他值则返回指定查询条件的所有信息 枚举值: history_alert active_alert
  • 响应参数 状态码: 200 表7 响应Body参数 参数 参数类型 描述 metrics Array of MetricItemResultAPI objects 指标对象列表。 表8 MetricItemResultAPI 参数 参数类型 描述 metric MetricDemision object 指标描述信息 dataPoints Array of MetricDataPoints objects 监控数据信息 表9 MetricDemision 参数 参数类型 描述 namespace String 命名空间 metricName String 指标名称 dimensions Array of Dimension objects 维度列表 表10 Dimension 参数 参数类型 描述 name String 维度名称。 value String 维度取值。 表11 MetricDataPoints 参数 参数类型 描述 timestamp Long 时间戳。 unit String 指标单位。 statistics Array of StatisticValue objects 统计方式。 表12 StatisticValue 参数 参数类型 描述 statistic String 统计方式。 value Double 统计结果。 状态码: 400 表13 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 401 表14 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 403 表15 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 404 表16 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 500 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
共100000条
提示

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