华为云用户手册

  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "items" : [ { "destination_id" : 27678, "destination_type" : 7, "app_id" : null, "destination_name" : null, "topic" : "8si8ST122893/in/214", "server" : "server", "token" : "token", "tag" : "device", "mqs_sasl_ssl" : "false", "user_name" : null, "password" : null } ] } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-ruledest.query]. 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 OK { "id" : "5f918d104dc84480a75166ba99efff21", "tags" : [ "webApi" ], "arrange_necessary" : 2, "backend_type" : "HTTP", "auth_type" : "AUTHORIZER", "auth_opt" : { "app_code_auth_type" : "DISABLE" }, "authorizer_id" : "8d0443832a194eaa84244e0c1c1912ac", "backend_api" : { "update_time" : "2020-08-02T16:32:47.077029Z", "vpc_status" : 1, "vpcinfo" : { "vpc_id" : "56a7d7358e1b42459c9d730d65b14e59", "vpc_proxy_host" : "www.example.com" }, "url_domain" : "56a7d7358e1b42459c9d730d65b14e59", "req_protocol" : "HTTPS", "id" : "1ce8fda3586d4371bd83c955df37e102", "req_method" : "GET", "register_time" : "2020-07-31T12:42:51Z", "req_uri" : "/test/benchmark", "timeout" : 5000, "status" : 1 }, "cors" : false, "status" : 1, "group_name" : "api_group_001", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "group_version" : "V1", "match_mode" : "NORMAL", "name" : "Api_http", "req_protocol" : "HTTPS", "req_method" : "GET", "req_uri" : "/test/http", "type" : 1, "version" : "V0.0.1", "result_normal_sample" : "normal result", "result_failure_sample" : "failure result", "register_time" : "2020-07-31T12:42:51Z", "update_time" : "2020-08-02T16:32:47.046289Z", "remark" : "web api", "backend_params" : [ { "name" : "X-CONSTANT-HEADER", "value" : "demo", "location" : "HEADER", "origin" : "CONSTANT", "remark" : "constant_demo", "id" : "8cb2eba19e7a4423a4e835647a8b8d76" }, { "name" : "app-id", "value" : "$context.appId", "location" : "HEADER", "origin" : "SYSTEM", "remark" : "consumer app id", "id" : "216ddda836e74d528f364ff589d9dd21" } ] } 状态码: 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 5f918d104dc84480a75166ba99efff21 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应示例 状态码: 200 OK { "call_limits" : 200, "app_name" : "app_demo", "object_name" : "app_demo", "object_id" : "356de8eb7a8742168586e5daf5339965", "throttle_id" : "3437448ad06f4e0c91a224183116e965", "apply_time" : "2020-08-04T02:40:56Z", "id" : "a3e9ff8db55544ed9db91d8b048770c0", "app_id" : "356de8eb7a8742168586e5daf5339965", "object_type" : "APP" } 状态码: 400 Bad Request { "error_code" : "APIG.2003", "error_msg" : "The parameter value is too large,parameterName:call_limits. 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.3013", "error_msg" : "Excluded request throttling configuration a3e9ff8db55544ed9db91d8b048770c0 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 id String 特殊配置的编号 call_limits Integer 特殊对象在流控时间内能够访问API的最大次数限制 apply_time String 设置时间 app_name String 作用的APP名称 app_id String 作用的APP编号 object_id String 特殊对象的身份标识 object_type String 特殊对象类型:APP、USER object_name String 作用的APP或租户的名称 throttle_id String 流控策略编号 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 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 错误描述
  • 响应示例 状态码: 200 Created { "permissions" : [ "read", "access", "delete", "modify" ], "rule_id" : 702244, "name" : "rule", "app_id" : "a1503e51-46f7-4d23-8617-7cb2d28dde98", "description" : "123", "status" : 0, "data_parsing_status" : 1, "created_user" : { "user_id" : "", "user_name" : "user" }, "last_updated_user" : { "user_id" : "", "user_name" : "user" }, "created_datetime" : 1607598152997, "last_updated_datetime" : 1607598152997 } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-rule.save]. Parameter is [request]. Processor is [body].", "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 ff38023c-0854-4779-847d-72528e1f5da5 is correct.", "request_id" : "72b07918-f6a2-4721-81bf-f3fd5486025e-1619663576836-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 表4 响应Body参数 参数 参数类型 描述 permissions Array of strings 权限 rule_id Integer 规则ID 最小值:1 最大值:99999999999999999 name String 规则名称,支持英文大小写,数字,下划线和中划线,长度1-64 最小长度:1 最大长度:64 app_id String 应用ID 最小长度:0 最大长度:64 description String 描述 最小长度:0 最大长度:200 status Integer 规则状态 0-启用 1-停用 最小值:0 最大值:10 data_parsing_status Integer 数据解析状态,ENABLE时data_parsing必填 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 表5 CreatedUser 参数 参数类型 描述 user_id String 用户ID(保留字段,未使用) 最小长度:0 最大长度:64 user_name String 用户名 最小长度:0 最大长度:64 表6 LastUpdatedUser 参数 参数类型 描述 user_id String 用户ID(保留字段,未使用) 最小长度:0 最大长度:64 user_name String 用户名 最小长度:0 最大长度:64 状态码: 400 表7 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 404 表8 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 500 表9 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:100000 表3 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 规则名称,支持英文大小写,数字,下划线和中划线,长度1-64 最小长度:1 最大长度:64 app_id 是 String 应用ID 最小长度:0 最大长度:64 description 否 String 描述,长度0-200 最小长度:0 最大长度:200 status 否 Integer 规则状态 0-启用 1-停用,不填写时默认为0-启用 最小值:0 最大值:10 data_parsing_status 否 Integer 数据解析状态,0-启用 1-停用,不填写时默认为1-禁用 最小值:0 最大值:10
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 tables Array of strings 数据源中所有的表名称 数组长度:0 - 2147483647 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 detail String 描述详情 最小长度:2 最大长度:512 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
  • 响应示例 状态码: 200 OK { "total" : 2, "size" : 2, "apis" : [ { "auth_type" : "APP", "run_env_name" : "", "group_name" : "api_group_001", "publish_id" : "", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "name" : "Api_function", "remark" : "FunctionGraph backend API", "run_env_id" : "", "id" : "abd9c4b2ff974888b0ba79be7e6b2763", "req_uri" : "/test/function" }, { "auth_type" : "APP", "run_env_name" : "RELEASE", "group_name" : "APIGroup_d3da", "publish_id" : "ca2631e233a74a758744ae1e19cc5ad7", "group_id" : "6acd94abe58747ee8a73b10c70817bac", "name" : "API_test", "remark" : "FunctionGraph backend API", "run_env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID", "id" : "11cbec3a7a8345ca981b86d161bc436e", "req_uri" : "/appcode" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:api_name. 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.3004", "error_msg" : "App 356de8eb7a8742168586e5daf5339965 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 ApiOutline objects 本次返回的API列表 表5 ApiOutline 参数 参数类型 描述 auth_type String API的认证方式 run_env_name String 发布的环境名 group_name String API所属分组的名称 publish_id String 发布记录的编号 group_id String API所属分组的编号 name String API名称 remark String API描述 run_env_id String 发布的环境id id String API编号 req_uri String API的请求地址 状态码: 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 OK 示例 1 { "total" : 1, "size" : 1, "members" : [ { "host" : "192.168.2.25", "weight" : 1, "is_backup" : false, "member_group_name" : "primary", "port" : 22, "status" : 1, "ecs_id" : "192.168.2.25", "ecs_name" : "192.168.2.25", "id" : "683b6807cad54122a6777ad047a6178e", "vpc_channel_id" : "56a7d7358e1b42459c9d730d65b14e59", "create_time" : "2020-07-23T09:13:24Z", "member_group_id" : "631b551cddda40478ef720163a9412ed" } ] } 示例 2 { "total" : 1, "size" : 1, "members" : [ { "host" : "192.168.0.17", "weight" : 2, "is_backup" : false, "member_group_name" : "primary", "port" : 22, "status" : 1, "ecs_id" : "1082720c-3c15-409c-9ae3-4983ddfb6a9d", "ecs_name" : "APIGtest02", "id" : "5c868f0224084710a1e188b7d3057c52", "vpc_channel_id" : "105c6902457144a4820dff8b1ad63331", "create_time" : "2020-07-23T09:03:53Z", "member_group_id" : "631b551cddda40478ef720163a9412ed" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2004", "error_msg" : "The parameter value is outside the allowable range,parameterName:weight. 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.3023", "error_msg" : "The VPC channel does not exist,id:56a7d7358e1b42459c9d730d65b14e59" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 请求示例 修改指定VPC通道下指定服务器组的IP类型后端服务器信息,修改的后端服务器为非备用节点,并修改权重值 { "member_group_name" : "primary", "members" : [ { "host" : "192.168.2.25", "weight" : 1, "is_backup" : false, "member_group_name" : "primary" } ] } 修改指定VPC通道的云服务器类型后端服务器信息,并修改权重值 { "members" : [ { "ecs_id" : "1082720c-3c15-409c-9ae3-4983ddfb6a9d", "ecs_name" : "APIGtest02", "weight" : 2 } ] }
  • 响应参数 状态码: 200 表5 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 members Array of VpcMemberInfo objects 本次查询到的云服务器列表 表6 VpcMemberInfo 参数 参数类型 描述 host String 后端服务器地址 后端实例类型为ip时必填 最大长度:64 weight Integer 权重值。 允许您对后端服务进行评级,权重值越大,转发到该云服务的请求数量越多。 最小值:0 最大值:10000 is_backup Boolean 是否备用节点。 开启后对应后端服务为备用节点,仅当非备用节点全部故障时工作。 实例需要升级到对应版本才支持此功能,若不支持请联系技术支持。 缺省值:false member_group_name String 后端服务器组名称。为后端服务地址选择服务器组,便于统一修改对应服务器组的后端地址。 status Integer 后端服务器状态 1:可用 2:不可用 port Integer 后端服务器端口 最小值:0 最大值:65535 ecs_id String 后端云服务器的编号。 后端实例类型为ecs时必填,支持英文,数字,“-”,“_”,1 ~ 64字符。 最大长度:255 ecs_name String [后端云服务器的名称。] 后端实例类型为ecs时必填,支持汉字,英文,数字,“-”,“_”,“.”,1 ~ 64字符。 最大长度:64 id String 后端实例对象的编号 vpc_channel_id String VPC通道的编号 create_time String 后端实例增加到VPC通道的时间 member_group_id String 后端服务器组编号 状态码: 400 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 members 否 Array of MemberInfo objects 后端实例列表 member_group_name 否 String 需要修改的后端服务器组 不传时使用members中的定义对VPC通道后端进行全量覆盖修改。 传入时,只对members中对应后端服务器组的后端实例进行处理,其他后端服务器组的入参会被忽略。例如:member_group_name=primary时,只处理members中后端服务器组为primary的后端实例。 表4 MemberInfo 参数 是否必选 参数类型 描述 host 否 String 后端服务器地址 后端实例类型为ip时必填 最大长度:64 weight 否 Integer 权重值。 允许您对后端服务进行评级,权重值越大,转发到该云服务的请求数量越多。 最小值:0 最大值:10000 is_backup 否 Boolean 是否备用节点。 开启后对应后端服务为备用节点,仅当非备用节点全部故障时工作。 实例需要升级到对应版本才支持此功能,若不支持请联系技术支持。 缺省值:false member_group_name 否 String 后端服务器组名称。为后端服务地址选择服务器组,便于统一修改对应服务器组的后端地址。 status 否 Integer 后端服务器状态 1:可用 2:不可用 port 否 Integer 后端服务器端口 最小值:0 最大值:65535 ecs_id 否 String 后端云服务器的编号。 后端实例类型为ecs时必填,支持英文,数字,“-”,“_”,1 ~ 64字符。 最大长度:255 ecs_name 否 String [后端云服务器的名称。] 后端实例类型为ecs时必填,支持汉字,英文,数字,“-”,“_”,“.”,1 ~ 64字符。 最大长度:64
  • 响应示例 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-producttemplate.delete]. Parameter is [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" : "624c8be1-39b6-47b7-941d-c159aced368a-1619602544650-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" }
  • 响应参数 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 404 表4 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 500 表5 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64
  • 响应消息 响应参数 表2 响应参数 名称 类型 描述 app_key string app ID。 app_secret string app secret。 connect_address string 实例连接IP地址,VPC内地址。 instance_id string 实例ID。 project_id string 项目ID。 public_ip string 实例绑定的弹性IP地址。 status string 实例的状态。 响应示例 { "app_key": "******", "app_secret": "******", "connect_address": "192.168.0.246", "instance_id": "fb3b24ab-5d87-473d-9c57-fc6******6a1", "project_id": "80e2b******f4a398d6409a50932d917", "public_ip": null, "status": "RUNNING" }
  • 响应示例 状态码: 200 OK { "member_group_name" : "vpc_member_group", "member_group_id" : "105c6902457144a4820dff8b1ad63331", "dict_code" : "", "member_group_remark" : "", "create_time" : "2020-07-23T07:24:33Z", "update_time" : "2020-07-23T07:24:33Z" } 状态码: 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.3023", "error_msg" : "The VPC channel does not exist,id:56a7d7358e1b42459c9d730d65b14e59" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 member_group_name String VPC通道后端服务器组名称 member_group_remark String VPC通道后端服务器组描述 member_group_weight Integer VPC通道后端服务器组权重值。 当前服务器组存在服务器且此权重值存在时,自动使用此权重值分配权重。 最小值:0 最大值:100 dict_code String VPC通道后端服务器组的字典编码 支持英文,数字,特殊字符(-_.) 暂不支持 最小长度:3 最大长度:64 microservice_version String VPC通道后端服务器组的版本,仅VPC通道类型为微服务时支持。 最大长度:64 microservice_port Integer VPC通道后端服务器组的端口号,仅VPC通道类型为微服务时支持。端口号为0时后端服务器组下的所有地址沿用原来负载端口继承逻辑。 最小值:0 最大值:65535 microservice_labels Array of MicroserviceLabel objects VPC通道后端服务器组的标签,仅VPC通道类型为微服务时支持。 member_group_id String VPC通道后端服务器组编号 create_time String VPC通道后端服务器组创建时间 update_time String VPC通道后端服务器组更新时间 表4 MicroserviceLabel 参数 参数类型 描述 label_name String 标签名称。 以字母或者数字开头和结尾,由字母、数字、连接符('-')、下划线('_')、点号('.')组成且63个字符之内。 最小长度:1 最大长度:63 label_value String 标签值。 以字母或者数字开头和结尾,由字母、数字、连接符('-')、下划线('_')、点号('.')组成且63个字符之内。 最小长度:1 最大长度:63 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 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 错误描述
  • 请求示例 创建一个跨域资源共享插件,可见范围为全局可见 { "plugin_name" : "跨域插件", "plugin_type" : "cors", "plugin_scope" : "global", "plugin_content" : "{\\\"allow_origin\\\":\\\"*\\\",\\\"allow_methods\\\":\\\"GET,POST,PUT,DELETE,HEAD,PATCH\\\",\\\"allow_headers\\\":\\\"Content-Type,Accept,Accept-Ranges,Cache-Control\\\",\\\"expose_headers\\\":\\\"X-Request-Id,X-Apig-Latency\\\",\\\"max_age\\\":600,\\\"allow_credentials\\\":false}", "remark" : "CORS跨域资源访问" } 创建一个HTTP响应头插件,可见范围为全局可见 { "plugin_name" : "HTTP响应头插件", "plugin_type" : "set_resp_headers", "plugin_scope" : "global", "plugin_content" : "{\\\"response_headers\\\":[{\\\"name\\\":\\\"x-demo\\\",\\\"value\\\":\\\"sss\\\",\\\"action\\\":\\\"append\\\"}]}", "remark" : "HTTP响应头管理" } 创建一个流控插件,可见范围为全局可见 { "plugin_name" : "流控插件", "plugin_type" : "rate_limit", "plugin_scope" : "global", "plugin_content" : "{\\\"scope\\\":\\\"basic\\\",\\\"default_time_unit\\\":\\\"minute\\\",\\\"default_interval\\\":1,\\\"api_limit\\\":50,\\\"app_limit\\\":0,\\\"user_limit\\\":0,\\\"ip_limit\\\":0,\\\"algorithm\\\":\\\"counter\\\",\\\"specials\\\":[],\\\"parameters\\\":[],\\\"rules\\\":[]}", "remark" : "流量控制" } 创建一个Kafka日志推送插件,可见范围为集成应用可见 { "plugin_name" : "KAFKA日志插件", "plugin_type" : "kafka_log", "plugin_scope" : "app", "plugin_content" : "{\\\"broker_list\\\":[\\\"0.0.0.0:11\\\"],\\\"topic\\\":\\\"topic\\\",\\\"key\\\":\\\"\\\",\\\"max_retry_count\\\":0,\\\"retry_backoff\\\":1,\\\"sasl_config\\\":{\\\"security_protocol\\\":\\\"PLAINTEXT\\\",\\\"sasl_mechanisms\\\":\\\"PLAIN\\\",\\\"sasl_username\\\":\\\"\\\",\\\"sasl_password\\\":\\\"\\\",\\\"ssl_ca_content\\\":\\\"\\\"},\\\"meta_config\\\":{\\\"system\\\":{\\\"start_time\\\":true,\\\"request_id\\\":true,\\\"client_ip\\\":true,\\\"api_id\\\":false,\\\"user_name\\\":false,\\\"app_id\\\":false,\\\"access_model1\\\":false,\\\"request_time\\\":true,\\\"http_status\\\":true,\\\"server_protocol\\\":false,\\\"scheme\\\":true,\\\"request_method\\\":true,\\\"host\\\":false,\\\"api_uri_mode\\\":false,\\\"uri\\\":false,\\\"request_size\\\":false,\\\"response_size\\\":false,\\\"upstream_uri\\\":false,\\\"upstream_addr\\\":true,\\\"upstream_status\\\":true,\\\"upstream_connect_time\\\":false,\\\"upstream_header_time\\\":false,\\\"upstream_response_time\\\":true,\\\"all_upstream_response_time\\\":false,\\\"region_id\\\":false,\\\"auth_type\\\":false,\\\"http_x_forwarded_for\\\":true,\\\"http_user_agent\\\":true,\\\"error_type\\\":true,\\\"access_model2\\\":false,\\\"inner_time\\\":false,\\\"proxy_protocol_vni\\\":false,\\\"proxy_protocol_vpce_id\\\":false,\\\"proxy_protocol_addr\\\":false,\\\"body_bytes_sent\\\":false,\\\"api_name\\\":false,\\\"app_name\\\":false,\\\"provider_app_id\\\":false,\\\"provider_app_name\\\":false,\\\"custom_data_log01\\\":false,\\\"custom_data_log02\\\":false,\\\"custom_data_log03\\\":false,\\\"custom_data_log04\\\":false,\\\"custom_data_log05\\\":false,\\\"custom_data_log06\\\":false,\\\"custom_data_log07\\\":false,\\\"custom_data_log08\\\":false,\\\"custom_data_log09\\\":false,\\\"custom_data_log10\\\":false,\\\"response_source\\\":false},\\\"call_data\\\":{\\\"log_request_header\\\":false,\\\"request_header_filter\\\":\\\"\\\",\\\"log_request_query_string\\\":false,\\\"request_query_string_filter\\\":\\\"\\\",\\\"log_request_body\\\":false,\\\"log_response_header\\\":false,\\\"response_header_filter\\\":\\\"\\\",\\\"log_response_body\\\":false,\\\"custom_authorizer\\\":{\\\"frontend\\\":[],\\\"backend\\\":[]}}}}", "remark" : "KAFKA日志推送", "roma_app_id" : "df003efc-1ce7-41ef-a45a-b89dc431cb2d" } 创建一个断路器插件,可见范围为集成应用可见 { "plugin_name" : "断路器插件", "plugin_type" : "breaker", "plugin_scope" : "app", "plugin_content" : "{\\\"breaker_condition\\\":{\\\"breaker_type\\\":\\\"timeout\\\",\\\"breaker_mode\\\":\\\"counter\\\",\\\"unhealthy_condition\\\":\\\"\\\",\\\"unhealthy_threshold\\\":30,\\\"min_call_threshold\\\":20,\\\"unhealthy_percentage\\\":51,\\\"time_window\\\":15,\\\"open_breaker_time\\\":15},\\\"downgrade_default\\\":null,\\\"downgrade_parameters\\\":null,\\\"downgrade_rules\\\":null,\\\"scope\\\":\\\"basic\\\"}", "remark" : "断路器", "roma_app_id" : "df003efc-1ce7-41ef-a45a-b89dc431cb2d" } 创建一个第三方认证插件,可见范围为全局可见 { "plugin_name" : "第三方认证插件", "remark" : "这是一个包含规则表达式白名单的第三方认证插件", "plugin_type" : "third_auth", "plugin_scope" : "global", "plugin_content" : "{\\\"auth_request\\\":{\\\"method\\\":\\\"POST\\\",\\\"protocol\\\":\\\"HTTP\\\",\\\"url_domain\\\":\\\"100.85.217.114:1234\\\",\\\"timeout\\\":10,\\\"path\\\":\\\"/check\\\",\\\"vpc_channel_enabled\\\":false,\\\"vpc_channel_info\\\":{\\\"vpc_proxy_host\\\":\\\"abc.com\\\",\\\"vpc_id\\\":\\\"3c113f40a54a40369ceb1eb1409a32ee\\\"}},\\\"identities\\\":{\\\"headers\\\":[{\\\"name\\\":\\\"token\\\"}],\\\"query\\\":[{\\\"name\\\":\\\"user\\\"}]},\\\"carry_body\\\":{\\\"enabled\\\":true,\\\"max_body_size\\\":10000},\\\"carry_path_enabled\\\":false,\\\"return_resp_body_enabled\\\":true,\\\"carry_resp_headers\\\":[\\\"x-message-result\\\"],\\\"simple_auth_mode_enabled\\\":false,\\\"match_auth\\\":{\\\"key\\\":\\\"x-message-result\\\",\\\"value\\\":\\\"success\\\"},\\\"rule_enabled\\\":true,\\\"rule_type\\\":\\\"allow\\\",\\\"parameters\\\":[{\\\"value\\\":\\\"reqPath\\\",\\\"type\\\":\\\"path\\\",\\\"name\\\":\\\"reqPath\\\"},{\\\"value\\\":\\\"method\\\",\\\"type\\\":\\\"method\\\",\\\"name\\\":\\\"method\\\"},{\\\"value\\\":\\\"Host\\\",\\\"type\\\":\\\"header\\\",\\\"name\\\":\\\"Host\\\"}],\\\"rules\\\":[{\\\"match_regex\\\": \\\"[\\\\\\\"OR\\\\\\\", [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/xxl-job-admin/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/leave/infor/v1/addLeaveLnfor\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/v1/charge/home/modifyChargeSync\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/mweb/campaign/api/v1/getActivityConfig\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/mp/vehicle/owner/home\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/mweb/campaign/api/v1/getTime\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/c-showroom-service/v1/vehicleDetails/upload\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/operation-charging-bff/carOwnerRights/certificate/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/api/2c/v1/sales-bff/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/2c/v1/vehicleDetails/upload\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/operation-admin/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/settings/api/v1/receiveClk\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/vehicle/relative/yTSendVehicleControl.json\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/appoint/getAppointmentByTestDrive\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdPay\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdOrder\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/getUserToken\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdCoupon\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/task/busTriggerTaskEvent.json\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/datacenter-log-center/api/trackApi/commonAdd.json\\\\\\\"]]\\\", \\\"rule_name\\\": \\\"allow2\\\"}],\\\"custom_forbid_limit\\\":100,\\\"auth_downgrade_enabled\\\":false}" }
  • 响应参数 状态码: 201 表4 响应Body参数 参数 参数类型 描述 plugin_id String 插件编码。 plugin_name String 插件名称。支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3-255字符。 说明: 中文字符必须为UTF-8或者unicode编码。 plugin_type String 插件类型 cors:跨域资源共享 set_resp_headers:HTTP响应头管理 kafka_log:Kafka日志推送 breaker:断路器 rate_limit: 流量控制 third_auth: 第三方认证 plugin_scope String 插件可见范围 global:全局可见 app:集成应用可见 plugin_content String 插件定义内容,支持json。参考提供的具体模型定义 CorsPluginContent:跨域资源共享 定义内容 SetRespHeadersContent:HTTP响应头管理 定义内容 KafkaLogContent:Kafka日志推送 定义内容 BreakerContent:断路器 定义内容 RateLimitContent 流量控制 定义内容 ThirdAuthContent: 第三方认证 定义内容 最大长度:65535 remark String 插件描述,255字符。 说明: 中文字符必须为UTF-8或者unicode编码。 最大长度:255 create_time String 创建时间。 update_time String 更新时间。 roma_app_id String 归属集成应用编码,plugin_scope为app时生效 roma_app_name String API归属的集成应用名称 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 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 OK 示例 1 { "plugin_id" : "5b729aa252764739b3s237ef0d66dc63", "plugin_name" : "跨域插件", "plugin_type" : "cors", "plugin_scope" : "global", "plugin_content" : "{\\\"allow_origin\\\":\\\"*\\\",\\\"allow_methods\\\":\\\"GET,POST,PUT,DELETE,HEAD,PATCH\\\",\\\"allow_headers\\\":\\\"Content-Type,Accept,Accept-Ranges,Cache-Control\\\",\\\"expose_headers\\\":\\\"X-Request-Id,X-Apig-Latency\\\",\\\"max_age\\\":600,\\\"allow_credentials\\\":false}", "remark" : "CORS跨域资源访问", "create_time" : "2022-11-02T12:31:23.353Z", "update_time" : "2022-11-02T12:31:23.353Z" } 示例 2 { "plugin_id" : "8a688dce7d0c45cf84edac3d7b071769", "plugin_name" : "HTTP响应头插件", "plugin_type" : "set_resp_headers", "plugin_scope" : "global", "plugin_content" : "{\\\"response_headers\\\":[{\\\"name\\\":\\\"x-demo\\\",\\\"value\\\":\\\"sss\\\",\\\"action\\\":\\\"append\\\"}]}", "remark" : "HTTP响应头管理", "create_time" : "2022-11-02T12:31:23.353Z", "update_time" : "2022-11-02T12:31:23.353Z" } 示例 3 { "plugin_id" : "9642ff2b9a86481689ca9d28babcfd7f", "plugin_name" : "流控插件", "plugin_type" : "rate_limit", "plugin_scope" : "global", "plugin_content" : "{\\\"scope\\\":\\\"basic\\\",\\\"default_time_unit\\\":\\\"minute\\\",\\\"default_interval\\\":1,\\\"api_limit\\\":50,\\\"app_limit\\\":0,\\\"user_limit\\\":0,\\\"ip_limit\\\":0,\\\"algorithm\\\":\\\"counter\\\",\\\"specials\\\":[],\\\"parameters\\\":[],\\\"rules\\\":[]}", "remark" : "流量控制", "create_time" : "2022-11-02T12:31:23.353Z", "update_time" : "2022-11-02T12:31:23.353Z" } 示例 4 { "plugin_id" : "92284ece6ec7466da2c2ac2416f46d5d", "plugin_name" : "KAFKA日志插件", "plugin_type" : "kafka_log", "plugin_scope" : "app", "plugin_content" : "{\\\"broker_list\\\":[\\\"0.0.0.0:11\\\"],\\\"topic\\\":\\\"topic\\\",\\\"key\\\":\\\"\\\",\\\"max_retry_count\\\":0,\\\"retry_backoff\\\":1,\\\"sasl_config\\\":{\\\"security_protocol\\\":\\\"PLAINTEXT\\\",\\\"sasl_mechanisms\\\":\\\"PLAIN\\\",\\\"sasl_username\\\":\\\"\\\",\\\"sasl_password\\\":\\\"\\\",\\\"ssl_ca_content\\\":\\\"\\\"},\\\"meta_config\\\":{\\\"system\\\":{\\\"start_time\\\":true,\\\"request_id\\\":true,\\\"client_ip\\\":true,\\\"api_id\\\":false,\\\"user_name\\\":false,\\\"app_id\\\":false,\\\"access_model1\\\":false,\\\"request_time\\\":true,\\\"http_status\\\":true,\\\"server_protocol\\\":false,\\\"scheme\\\":true,\\\"request_method\\\":true,\\\"host\\\":false,\\\"api_uri_mode\\\":false,\\\"uri\\\":false,\\\"request_size\\\":false,\\\"response_size\\\":false,\\\"upstream_uri\\\":false,\\\"upstream_addr\\\":true,\\\"upstream_status\\\":true,\\\"upstream_connect_time\\\":false,\\\"upstream_header_time\\\":false,\\\"upstream_response_time\\\":true,\\\"all_upstream_response_time\\\":false,\\\"region_id\\\":false,\\\"auth_type\\\":false,\\\"http_x_forwarded_for\\\":true,\\\"http_user_agent\\\":true,\\\"error_type\\\":true,\\\"access_model2\\\":false,\\\"inner_time\\\":false,\\\"proxy_protocol_vni\\\":false,\\\"proxy_protocol_vpce_id\\\":false,\\\"proxy_protocol_addr\\\":false,\\\"body_bytes_sent\\\":false,\\\"api_name\\\":false,\\\"app_name\\\":false,\\\"provider_app_id\\\":false,\\\"provider_app_name\\\":false,\\\"custom_data_log01\\\":false,\\\"custom_data_log02\\\":false,\\\"custom_data_log03\\\":false,\\\"custom_data_log04\\\":false,\\\"custom_data_log05\\\":false,\\\"custom_data_log06\\\":false,\\\"custom_data_log07\\\":false,\\\"custom_data_log08\\\":false,\\\"custom_data_log09\\\":false,\\\"custom_data_log10\\\":false,\\\"response_source\\\":false},\\\"call_data\\\":{\\\"log_request_header\\\":false,\\\"request_header_filter\\\":\\\"\\\",\\\"log_request_query_string\\\":false,\\\"request_query_string_filter\\\":\\\"\\\",\\\"log_request_body\\\":false,\\\"log_response_header\\\":false,\\\"response_header_filter\\\":\\\"\\\",\\\"log_response_body\\\":false,\\\"custom_authorizer\\\":{\\\"frontend\\\":[],\\\"backend\\\":[]}}}}", "remark" : "KAFKA日志推送", "roma_app_id" : "df003efc-1ce7-41ef-a45a-b89dc431cb2d", "create_time" : "2022-11-02T12:31:23.353Z", "update_time" : "2022-11-02T12:31:23.353Z" } 示例 5 { "plugin_id" : "8b5253ed723c4a878e7b8532c08763b4", "plugin_name" : "断路器插件", "plugin_type" : "breaker", "plugin_scope" : "app", "plugin_content" : "{\\\"breaker_condition\\\":{\\\"breaker_type\\\":\\\"timeout\\\",\\\"breaker_mode\\\":\\\"counter\\\",\\\"unhealthy_condition\\\":\\\"\\\",\\\"unhealthy_threshold\\\":30,\\\"min_call_threshold\\\":20,\\\"unhealthy_percentage\\\":51,\\\"time_window\\\":15,\\\"open_breaker_time\\\":15},\\\"downgrade_default\\\":null,\\\"downgrade_parameters\\\":null,\\\"downgrade_rules\\\":null,\\\"scope\\\":\\\"basic\\\"}", "remark" : "断路器", "roma_app_id" : "df003efc-1ce7-41ef-a45a-b89dc431cb2d", "create_time" : "2022-11-02T12:31:23.353Z", "update_time" : "2022-11-02T12:31:23.353Z" } 示例 6 { "plugin_id" : "235d97683439437585aff06020059720", "plugin_name" : "第三方认证插件", "plugin_type" : "third_auth", "plugin_scope" : "global", "plugin_content" : "{\\\"auth_request\\\":{\\\"method\\\":\\\"POST\\\",\\\"protocol\\\":\\\"HTTP\\\",\\\"url_domain\\\":\\\"100.85.217.114:1234\\\",\\\"path\\\":\\\"/check\\\",\\\"timeout\\\":10,\\\"vpc_channel_enabled\\\":2,\\\"vpc_channel_info\\\":null},\\\"identities\\\":{\\\"headers\\\":[{\\\"name\\\":\\\"token\\\",\\\"essential\\\":false}],\\\"queries\\\":null},\\\"carry_body\\\":{\\\"enabled\\\":true,\\\"max_body_size\\\":10000},\\\"carry_path_enabled\\\":false,\\\"return_resp_body_enabled\\\":true,\\\"carry_resp_headers\\\":[\\\"x-message-result\\\"],\\\"simple_auth_mode_enabled\\\":false,\\\"match_auth\\\":{\\\"key\\\":\\\"x-message-result\\\",\\\"value\\\":\\\"success\\\"},\\\"parameters\\\":[{\\\"type\\\":\\\"path\\\",\\\"name\\\":\\\"reqPath\\\",\\\"value\\\":\\\"reqPath\\\"},{\\\"type\\\":\\\"method\\\",\\\"name\\\":\\\"method\\\",\\\"value\\\":\\\"method\\\"},{\\\"type\\\":\\\"header\\\",\\\"name\\\":\\\"Host\\\",\\\"value\\\":\\\"Host\\\"}],\\\"rules\\\":[{\\\"rule_name\\\":\\\"allow2\\\",\\\"match_regex\\\":\\\"[\\\\\\\"OR\\\\\\\", [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/xxl-job-admin/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/leave/infor/v1/addLeaveLnfor\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/v1/charge/home/modifyChargeSync\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/mweb/campaign/api/v1/getActivityConfig\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/mp/vehicle/owner/home\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/mweb/campaign/api/v1/getTime\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/c-showroom-service/v1/vehicleDetails/upload\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/operation-charging-bff/carOwnerRights/certificate/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/api/2c/v1/sales-bff/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/2c/v1/vehicleDetails/upload\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"~~\\\\\\\", \\\\\\\"/operation-admin/*\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/app/settings/api/v1/receiveClk\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/vehicle/relative/yTSendVehicleControl.json\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/appoint/getAppointmentByTestDrive\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdPay\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdOrder\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/getUserToken\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/evd/callBackEvdCoupon\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/api/task/busTriggerTaskEvent.json\\\\\\\"], [\\\\\\\"reqPath\\\\\\\", \\\\\\\"==\\\\\\\", \\\\\\\"/datacenter-log-center/api/trackApi/commonAdd.json\\\\\\\"]]\\\"}],\\\"rule_type\\\":\\\"allow\\\",\\\"rule_enabled\\\":true,\\\"custom_forbid_limit\\\":100,\\\"auth_downgrade_enabled\\\":false}", "remark" : "这是一个包含规则表达式白名单的第三方认证插件", "create_time" : "2023-05-06T06:54:59.296181801Z", "update_time" : "2023-05-06T06:54:59.296182035Z" } 状态码: 400 Bad Request { "error_code" : "APIG.3326", "error_msg" : "The plugin name already exists" } 状态码: 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.3030", "error_msg" : "The instance does not exist;id:f0fa1789-3b76-433b-a787-9892951c620ec" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 plugin_name 是 String 插件名称。支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3-255字符。 说明: 中文字符必须为UTF-8或者unicode编码。 plugin_type 是 String 插件类型 cors:跨域资源共享 set_resp_headers:HTTP响应头管理 kafka_log:Kafka日志推送 breaker:断路器 rate_limit: 流量控制 third_auth: 第三方认证 plugin_scope 是 String 插件可见范围 global:全局可见 app:集成应用可见 plugin_content 是 String 插件定义内容,支持json。参考提供的具体模型定义 CorsPluginContent:跨域资源共享 定义内容 SetRespHeadersContent:HTTP响应头管理 定义内容 KafkaLogContent:Kafka日志推送 定义内容 BreakerContent:断路器 定义内容 RateLimitContent 流量控制 定义内容 ThirdAuthContent: 第三方认证 定义内容 最大长度:65535 roma_app_id 否 String 归属集成应用编码,plugin_scope为app时生效 remark 否 String 插件描述,255字符。 说明: 中文字符必须为UTF-8或者unicode编码。 最大长度:255
  • 请求消息 请求参数 表2 Body参数 参数 类型 是否必填 说明 product_name string 是 系统中已经创建好的产品的产品名。 device_name string 是 系统中已经创建好的设备的设备名。 topics Array of topics objects 是 自定义topic列表 表3 topics 参数 类型 是否必填 说明 topic_name string 是 自定义topic的名称,支持英文大小写,数字,下划线和中划线,不超过64个字符。 topic_perm string 是 自定义topic的权限,只支持pub或sub两种权限。 remark string 否 描述信息,不能超过200个字符。 请求示例 https://example.cloud.com/v1/80e2b******f4a398d6409a50932d917/link/instances/fb3b24ab-5d87-473d-9c57-fc6******6a1/topics { "product_name" : "product01", "device_name" : "device01", "topics" : [{"topic_name" : "alarm", "topic_perm" : "sub", "remark" : "alarm topic"}] }
  • 响应消息 响应参数 表4 响应参数 名称 类型 描述 remark string 描述信息,不能超过200个字符。 topic_id integer Topic的ID。 -1:系统topic。 大于0:自定义topic。 topic_name string Topic名。 topic_perm string Topic的权限,只支持pub或sub两种权限。 响应示例 { "remark": "alarm topic ", "topic_id": null, "topic_name": "alarm", "topic_perm": "pub" }
  • 响应示例 状态码: 201 Created { "content_type" : "json", "created_time" : "2020-09-18T09:25:59Z", "description" : "", "id" : "bd42841c20184da6bbf457c6d8a06e37", "instance" : "f0fa1789-3b76-433b-a787-9892951c620e", "method" : "GET", "modified_time" : "2020-09-18T09:25:59Z", "name" : "livedata_api_demo", "parameters" : [ ], "path" : "/test/function", "return_format" : false, "roma_app_id" : "98df09fb-d459-4cbf-83a7-2b55ca6f3d5d", "scripts" : [ ], "status" : 1, "type" : "", "version" : "1.0.1" } 状态码: 400 Bad Request { "error_code" : "APIG.2011", "error_msg" : "Invalid parameter value,parameterName:name. 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.3030", "error_msg" : "The instance does not exist;id:f0fa1789-3b76-433b-a787-9892951c620ec" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 请求示例 创建一个自定义后端,请求方法为GET,返回类型为JSON { "content_type" : "json", "method" : "GET", "name" : "livedata_api_demo", "path" : "/test/function", "return_format" : false, "roma_app_id" : "98df09fb-d459-4cbf-83a7-2b55ca6f3d5d", "version" : "1.0.1" }
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "throttle_specials" : [ { "call_limits" : 200, "app_name" : "app_demo", "object_name" : "app_demo", "object_id" : "356de8eb7a8742168586e5daf5339965", "throttle_id" : "3437448ad06f4e0c91a224183116e965", "apply_time" : "2020-08-04T02:40:56Z", "id" : "a3e9ff8db55544ed9db91d8b048770c0", "app_id" : "356de8eb7a8742168586e5daf5339965", "object_type" : "APP" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:app_name. 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.3005", "error_msg" : "Request throttling policy 3437448ad06f4e0c91a224183116e965 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 throttle_specials Array of ThrottleSpecialInfo objects 本次查询返回的特殊配置列表 表5 ThrottleSpecialInfo 参数 参数类型 描述 id String 特殊配置的编号 call_limits Integer 特殊对象在流控时间内能够访问API的最大次数限制 apply_time String 设置时间 app_name String 作用的APP名称 app_id String 作用的APP编号 object_id String 特殊对象的身份标识 object_type String 特殊对象类型:APP、USER object_name String 作用的APP或租户的名称 throttle_id 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 错误描述
  • 请求示例 创建一个SSL证书,可见范围为实例内可见 { "name" : "cert_demo", "private_key" : "'-----BEGIN PRIVATE KEY-----THIS IS YOUR PRIVATE KEY-----END PRIVATE KEY-----'", "cert_content" : "'-----BEGIN CERTIFICATE-----THIS IS YOUR CERT CONTENT-----END CERTIFICATE-----'", "type" : "instance", "instance_id" : "f0fa1789-3b76-433b-a787-9892951c620e" }
共100000条