华为云用户手册

  • 响应示例 状态码: 201 OK { "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" } { "plugin_id" : "8a688dce7d0c45cf84edac3d7b071769", "plugin_name" : "HTTP响应头插件", "plugin_type" : "set_resp_headers", "plugin_scope" : "global", "plugin_content" : "{\\\"response_headers\\\":[{\\\"name\\\":\\\"x-demo\\\",\\\"value_type\\\":\\\"custom_value\\\",\\\"value\\\":\\\"sss\\\",\\\"action\\\":\\\"append\\\"}]}", "remark" : "HTTP响应头管理", "create_time" : "2022-11-02T12:31:23.353Z", "update_time" : "2022-11-02T12:31:23.353Z" } { "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" } { "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" } { "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" } { "plugin_id" : "235d97683439437585aff06020059720", "plugin_name" : "第三方认证插件", "plugin_type" : "third_auth", "plugin_scope" : "global", "plugin_content" : "{\\\"auth_request\\\":{\\\"method\\\":\\\"POST\\\",\\\"protocol\\\":\\\"HTTP\\\",\\\"url_domain\\\":\\\"xxx.xxx.xxx.xxx: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" } { "plugin_id" : "d5bf25cf31e04e888907b8ad72563f45", "plugin_name" : "响应缓存插件", "plugin_type" : "proxy_cache", "plugin_scope" : "global", "plugin_content" : "{\\\"cache_key\\\": {\\\"system_params\\\": [\\\"$context.sourceIp\\\",\\\"$context.requestId\\\"],\\\"parameters\\\": [\\\"demo_parameter\\\"],\\\"headers\\\": [\\\"demo_header\\\"]},\\\"cache_http_status_and_ttl\\\": [{\\\"http_status\\\": [200],\\\"ttl\\\": 300},{\\\"http_status\\\": [300],\\\"ttl\\\": 200}],\\\"client_cache_control\\\": {\\\"mode\\\": \\\"apps\\\",\\\"datas\\\": [\\\"demo_app_id_1,demo_app_id_2\\\"]},\\\"cacheable_headers\\\": [\\\"demo_cacheable_headers_1,demo_cacheable_headers_2\\\"]}", "remark" : "这是响应缓存插件", "create_time" : "2024-03-18T12:31:23.353Z", "update_time" : "2024-03-18T12:31:23.353Z" } { "plugin_id" : "d5bf25cf31e04e888907b8ad72563f45", "plugin_name" : "请求镜像插件", "plugin_type" : "proxy_mirror", "plugin_scope" : "global", "plugin_content" : "{\\\"protocol\\\": \\\"http\\\",\\\"host\\\": \\\"xxx.xxx.xxx.xxx:1234\\\",\\\"path\\\": \\\"/test\\\",\\\"path_concat_mode\\\": \\\"replace\\\",\\\"sample_ratio\\\": 1,\\\"timeout\\\": 5000,\\\"mirror_request_body_enabled\\\": true}", "remark" : "这是请求镜像插件", "create_time" : "2024-03-18T12:31:23.353Z", "update_time" : "2024-03-18T12:31:23.353Z" } 状态码: 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: 第三方认证 proxy_cache: 响应缓存 proxy_mirror: 请求镜像 plugin_scope 是 String 插件可见范围 global:全局可见 app:集成应用可见 plugin_content 是 String 插件定义内容,支持json。参考提供的具体模型定义 CorsPluginContent:跨域资源共享 定义内容 SetRespHeadersContent:HTTP响应头管理 定义内容 KafkaLogContent:Kafka日志推送 定义内容 BreakerContent:断路器 定义内容 RateLimitContent 流量控制 定义内容 ThirdAuthContent: 第三方认证 定义内容 ProxyCacheContent: 响应缓存 定义内容 ProxyMirrorContent: 请求镜像 定义内容 roma_app_id 否 String 归属集成应用编码,plugin_scope为app时生效 remark 否 String 插件描述,255字符。 说明: 中文字符必须为UTF-8或者unicode编码。
  • 响应示例 状态码: 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 表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 作用的凭据或租户的名称 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 错误描述
  • 响应示例 状态码: 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" }
  • 请求示例 创建一个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" }
  • 响应示例 状态码: 200 OK { "id" : "a27be832f2e9441c8127fe48e3b5ac67", "name" : "cert_demo", "common_name" : "apigtest.xxx.com", "san" : [ "apigtest.xxx.com", "*.san.com" ], "version" : 3, "organization" : [ "company" ], "organizational_unit" : [ "IT" ], "locality" : [ "city" ], "state" : [ "state" ], "country" : [ "Country" ], "not_before" : "2019-06-01T00:00:00Z", "not_after" : "2031-08-16T06:36:13Z", "serial_number" : "13010", "issuer" : [ "SSL Inc" ], "signature_algorithm" : "SHA256-RSA", "create_time" : "2021-08-20T02:03:53Z", "update_time" : "2021-08-20T02:03:53Z", "algorithm_type" : "RSA" } 状态码: 400 Bad Request { "error_code" : "APIG.3325", "error_msg" : "The API quota 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" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 id String 证书ID name String 证书名称 type String 证书类型 global:全局证书 instance:实例证书 instance_id String 实例编码 type为global时,缺省为common type为instance时,为实例编码 project_id String 租户项目编号 common_name String 域名 san Array of strings san扩展域名 not_after String 有效期到 signature_algorithm String 签名算法 create_time String 创建时间 update_time String 更新时间 algorithm_type String 证书算法类型: RSA ECC SM2 is_has_trusted_root_ca Boolean 是否存在信任的根证书CA。当绑定证书存在trusted_root_ca时为true。 version Integer 版本 organization Array of strings 公司、组织 organizational_unit Array of strings 部门 locality Array of strings 城市 state Array of strings 省份 country Array of strings 国家 not_before String 有效期从 serial_number String 序列号 issuer Array of strings 颁发者 状态码: 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 错误描述
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 证书名称。支持中文,英文字母,数字,下划线,且只能以英文或汉字开头,4~50个字符。 说明: 中文字符必须为UTF-8或者unicode编码。 cert_content 是 String 证书内容 private_key 是 String 证书私钥 type 否 String 证书可见范围: instance global 编辑证书时不支持修改为其他可见范围 instance_id 否 String 所属实例ID,当type=instance时必填 trusted_root_ca 否 String 信任的根证书CA algorithm_type 否 String 证书算法类型: RSA ECC SM2 cert_content_sign 否 String 签名类型证书内容,仅algorithm_type=SM2时必填 private_key_sign 否 String 签名类型私钥内容,仅algorithm_type=SM2时必填
  • 响应示例 状态码: 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.3009", "error_msg" : "The app authorization record does not exist,id:dd29b33ae4394e3b924b582c6b40880b" } 状态码: 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 错误描述
  • 响应示例 状态码: 201 Created { "app_code" : "GjOD3g80AABuuFeEJpVQADBlAjBh3UzC7W+gr4VJBB5BtJ4fdVOQoSvoji3gFxUDb5pWBz9wUcw9+8/bFZ1B/4pq29wCMQC0pQWX6zTndljDEl99As1pw+WntAU9xcq+ffagoH6zDpKUvdxV6Ezj8LcCcPZN6BU=", "app_id" : "9ed8b7fe84224de681e7d7a5587e76dc", "id" : "32dc8ca22d1b4b9cb94022186880576b", "create_time" : "2020-07-24T02:37:24.835128293Z" } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:app_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.3004", "error_msg" : "App 9ed8b7fe84224de681e7d7a5587e76dc does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 201 表4 响应Body参数 参数 参数类型 描述 app_code String App Code值 支持英文,+_!@#$%+/=,且只能以英文和+、/开头。 id String 编号 app_id String 应用编号 create_time 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 错误描述
  • 请求示例 创建一个指定值的APP Code { "app_code" : "GjOD3g80AABuuFeEJpVQADBlAjBh3UzC7W+gr4VJBB5BtJ4fdVOQoSvoji3gFxUDb5pWBz9wUcw9+8/bFZ1B/4pq29wCMQC0pQWX6zTndljDEl99As1pw+WntAU9xcq+ffagoH6zDpKUvdxV6Ezj8LcCcPZN6BU=" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 product_template_id Integer 服务归属的产品模板ID。 product_id Integer 服务归属的产品ID。 service_id Integer 服务ID。 service_name String 服务名称,支持中文、英文大小写、数字、下划线和中划线,长度2-64。 description String 服务描述,长度0-200。 status Integer 服务状态,0-启用,1-停用。 created_user CreatedUser object 创建时的用户。 last_updated_user LastUpdatedUser object 最后更新时的用户。 created_datetime Long 创建时间值,格式timestamp(ms),使用UTC时区。 last_updated_datetime Long 最后修改时间值,格式timestamp(ms),使用UTC时区。 表5 CreatedUser 参数 参数类型 描述 user_id String 用户ID(保留字段,未使用)。 user_name String 用户名。 表6 LastUpdatedUser 参数 参数类型 描述 user_id String 用户ID(保留字段,未使用)。 user_name String 用户名。 状态码: 400 表7 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 404 表8 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 500 表9 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。
  • 响应示例 状态码: 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.updateService]. 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" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 service_name 是 String 服务名称,支持中文、英文大小写、数字、下划线和中划线,长度2-64。 description 否 String 服务描述,长度0-200。 status 是 Integer 服务状态,0-启用,1-停用。
  • 响应示例 状态码:200 OK { "name" : "topic-test", "policies" : [ { "owner" : true, "user_name" : "c5abd910-02b1-4bc4-b587-c3fe4c49dab9", "access_policy" : "pub", "app_name" : "topic test", "tag" : "11 || 22 || aa || bb" } ], "total" : 1, "size" : 1, "operation" : "topic-test" } 状态码:400 Bad Request { "error_code" : 400, "error_msg" : "Bad Request" } 状态码:403 Forbidden { "error_code" : 403, "error_msg" : "Forbidden" }
  • 响应参数 状态码:200 表4 响应Body参数 参数 参数类型 描述 name String Topic名称。 policies Array of policies objects 策略列表。 total Integer 权限策略的总数。 size Integer 查询权限策略的数量。 operation String Topic名称。 表5 policies 参数 参数类型 描述 owner Boolean 是否为创建Topic时所选择的应用。 user_name String 应用Key。 access_policy String 权限类型。 all:发布+订阅 pub:发布 sub:订阅 app_name String 应用名称。 tag String 权限类型对应的标签。 状态码:400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息。 状态码:403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息。
  • 响应示例 状态码: 200 OK { "total" : 99999, "size" : 99999, "entities" : [ { "task_id" : "id123456789", "task_name" : "fdi_task_name", "task_type" : "TIMING", "status" : 0, "last_execute_time" : 1603243428000, "use_quartz_cron" : false, "cron" : "0 */15 * * * ?", "period" : "DAY", "dispatch_interval" : 1, "position" : "READER", "execute_status" : "RUNNING", "source_app_id" : "28f61af50fc9452aa0ed5ea25c3cc3d3", "source_app_name" : "source-app", "source_instance_id" : "source-instance", "target_app_id" : "28f61af50fc9452aa0ed5ea25c3cc3d3", "target_app_name" : "target-app", "target_instance_id" : "target-instance", "ext_type" : "CDC", "enterprise_project_id" : "string", "task_tag" : "string" } ] }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 total Integer 总数。 size Integer 当前页监控信息数量。 entities Array of TaskMonitorInfo objects 任务监控信息当前页元素。 表5 TaskMonitorInfo 参数 参数类型 描述 task_id String 任务ID。 task_name String 任务名称。 task_type String 任务类型: TIMING(定时任务) REALTIME(实时任务) status Integer 任务状态: 0(停止) 1(运行中) last_execute_time Integer 任务最近一次执行时间,格式timestamp(ms),使用UTC时区。 use_quartz_cron Boolean 任务是否使用Quartz表达式,只有定时任务才有该属性。 cron String CRON表达式,只有定时任务且use_quartz_cron为true时才有该属性。 period String 调度周期的单位,如天,小时等,只有定时任务且use_quartz_cron为false时才有该属性: MIN(分钟) HOUR(小时) DAY(天) WEEK(周) MON(月) dispatch_interval Integer 调度周期,和period字段一起可以确定每隔多长时间调度一次,只有定时任务且use_quartz_cron为false时才有该属性。 position String 标识最近一次任务执行到哪一个阶段: ADAPTER(任务处于初始化阶段) READER(任务正在执行Reader读操作) WRITER(任务正在执行Writer写操作) execute_status String 任务最近一次执行状态: UNSTARTED(未启动) WAITING(等待调度中) RUNNING(执行中) SUC CES S(执行成功) CANCELLED(任务取消) ERROR(执行异常) source_app_id String 任务源端数据源所属应用ID。 source_app_name String 任务源端数据源所属应用名称。 source_instance_id String 任务源端数据源所属实例ID。 target_app_id String 任务目标端数据源所属应用ID。 target_app_name String 任务目标端数据源所属应用名称。 target_instance_id String 任务目标端数据源所属实例ID。 ext_type String 任务扩展类型,当前如果是CDC组合任务,该字段为CDC,否则为null。 enterprise_project_id String 任务所属企业项目ID,默认为0。 task_tag String 任务标签。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误描述。
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "items" : [ { "property_id" : 3320, "property_name" : "p2", "description" : null, "data_type" : "datetime", "required" : 0, "min" : 0, "max" : 65536, "step" : 1, "max_length" : "10", "unit" : "yuan", "enum_list" : null } ] } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-services-responses.pageQueryCommandResponse]. Parameter is [command_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 表4 响应Body参数 参数 参数类型 描述 total Integer 总数。 size Integer 本次返回数量。 items Array of Property objects 属性列表。 表5 Property 参数 参数类型 描述 property_id Integer 属性ID。 property_name String 属性名称,首位必须为字母,支持大小写字母、数字、中划线及下划线,长度2-50。 description String 属性描述,长度0-200。 data_type String 属性数据类型,boolean枚举值大小写敏感;number格式为数字,范围±1.0 x 10^-28 to ±7.9228 x 10^28;string为字符串;integer为整数;datetime为时间,格式为yyyyMMddTHHmmss;json为自定义json格式; array为数组类型。 required Integer 是否必填,0-非必填,1-必填。 min String 最小值,当data_type为integer或number时有效。 max String 最大值,当data_type为integer或number时有效。 step String 步长,当data_type为integer或number时有效。 max_length Integer 字符串最大长度,当data_type为string、datetime、json时有效。 unit String 属性单位。 enum_list String string的枚举值数组,使用逗号分隔,单个长度取决于max_length参数。 enum_dict Object 当数据类型为boolean枚举值时填写json格式数据,形如"enum_dict":{"0":"xxx","1":"xxx"}。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。
  • 响应示例 状态码: 201 Created { "auths" : [ { "api_id" : "5f918d104dc84480a75166ba99efff21", "auth_result" : { "status" : "SUCCESS" }, "auth_time" : "2020-08-04T04:02:22.482227344Z", "id" : "dd29b33ae4394e3b924b582c6b40880b", "app_id" : "356de8eb7a8742168586e5daf5339965", "auth_role" : "PROVIDER", "auth_tunnel" : "NORMAL", "auth_whitelist" : [ ], "auth_blacklist" : [ ] } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2011", "error_msg" : "Invalid parameter value,parameterName:api_ids. 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" }
  • 响应参数 状态码: 201 表5 响应Body参数 参数 参数类型 描述 auths Array of ApiAuthRelations objects API与APP的授权关系列表 表6 ApiAuthRelations 参数 参数类型 描述 api_id String API编号 auth_result AuthResult object 授权结果 auth_time String 授权时间 id String 授权关系编号 app_id String APP编号 auth_role String 授权者 PROVIDER:API提供者授权 CONSUMER:API消费者授权 auth_tunnel String 授权通道类型: GREEN:绿色通道 NORMAL:非绿色通道 此字段不填默认为不使用绿色通道 auth_whitelist Array of strings 绿色通道授权白名单。 允许白名单中的IP不使用认证信息访问 auth_blacklist Array of strings 绿色通道授权黑名单 visit_params String 访问参数。 表7 AuthResult 参数 参数类型 描述 status String 授权结果 SUCCESS:授权成功 SKIPPED:跳过 FAILED:授权失败 error_msg String 授权失败错误信息 error_code String 授权失败错误码 api_name String 授权失败的API名称 app_name String 授权失败的APP名称 状态码: 400 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表11 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表12 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 env_id 是 String 需要授权的环境编号 app_ids 是 Array of strings APP的编号列表 api_ids 是 Array of strings API的编号列表。 auth_tunnel 否 String 授权通道类型: GREEN:绿色通道 NORMAL:非绿色通道 实例开启green_tunnel特性时可以开启绿色通道,此字段不填默认为不使用绿色通道 auth_whitelist 否 Array of strings 绿色通道授权白名单。 允许白名单中的IP不使用认证信息访问,auth_tunnel = GREEN时生效 auth_blacklist 否 Array of strings 绿色通道授权黑名单。 auth_tunnel = GREEN时生效 visit_params 否 Array of ApiAuthVisitParam objects 访问参数列表。 表4 ApiAuthVisitParam 参数 是否必选 参数类型 描述 api_id 是 String 需要授权的API编号 app_id 否 String 需要授权的APP编号 visit_param 是 String 访问参数 支持英文、数字、下划线和中划线,多个参数以英文格式下的逗号隔开,单个参数须以英文或数字结尾且不能重复,且单个参数长度不超过255个字符。
  • 响应示例 状态码: 400 Bad Request { "error_code" : "APIG.2001", "error_msg" : "The request parameters must be specified,parameterName:env_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.3001", "error_msg" : "API group c77f5e81d9cb4424bf704ef2b0ac7600 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表5 响应Body参数 参数 参数类型 描述 - File 状态码: 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 错误描述
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表4 请求Body参数 参数 是否必选 参数类型 描述 env_id 是 String API分组发布的环境ID group_id 是 String API分组ID define 否 String 导出API的定义范围: spec:基础定义,只包括api前端定义 proxy:全量定义,包括api前后端定义 all:扩展定义,包括api前后端定义以及流控、访问控制、自定义认证等扩展定义 dev:开发定义,包括未发布的api的前后端定义 type 否 String 导出的API定义的格式 version 否 String 导出的API定义版本,默认为当前时间 apis 否 Array of strings 导出的API ID列表
共100000条
提示

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