华为云用户手册

  • 响应示例 状态码: 200 OK { "succ_num" : 1, "fail_num" : 4, "fail_objects_ids" : [ ]} 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-product.importProduct]. Parameter is [X-Auth-Token]. Processor is [header].", "request_id" : "cb39e78a-afd3-4e04-901d-70468b1c23dc-1619602712496-cnnorth7a-P-romalink-service01"} 状态码: 404 Not Found { "error_code" : "SCB.00000000", "error_msg" : "Not Found", "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"}
  • 概述 ROMA Connect是一个全栈式的应用与 数据集成平台 ,提供消息、数据、API、设备等集成能力,简化企业上云,支持云上云下、跨区域集成,帮助企业实现数字化转型。 您可以使用本文档提供的API对ROMA Connect进行相关操作,如创建、删除、变更API、添加自定义后端等。支持的全部操作请参见API概览。 在调用ROMA Connect API之前,请确保已经充分了解ROMA Connect相关概念,详细信息请参见产品介绍。 父主题: 使用前必读
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 succ_num Integer 导入成功的产品数。 最小值:0 最大值:500 fail_num Integer 导入失败的产品数。 最小值:0 最大值:500 fail_objects_ids Array of strings 导入失败的产品名称列表。 最小长度:1 最大长度:10 数组长度:0 - 500 状态码: 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 { "name" : "MyApp", "id" : "b2e6b145-4f3f-4a80-aa45-f4b8029f95a3", "remark" : ""} 状态码: 403 Forbidden { "error_code" : "ROMA.00000101", "error_msg" : "error summary", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43"} 状态码: 404 Not Found { "error_code" : "ROMA.00000101", "error_msg" : "error summary", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43"}
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 id String 应用ID。 name String 应用名称。 字符集:支持中文、英文字母、数字、中划线、下划线、点、空格和中英文圆括号。 约束:实例下唯一。 remark String 应用描述。 状态码: 403 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。
  • 响应消息 响应参数 表3 响应参数 名称 类型 描述 destKey string 规则引擎目的端。 instanceId string 实例ID。 ruleDestOid integer 规则引擎目的端ID。 ruleOid integer 规则ID。 server string 连接地址。 sslPassword string SSL密码。 sslUser string SSL用户。 topicName string 主题名。 响应示例 { "ruleDestOid": 29, "ruleOid": 600071, "topicName": "topic02", "destKey": "ROMA_MQS", "instanceId": "8f3b9416-3f73-44e2-a32d-**********", "server": "192.168.0.x:9092,192.x.0.10:9092,192.168.0.x:9092", "sslUser": null, "sslPassword": "" }
  • 请求消息 请求参数 表2 Body参数 参数 类型 是否必填 说明 rule_name string 是 系统中已经创建好的规则名称,如果规则不存在,默认创建该规则。 mqs_topic string 是 转发目的端的MQS的Topic名称。 connect_address string 是 MQS Broker的连接地址。 destination string 是 消息转发的目的端的类型,目前只支持ROMA_MQS,KAFKA。 mqs_sasl_ssl Boolean 否 转发的目的端MQS是否开启SSL,这里需要确认MQS是否启用了SSL。 user_name string 否 MQS启用SSL时,需要传入MQS的用户名,未启用SSL不需要传入该参数。 password string 否 MQS启用SSL时,需要传入MQS的密码,未启用SSL不需要传入该参数。 请求示例 https://example.cloud.com/v1/80e2b******f4a398d6409a50932d917/link/instances/fb3b24ab-5d87-473d-9c57-fc6******6a1/rules/destination { "rule_name" : "rule01", "mqs_topic" : "mqs-topic01", "connect_address" : "192.168.x.x:9093,192.168.0.x:9093,192.168.0.x:9093", "destination" : "ROMA_MQS", "mqs_sasl_ssl" : false}
  • 响应示例 状态码: 200 OK { "sign_secret" : "dc0**********2b3", "update_time" : "2020-08-03T03:50:14.989785802Z", "create_time" : "2020-08-03T03:39:38Z", "name" : "signature_demo", "id" : "0b0e8f456b8742218af75f945307173c", "sign_key" : "a071a20d460a4f639a636c3d7e3d8163", "sign_type" : "hmac"} 状态码: 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.3017", "error_msg" : "Signature key 0b0e8f456b8742218af75f945307173c does not exist"} 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error"}
  • 请求示例 修改指定跨域资源共享插件的内容 { "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\\\":\\\"10.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\\\":\\\"deny\\\",\\\"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}"}
  • 响应示例 状态码: 200 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\\\":\\\"10.85.217.114:1234\\\",\\\"path\\\":\\\"/check\\\",\\\"timeout\\\":10,\\\"vpc_channel_enabled\\\":false,\\\"vpc_channel_info\\\":null},\\\"identities\\\":{\\\"headers\\\":[{\\\"name\\\":\\\"token\\\"}],\\\"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_enable\\\":false}", "remark" : "这是一个包含规则表达式黑名单的第三方认证插件", "create_time" : "2023-05-06T06:54:59.296181801Z", "update_time" : "2023-05-06T07:07:18.369017889Z"} 状态码: 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.3068", "error_msg" : "Plugin b294018ee0554156a875b3513e02e5b9 does not exist"} 状态码: 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
  • 响应参数 状态码: 200 表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 错误描述
  • 响应示例 状态码: 200 OK { "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.updateCommandResponse]. 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"}
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:100000 表3 请求Body参数 参数 是否必选 参数类型 描述 property_name 是 String 属性名称,首位必须为字母,支持大小写字母、数字、中划线及下划线,长度2-50。 最小长度:2 最大长度:50 description 否 String 属性描述,长度0-200。 最小长度: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为数组类型。 最小长度:0 最大长度:10 required 是 Integer 是否必填,0-非必填,1-必填。 最小值:0 最大值:10 min 否 String 最小值,当data_type为integer或number时必填。 缺省值:0 最小长度:0 最大长度:10 max 否 String 最大值,当data_type为integer或number时必填。 缺省值:65536 最小长度:0 最大长度:10 step 否 String 步长,当data_type为integer或number时必填。 缺省值:1 最小长度:0 最大长度:10 max_length 否 Integer 字符串最大长度,当data_type为string、datetime、 json时必填,自动向下取整。 最小值:0 最大值:9999999 缺省值:10 unit 否 String 属性单位。 最小长度:0 最大长度:10 enum_list 否 String string的枚举值数组,使用逗号分隔,单个长度取决于max_length参数。 最小长度:0 enum_dict 否 Object 当数据类型为boolean枚举值时填写json格式数据,形如"enum_dict":{"0":"xxx","1":"xxx"}。
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 property_id Integer 属性ID。 最小值:1 最大值:99999999999999999 property_name String 属性名称,首位必须为字母,支持大小写字母、数字、中划线及下划线,长度2-50。 最小长度:2 最大长度:50 description String 属性描述,长度0-200。 最小长度: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为数组类型。 最小长度:0 最大长度:10 required Integer 是否必填,0-非必填,1-必填。 最小值:0 最大值:10 min String 最小值,当data_type为integer或number时有效。 缺省值:0 最小长度:0 最大长度:10 max String 最大值,当data_type为integer或number时有效。 缺省值:65536 最小长度:0 最大长度:10 step String 步长,当data_type为integer或number时有效。 缺省值:1 最小长度:0 最大长度:10 max_length Integer 字符串最大长度,当data_type为string、datetime、json时有效。 最小值:1 最大值:99999999 缺省值:10 unit String 属性单位。 最小长度:0 最大长度:10 enum_list String string的枚举值数组,使用逗号分隔,单个长度取决于max_length参数。 最小长度:0 enum_dict Object 当数据类型为boolean枚举值时填写json格式数据,形如"enum_dict":{"0":"xxx","1":"xxx"}。 状态码: 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 { "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" : "TEI9****8UM", "favorite" : true} 状态码: 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。 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 是否收藏应用,收藏的应用会在列表里优先显示。 表5 created_user 参数 参数类型 描述 user_id String 创建应用的用户ID。 user_name String 创建应用的用户名称。 表6 last_updated_user 参数 参数类型 描述 user_id String 最后修改者的用户ID。 user_name String 最后修改者的用户名。 状态码: 403 表7 响应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参数 参数 是否必选 参数类型 描述 name 否 String 应用名称。 字符集:支持中文、英文字母、数字、中划线、下划线、点、空格和中英文圆括号。 约束:实例下唯一。 remark 否 String 应用描述。 favorite 否 Boolean 收藏的应用。
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 min_ssl_version 是 String 最小ssl协议版本号。支持TLSv1.1或TLSv1.2 缺省值:TLSv1.1 is_http_redirect_to_https 否 Boolean 是否开启http到https的重定向,false为关闭,true为开启,默认为false 缺省值:false verified_client_certificate_enabled 否 Boolean 是否开启客户端证书校验。只有绑定证书时,该参数才生效。当绑定证书存在trusted_root_ca时,默认开启;当绑定证书不存在trusted_root_ca时,默认关闭。 缺省值:false
  • 响应示例 状态码: 201 Created { "id" : "0a515af69f4e4dcca84fbf85f68c0e27", "url_domain" : "www.example.com", "status" : 3, "min_ssl_version" : "TLSv1.2", "is_http_redirect_to_https" : false, "verified_client_certificate_enabled" : false} 状态码: 400 Bad Request { "error_code" : "APIG.3474", "error_msg" : "The API group ID in the URL does not match the API group to which the URL domain has been bound"} 状态码: 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.3020", "error_msg" : "The URL domain does not exist"} 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error"}
  • 响应参数 状态码: 201 表4 响应Body参数 参数 参数类型 描述 url_domain String 自定义 域名 id String 自定义域名的编号 status Integer CNAME解析状态 1: 未解析 2: 解析中 3: 解析成功 4: 解析失败 min_ssl_version String 支持的最小SSL版本 is_http_redirect_to_https Boolean 是否开启http到https的重定向,false为关闭,true为开启,默认为false 缺省值:false verified_client_certificate_enabled Boolean 是否开启客户端证书校验。只有绑定证书时,该参数才生效。当绑定证书存在trusted_root_ca时,默认开启;当绑定证书不存在trusted_root_ca时,默认关闭。 缺省值:false 状态码: 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 错误描述
  • 请求示例 { "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 { "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.3084", "error_msg" : "The livedata API does not exist, id: bd42841c20184da6bbf457c6d8a06e37"} 状态码: 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 OK { "id" : "string", "name" : "string", "remark" : "string", "code" : "string", "extend_one" : "string", "extend_two" : "string", "parent_code" : "string", "type" : "system", "create_time" : "2019-12-06T06:49:04Z", "update_time" : "2019-12-06T06:49:04Z"} 状态码: 403 Forbidden { "error_code" : "ROMA.00000101", "error_msg" : "error summary", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43"}
  • 响应参数 状态码: 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 错误描述
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 name 否 String 字典名称。 字符集:中文、英文字母、数字、下划线和空格。 约束:实例下唯一。 remark 否 String 字典描述。 order 否 Integer 字典排序,值越小顺序越靠前。 extend_one 否 String 字典扩展字段1。 字符集:中文、英文字母、数字、下划线和空格。 extend_two 否 String 字典扩展字段2。 字符集:中文、英文字母、数字、下划线和空格。
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 id String 字典ID。 name String 字典名称。 字符集:中文、英文字母、数字、下划线和空格。 约束:实例下唯一。 remark String 字典描述。 code String 字典编码。 字符集:英文字母、数字、下划线和空格。 约束:实例下唯一。 extend_one String 字典扩展字段1。 字符集:中文、英文字母、数字、下划线和空格。 extend_two String 字典扩展字段2。 字符集:中文、英文字母、数字、下划线和空格。 parent_code String 父字典编码,为空时代表自身就是最顶级字典。 type String 字典类型。 system: 代表系统内置字典,用户可编辑但不可删除。 user: 代表用户创建字典。 create_time String 创建时间。 update_time String 更新时间。 状态码: 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参数 参数 是否必选 参数类型 描述 topics 是 Array of UpdateTopicAccessPolicyTopicsObject objects 策略列表。 表4 UpdateTopicAccessPolicyTopicsObject 参数 是否必选 参数类型 描述 name 是 String Topic名称。 policies 是 Array of UpdateTopicAccessPolicyPoliciesObject objects 权限列表。 description 否 String 描述。 sensitive_word 否 String 敏感字段。 表5 UpdateTopicAccessPolicyPoliciesObject 参数 是否必选 参数类型 描述 app_id 是 String 集成应用Key。 app_key 否 String 集成应用Key。 app_name 是 String 应用名称。 access_policy 是 String 权限类型。 all:发布+订阅 pub:发布 sub:订阅 owner 否 Boolean 是否为创建Topic时所选择的应用。 默认为false。 tag 否 String 权限类型对应的标签。 当权限类型是all时,发布和订阅的标签用符号“&”隔开。 当有多个标签时,标签用符号“||”隔开。
  • 请求示例 把Topic所属集成应用的权限修改为仅可发布消息 POST https://{endpoint}/v2/{project_id}/mqs/instances/{instance_id}/topics/accesspolicy{ "topics" : [ { "name" : "topic-test-mqs", "policies" : [ { "owner" : true, "access_policy" : "pub", "app_name" : "app-dhytest", "tag" : "", "app_id" : "cd28a9d9-2184-42ce-9fbe-f3785b6caada" } ], "sensitive_word" : "", "description" : "" } ]}
共99354条