华为云用户手册

  • 响应示例 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-ruledest.delete]. Parameter is [rule_oid]. Processor is [path].", "request_id" : "cb39e78a-afd3-4e04-901d-70468b1c23dc-1619602712496-cnnorth7a-P-romalink-service01" } 状态码: 404 Not Found { "error_code" : "ROMA.00110006", "error_msg" : "The resource does not exist. Check whether the resource ID 1 is correct.", "request_id" : "13984193-ca65-4954-9b7f-4b7d680399d6-1619678681445-cnnorth7a-P-romalink-service01" } 状态码: 500 Internal Server Error { "error_code" : "ROMA.00110002", "error_msg" : "The instance does not exist. project_id: 397cd10b30544c588b2f4a56d83856c4, instance_id: f3bb386a-23ec-47aa-9943-4c60ac658611", "request_id" : "c8c06d0a-be92-4fdf-9d10-bc20131ab158-1619593104919-cnnorth7a-P-romalink-service01" }
  • 响应参数 状态码: 200 表7 响应Body参数 参数 参数类型 描述 result Boolean 返回结果 true (成功) 最小长度:0 最大长度:10 状态码: 400 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 detail String 描述详情 最小长度:2 最大长度:512 状态码: 404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
  • 请求示例 测试指定MySQL数据源的连通性 { "datasource_name" : "fdi_ds_y3k674", "datasource_type" : "MYSQL", "content" : { "host" : "**.**.**.**", "port" : "3306", "database_name" : "testfdi", "user_name" : "fditest", "password" : "******", "mode" : "default" }, "app_id" : "9dbd2cd2-9622-4a1b-ad47-31018cf44cbd", "description" : "testtesttest" }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 id String 应用ID。 name String 应用名称。 字符集:支持中文、英文字母、数字、中划线、下划线、点、空格和中英文圆括号。 约束:实例下唯一。 remark String 应用描述。 roles Array of strings 应用权限角色。 read:应用下资源只读权限,至少要存在此权限,包括API调试。 access:应用下资源的访问管理权限。 delete:应用下资源的删除权限。 modify:应用下资源的修改权限,包括API发布、下线。 admin:应用和应用下资源的权限。 仅提供admin时,会自动应用其它所有权限。 未提供read时会自动应用read权限。 create_time String 创建时间。 update_time String 更新时间。 created_user created_user object 创建用户信息。 last_updated_user last_updated_user object 最后更新用户信息。 owner Boolean 是否是应用拥有者。 key String 应用认证访问KEY,未提供时随机生成。 字符集:支持中文、英文字母、数字、中划线、下划线、@号和点,以字母或中文或数字开头。 约束:实例下唯一。 favorite Boolean 是否收藏应用,收藏的应用会在列表里优先显示。 表4 created_user 参数 参数类型 描述 user_id String 创建应用的用户ID。 user_name String 创建应用的用户名称。 表5 last_updated_user 参数 参数类型 描述 user_id String 最后修改者的用户ID。 user_name String 最后修改者的用户名。 状态码: 403 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。
  • 响应示例 状态码: 200 OK { "id" : "b2e6b145-4f3f-4a80-aa45-f4b8029f95a3", "name" : "AppName", "remark" : "example", "roles" : [ "read, access, delete, modify, admin" ], "create_time" : "2019-12-06T06:49:04.000Z", "update_time" : "2019-12-06T06:49:04.000Z", "created_user" : { "user_id" : "string", "user_name" : "string" }, "last_updated_user" : { "user_id" : "string", "user_name" : "string" }, "owner" : true, "key" : "TEI95R8RZ2pIf8UM", "favorite" : true } 状态码: 403 Forbidden { "error_code" : "ROMA.00000101", "error_msg" : "error summary", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43" }
  • 响应示例 状态码: 200 OK { "app_quota_id" : "c900c5612dbe451bb43cbcc49cfaf2f3", "call_limits" : 1000, "create_time" : "2020-09-19T07:27:47Z", "name" : "ClientQuota_demo", "reset_time" : "2020-09-20 00:00:00 +0000 +0000", "time_interval" : 1, "time_unit" : "DAY" } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:instance_id. Please refer to the support documentation" } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3093", "error_msg" : "App quota c900c5612dbe451bb43cbcc49cfaf2f3 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 app_quota_id String 客户端配额编号 name String 配额名称。支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3-255字符 call_limits Integer 客户端配额的访问次数限制 time_unit String 限定时间单位:SECOND:秒、MINUTE:分、HOURE:时、DAY:天 time_interval Integer 配额的限定时间值 remark String 参数说明和描述 最大长度:255 reset_time String 首次配额重置时间点,不配置默认为首次调用时间计算 create_time String 创建时间 bound_app_num Integer 配额策略已绑定应用数量 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:id. Please refer to the support documentation" } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3018", "error_msg" : "The signature key binding record does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "apps" : [ { "app_id" : "ac18a23f-8f06-40ac-8093-f790de2ba95b", "app_key" : "ac18a23f-8f06-40ac-8093-f790de2ba95b", "bound_time" : "0001-01-01T00:00:00Z", "name" : "app-test", "register_time" : "2020-08-22T07:57:01Z", "status" : 1, "update_time" : "2020-08-22T07:57:01Z" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:instance_id. Please refer to the support documentation" } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3093", "error_msg" : "The App quota c900c5612dbe451bb43cbcc49cfaf2f3 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 apps Array of AppQuotaAppInfo objects 客户端应用列表 表5 AppQuotaAppInfo 参数 参数类型 描述 app_id String 客户端应用编号 name String 客户端应用名称 status Integer 客户端应用状态: 1:启用 2:禁用 app_key String 客户端应用的Key remark String 客户端应用描述 register_time String 创建时间 update_time String 更新时间 app_quota_id String 客户端配额编号 app_quota_name String 配额名称。支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3-255字符 bound_time String 绑定时间 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 product_template_id Integer 服务归属的产品模板ID 最小值:1 最大值:99999999999999999 product_id Integer 服务归属的产品ID 最小值:1 最大值:99999999999999999 service_id Integer 服务ID 最小值:1 最大值:99999999999999999 service_name String 服务名称,支持中文,英文大小写,数字,下划线和中划线,长度2-64 最小长度:2 最大长度:64 description String 服务描述,长度0-200 最小长度:0 最大长度:200 status Integer 服务状态 0-启用 1-停用 最小值:0 最大值:10 created_user CreatedUser object 创建时的用户 last_updated_user LastUpdatedUser object 最后更新时的用户 created_datetime Long 创建时间止,格式timestamp(ms),使用UTC时区 最小值:1 最大值:99999999999999999 last_updated_datetime Long 最后修改时间止,格式timestamp(ms),使用UTC时区 最小值:1 最大值:99999999999999999 表4 CreatedUser 参数 参数类型 描述 user_id String 用户ID(保留字段,未使用) 最小长度:0 最大长度:64 user_name String 用户名 最小长度:0 最大长度:64 表5 LastUpdatedUser 参数 参数类型 描述 user_id String 用户ID(保留字段,未使用) 最小长度:0 最大长度:64 user_name String 用户名 最小长度:0 最大长度:64 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64
  • 响应示例 状态码: 200 OK { "product_id" : 122893, "service_id" : 10190, "service_name" : "s1", "description" : null, "status" : 0, "created_user" : { "user_id" : "", "user_name" : "user" }, "last_updated_user" : { "user_id" : "", "user_name" : "user" }, "created_datetime" : 1607502702474, "last_updated_datetime" : 1607572282845 } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-services.queryServiceDetail]. Parameter is [service_id]. Processor is [path].", "request_id" : "cb39e78a-afd3-4e04-901d-70468b1c23dc-1619602712496-cnnorth7a-P-romalink-service01" } 状态码: 404 Not Found { "error_code" : "ROMA.00110006", "error_msg" : "The resource does not exist. Check whether the resource ID 1 is correct.", "request_id" : "13984193-ca65-4954-9b7f-4b7d680399d6-1619678681445-cnnorth7a-P-romalink-service01" } 状态码: 500 Internal Server Error { "error_code" : "ROMA.00110002", "error_msg" : "The instance does not exist. project_id: 397cd10b30544c588b2f4a56d83856c4, instance_id: f3bb386a-23ec-47aa-9943-4c60ac658611", "request_id" : "c8c06d0a-be92-4fdf-9d10-bc20131ab158-1619593104919-cnnorth7a-P-romalink-service01" }
  • 响应示例 状态码: 200 OK { "id" : "b2e6b145-4f3f-4a80-aa45-f4b8029f95a3", "secret" : "JNs1VK3vLdTT9Djd" } 状态码: 403 Forbidden { "error_code" : "ROMA.00000101", "error_msg" : "error summary", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 id String 应用ID。 secret String 应用认证访问SECRET,未提供(字段不存在或值为null)时随机生成。 字符集:英文字母、数字、!、@、#、$、%、+、=、点、中划线、斜线/。 复杂度:满足大小写字母、数字、特殊字符的复杂度组合,考虑兼容性暂时不做复杂度校验。 状态码: 403 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 secret 否 String 应用认证访问SECRET,未提供(字段不存在或值为null)时随机生成。 字符集:英文字母、数字、!、@、#、$、%、+、=、点、中划线、斜线/。 复杂度:满足大小写字母、数字、特殊字符的复杂度组合,考虑兼容性暂时不做复杂度校验。
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 service_id Integer 命令所属服务id 最小值:0 最大值:99999999999999999 command_id Integer 命令id 最小值:0 最大值:99999999999999999 command_name String 命令名称 最小长度:0 最大长度:255 description String 命令描述 最小长度:0 最大长度:255 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 404 表5 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 500 表6 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64
  • 响应示例 状态码: 200 OK { "service_id" : 10190, "command_id" : 6398, "command_name" : "command", "description" : "command" } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-services.queryCommand]. Parameter is [service_id]. Processor is [path].", "request_id" : "cb39e78a-afd3-4e04-901d-70468b1c23dc-1619602712496-cnnorth7a-P-romalink-service01" } 状态码: 404 Not Found { "error_code" : "ROMA.00110006", "error_msg" : "The resource does not exist. Check whether the resource ID 1 is correct.", "request_id" : "13984193-ca65-4954-9b7f-4b7d680399d6-1619678681445-cnnorth7a-P-romalink-service01" } 状态码: 500 Internal Server Error { "error_code" : "ROMA.00110002", "error_msg" : "The instance does not exist. project_id: 397cd10b30544c588b2f4a56d83856c4, instance_id: f3bb386a-23ec-47aa-9943-4c60ac658611", "request_id" : "c8c06d0a-be92-4fdf-9d10-bc20131ab158-1619593104919-cnnorth7a-P-romalink-service01" }
  • 响应示例 状态码: 200 OK { "code" : "APIG.0000", "start_time" : 1599400383, "end_time" : 1599616383, "list" : [ { "max_latency" : 0, "avg_latency" : 0, "max_inner_latency" : 0, "avg_inner_latency" : 0, "max_backend_latency" : 0, "avg_backend_latency" : 0, "req_count" : 5, "req_count2xx" : 0, "req_count4xx" : 0, "req_count5xx" : 5, "req_count_error" : 5, "output_throughput" : 1695, "input_throughput" : 2990, "current_minute" : 1599552000, "req_time" : "2020-09-08 16:00:00", "cycle" : "HOUR", "api_id" : "85deba41aae24839b14cdc03780e8bb6", "group_id" : "22ea1e9d294e4349940b6452a7fd2207", "provider" : "2cb5460f617c4822835e38f0966d8b93", "register_time" : "2020-09-08 17:22:22" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:api_id. Please refer to the support documentation" } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3002", "error_msg" : "API 39bce6d25a3f470e8cf7b2c97174f7d9 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 code String 响应码 start_time Long 开始时间的UTC的时间戳 end_time Long 截止时间的UTC的时间戳 list Array of StatisticsAPI objects 统计指标的数据结构结构体 表5 StatisticsAPI 参数 参数类型 描述 max_latency Integer 最大延时 avg_latency Float 平均延时 req_count Integer 请求总次数 req_count2xx Integer 2xx响应码总次数 req_count4xx Integer 4xx响应码总次数 req_count5xx Integer 5xx响应码总次数 req_count_error Integer 错误次数 max_inner_latency Integer 最大网关内部延时 avg_inner_latency Float 平均网关内部延时 max_backend_latency Integer 最大后端延时 avg_backend_latency Float 平均后端延时 output_throughput Long 下行吞吐量(byte) input_throughput Long 上行吞吐量(byte) current_minute Long API访问的UTC时间戳 cycle String 查询统计周期 api_id String API编号 group_id String API分组编号 provider String API拥有者 req_time String API请求时间 register_time String 记录时间 status Integer 状态值: 1:调度中,未上报CES 2:已经成功上报CES 预留字段,暂不支持 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 功能介绍 将流控策略应用于API,则所有对该API的访问将会受到该流控策略的限制。 当一定时间内的访问次数超过流控策略设置的API最大访问次数限制后,后续的访问将会被拒绝,从而能够较好的保护后端API免受异常流量的冲击,保障服务的稳定运行。 为指定的API绑定流控策略,绑定时,需要指定在哪个环境上生效。同一个API发布到不同的环境可以绑定不同的流控策略;一个API在发布到特定环境后只能绑定一个默认的流控策略。
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 strategy_id 是 String 流控策略编号 最小长度:1 最大长度:65 publish_ids 是 Array of strings API的发布记录编号
  • 响应示例 状态码: 201 Created { "throttle_applys" : [ { "publish_id" : "40e7162dc6b94bbbbb1a60d2a24b1b0c", "scope" : 1, "strategy_id" : "3437448ad06f4e0c91a224183116e965", "apply_time" : "2020-08-03T12:25:52.257613934Z", "id" : "3e06ac135e18477e918060d3c59d6f6a" } ] } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3005", "error_msg" : "Request throttling policy 3437448ad06f4e0c91a224183116e965 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 201 表4 响应Body参数 参数 参数类型 描述 throttle_applys Array of ThrottleApiBinding objects API与流控策略的绑定关系列表 表5 ThrottleApiBinding 参数 参数类型 描述 publish_id String API的发布记录编号 scope Integer 策略作用域,取值如下: 1:整个API 2: 单个用户 3:单个APP 目前只支持1 strategy_id String 流控策略的ID apply_time String 绑定时间 id String 绑定关系的ID 状态码: 401 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 201 Created { "source_id" : 35296, "product_id" : 122893, "device_id" : 711568, "topic" : "/v1/devices/214/datas", "device_name" : "device", "product_name" : "product", "is_base64" : 0, "contain_device_info" : 0 } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-rulesrc.save]. Parameter is [rule_oid]. Processor is [path].", "request_id" : "cb39e78a-afd3-4e04-901d-70468b1c23dc-1619602712496-cnnorth7a-P-romalink-service01" } 状态码: 404 Not Found { "error_code" : "ROMA.00110006", "error_msg" : "The resource does not exist. Check whether the resource ID 1 is correct.", "request_id" : "13984193-ca65-4954-9b7f-4b7d680399d6-1619678681445-cnnorth7a-P-romalink-service01" } 状态码: 500 Internal Server Error { "error_code" : "ROMA.00110002", "error_msg" : "The instance does not exist. project_id: 397cd10b30544c588b2f4a56d83856c4, instance_id: f3bb386a-23ec-47aa-9943-4c60ac658611", "request_id" : "c8c06d0a-be92-4fdf-9d10-bc20131ab158-1619593104919-cnnorth7a-P-romalink-service01" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:100000 表3 请求Body参数 参数 是否必选 参数类型 描述 product_id 是 Integer 产品ID,自动向下取整 最小值:1 最大值:99999999999999999 device_id 否 Integer 设备ID,自动向下取整,不填为全部设备 最小值:1 最大值:99999999999999999 topic 是 String 主题,当设备ID为空时为产品级主题,设备ID不为空时为设备级主题 最小长度:0 最大长度:64 is_base64 否 Integer 是否payload使用base64,0-是 1-否 最小值:1 最大值:10 缺省值:1 contain_device_info 否 Integer 是否包含设备信息,0-是 1-否 最小值:1 最大值:10 缺省值:1
  • 响应参数 状态码: 201 表4 响应Body参数 参数 参数类型 描述 source_id Integer 源数据源ID 最小值:1 最大值:99999999999999999 product_id Integer 产品ID 最小值:1 最大值:99999999999999999 device_id Integer 设备ID,不填为全部设备 最小值:1 最大值:99999999999999999 topic String 主题,当设备ID为空时为产品级主题,设备ID不为空时为设备级主题 最小长度:0 最大长度:200 device_name String 设备名称 最小长度:0 最大长度:64 product_name String 产品名称 最小长度:0 最大长度:64 is_base64 Integer 是否payload使用base64,0-是 1-否 最小值:0 最大值:10 缺省值:1 contain_device_info Integer 是否包含设备信息,0-是 1-否 最小值:0 最大值:10 缺省值:1 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "apis" : [ { "api_id" : "8aa097b00e9843efabc9c593d11b769d", "api_name" : "测试API", "type" : 1, "req_protocol" : "HTTP", "req_method" : "GET", "req_uri" : "/test", "auth_type" : "IAM", "match_mode" : "NORMAL", "remark" : "API描述", "group_id" : "b9be707660c5406394f8973e087bae20", "group_name" : "DEFAULT", "roma_app_id" : "82a9a3c3-781f-440a-ae4b-fb0cc88e22c8", "plugin_attach_id" : "8aa097b00e9843efacb9c593d11b769e", "publish_id" : "4739b3s5b729aa2237ef0d66dc635276", "env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID", "env_name" : "RELEASE", "attached_time" : "2020-11-02T12:31:23.353Z" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:instance_id. Please refer to the support documentation" } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3068", "error_msg" : "Plugin b294018ee0554156a875b3513e02e5b9 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 apis Array of PluginApiInfo objects 绑定插件的API列表。 表5 PluginApiInfo 参数 参数类型 描述 api_id String API编号 api_name String API名称。 支持汉字、英文、数字、中划线、下划线、点、斜杠、中英文格式下的小括号和冒号、中文格式下的顿号,且只能以英文、汉字和数字开头,3-255个字符。 说明: 中文字符必须为UTF-8或者unicode编码。 type Integer API类型 1:公有API 2:私有API req_protocol String API的请求协议 HTTP HTTPS BOTH:同时支持HTTP和HTTPS 缺省值:HTTPS req_method String API的请求方式 req_uri String 请求地址。可以包含请求参数,用{}标识,比如/getUserInfo/{userId},支持 * / %- _ .等特殊字符,总长度不超过512,且满足URI规范。 支持环境变量,使用环境变量时,每个变量名的长度为3 ~ 32位的字符串,字符串由英文字母、数字、中划线、下划线组成,且只能以英文开头。 说明: 需要服从URI规范。 auth_type String API的认证方式 NONE:无认证 APP:APP认证 IAM:IAM认证 AUTHORIZER:自定义认证 match_mode String API的匹配方式 SWA:前缀匹配 NORMAL:正常匹配(绝对匹配) 默认:NORMAL remark String API描述。 group_id String API所属的分组编号 group_name String API所属分组的名称 roma_app_id String 归属集成应用编码 env_id String 绑定API的环境编码。 env_name String 绑定API的环境名称 publish_id String 发布编码。 plugin_attach_id String 插件绑定编码。 attached_time String 绑定时间。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 bindings Array of SignApiBindingBase objects 本次查询到的签名密钥和API绑定关系列表 表5 SignApiBindingBase 参数 参数类型 描述 publish_id String API的发布编号 api_id String API编号 group_name String API所属分组的名称 binding_time String 绑定时间 env_id String API所属环境的编号 env_name String API所属环境的名称 api_type Integer API类型 api_name String API名称 id String 绑定关系的ID api_remark String API描述 sign_id String 签名密钥的编号 sign_name String 签名密钥的名称。支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3 ~ 64字符。 说明: 中文字符必须为UTF-8或者unicode编码。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
共100000条