华为云用户手册

  • 响应参数 状态码: 201 表4 响应Body参数 参数 参数类型 描述 id String 编号 name String API分组名称 status Integer 状态 1: 有效 2: 锁定 sl_domain String 系统默认分配的子域名 register_time String 创建时间 update_time String 最近修改时间 on_sell_status Integer 是否已上架云市场: 1:已上架 2:未上架 3:审核中 ROMA Connect暂未对接云市场,此字段默认返回2 url_domains Array of UrlDomain objects 分组上绑定的独立域名列表 sl_domains Array of strings 系统默认分配的子域名列表 remark String 描述 call_limits Integer 流控时长内分组下的API的总访问次数限制,默认不限,请根据服务的负载能力自行设置 暂不支持 time_interval Integer 流控时长 暂不支持 time_unit String 流控的时间单位 暂不支持 is_default Integer 是否为默认分组 version String 分组版本 V1:全局分组 V2:应用级分组 roma_app_id String 分组归属的集成应用编号。 分组版本V2时必填。 roma_app_name String 分组归属的集成应用名称 表5 UrlDomain 参数 参数类型 描述 id String 域名编号 domain String 访问域名 cname_status Integer 域名cname状态: 1:未解析 2:解析中 3:解析成功 4:解析失败 ssl_id String SSL证书编号 ssl_name String SSL证书名称 min_ssl_version String 最小ssl协议版本号。支持TLSv1.1或TLSv1.2 缺省值:TLSv1.1 verified_client_certificate_enabled Boolean 是否开启客户端证书校验。只有绑定证书时,该参数才生效。当绑定证书存在trusted_root_ca时,默认开启;当绑定证书不存在trusted_root_ca时,默认关闭。 缺省值:false is_has_trusted_root_ca Boolean 是否存在信任的根证书CA。当绑定证书存在trusted_root_ca时为true。 缺省值:false ssl_infos Array of SslInfo objects SSL证书列表 表6 SslInfo 参数 参数类型 描述 ssl_id String SSL证书编号 ssl_name String SSL证书名称 algorithm_type String 证书算法类型: RSA ECC SM2 type String 证书可见范围: instance:当前实例 global:全局 缺省值:global 状态码: 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参数 参数 是否必选 参数类型 描述 name 是 String API分组的名称。 支持汉字、英文、数字、中划线、下划线、点、斜杠、中英文格式下的小括号和冒号、中文格式下的顿号,且只能以英文、汉字和数字开头,3-255个字符。 说明: 中文字符必须为UTF-8或者unicode编码。 最小长度:3 最大长度:255 remark 否 String API分组描述。 说明: 中文字符必须为UTF-8或者unicode编码。 最大长度:1000 roma_app_id 否 String 分组归属的集成应用编号。 分组版本V2时必填。 version 否 String 分组版本 V1:全局分组 V2:应用级分组
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 total Integer 应用的总成员数量。 id String 应用ID。 users Array of users objects 用户成员列表。 表5 users 参数 参数类型 描述 id String 用户ID。 name String 用户名称。 roles Array of strings 应用权限角色。 read:应用下资源只读权限,至少要存在此权限,包括API调试。 access:应用下资源的访问管理权限。 delete:应用下资源的删除权限。 modify:应用下资源的修改权限,包括API发布、下线。 admin:应用和应用下资源的权限。 仅提供admin时,会自动应用其它所有权限。 未提供read时会自动应用read权限。 状态码: 403 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。
  • 响应示例 状态码: 200 查询成功 { "total" : 1, "id" : "b2e6b145-4f3f-4a80-aa45-f4b8029f95a3", "users" : [ { "id" : "string", "name" : "string", "roles" : [ "read, access, delete, modify, admin" ] } ] } 状态码: 403 Forbidden { "error_code" : "ROMA.00000101", "error_msg" : "error summary", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 plugins Array of AttachedPluginInfo objects 绑定API的插件列表。 表5 AttachedPluginInfo 参数 参数类型 描述 plugin_attach_id String 插件绑定编码。 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:集成应用可见 env_id String 绑定API的环境编码。 env_name String api授权绑定的环境名称 attached_time String 绑定时间。 plugin_content String 插件定义内容,支持json。 最大长度:65535 remark String 插件描述,255字符。 说明: 中文字符必须为UTF-8或者unicode编码。 最大长度:255 create_time String 创建时间。 update_time String 更新时间。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "plugins" : [ { "plugin_attach_id" : "8aa097b00e9843efacb9c593d11b769e", "plugin_id" : "5b729aa252764739b3s237ef0d66dc63", "plugin_name" : "跨域插件", "plugin_type" : "cors", "plugin_scope" : "global", "plugin_content" : "{\"allow_origin\": \"*\",\"allow_methods\": \"GET,POST,PUT\",\"allow_headers\": \"Content-Type,Accept,Accept-Ranges,Cache-Control\",\"expose_headers\": \"X-Request-Id,X-Apig-Latency\",\"max_age\": 172800,\"allow_credentials\": true}", "remark" : "CORS跨域资源访问", "env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID", "env_name" : "RELEASE", "attached_time" : "2022-11-02T12:31:23.353Z", "create_time" : "2022-11-02T12:31:23.353Z", "update_time" : "2022-11-02T12:31:23.353Z" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:instance_id. Please refer to the support documentation" } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3002", "error_msg" : "API 5f918d104dc84480a75166ba99efff21 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 实例支持的APIC特性 若当前实例中无相关特性,可提交工单申请升级实例解决。 特性名称 特性描述 特性是否可配置 特性配置示例 特性配置参数 参数描述 参数默认值 参数范围 lts 是否支持shubao访问日志上报功能。 是 {"name":"lts","enable":true,"config": "{\"group_id\": ",\"topic_id\":\"\",\"log_group\":\"\",\"log_stream\":\"\"}"} group_id 日志组ID - - topic_id 日志流ID - - log_group 日志组名称 - - log_stream 日志流名称 - - gateway_responses 是否支持网关自定义响应。 否 - - - - - ratelimit 是否支持自定义流控值。 是 {"name":"ratelimit","enable":true,"config": "{\"api_limits\": 500}"} api_limits API全局默认流控值。注意:如果配置过小会导致业务持续被流控,请根据业务谨慎修改。 200 次/秒 1-1000000 次/秒 request_body_size 是否支持指定最大请求Body大小。 是 {"name":"request_body_size","enable":true,"config": "104857600"} request_body_size 请求中允许携带的Body大小上限。 12 M 1-9536 M backend_timeout 是否支持配置后端API超时时间。 是 {"name":"backend_timeout","enable":true,"config": "{"max_timeout": 500}"} max_timeout APIC到后端服务的超时时间上限。 60000 ms 1-600000 ms app_token 是否开启app_token认证方式。 是 {"name":"app_token","enable":true,"config": "{\"enable\": \"on\", \"app_token_expire_time\": 3600, \"app_token_uri\": \"/v1/apigw/oauth2/token\", \"refresh_token_expire_time\": 7200}"} enable 是否开启 off on/off app_token_expire_time access token的有效时间 3600 s 1-72000 s refresh_token_expire_time refresh token的有效时间 7200 s 1-72000 s app_token_uri 获取token的uri /v1/apigw/oauth2/token - app_token_key token的加密key - - app_basic 是否开启app_basic认证方式。 是 {"name":"app_basic","enable":true,"config": "on"} - - off on/off app_secret 是否支持app_secret认证方式。 是 {"name":"app_secret","enable":true,"config": "on"} - - off on/off backend_token_allow 是否支持普通租户透传token到后端。 是 {"name":"backend_token_allow","enable":true,"config": "{\"backend_token_allow_users\": [\"paas_apig_wwx548366_01\"]}"} backend_token_allow_users 透传token到后端普通租户白名单,匹配普通租户domain name正则表达式 - - sign_basic 签名秘钥是否支持basic类型。 否 - - - - - multi_auth API是否支持双重认证方式。 否 - - - - - backend_client_certificate 是否开启后端双向认证。 是 {"name":"backend_client_certificate","enable":true,"config": "{\"enable\": \"on\",\"ca\": \"\",\"content\": \"\",\"key\": \"\"}"} enable 是否开启 off on/off ca 双向认证信任证书 - - content 双向认证证书 - - key 双向认证信任私钥 - - ssl_ciphers 是否支持https加密套件。 是 {"name":"ssl_ciphers","enable":true,"config": "config": "{\"ssl_ciphers\": [\"ECDHE-ECDSA-AES256-GCM-SHA384\"]}"} ssl_ciphers 支持的加解密套件。ssl_ciphers数组中只允许出现默认值中的字符串,且数组不能为空。 - ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES256-SHA384,ECDHE-RSA-AES256-SHA384,ECDHE-ECDSA-AES128-SHA256,ECDHE-RSA-AES128-SHA256 app_config 是否支持应用配置。 否 - - - - - green_tunnel 授权是否支持绿色通道。 否 - - - - - app_route 是否支持ip访问。 是 {"name":"app_route","enable":true,"config": "on"} - - off on/off default_group_hide 是否隐藏默认分组。注意:隐藏默认分组后不支持ip访问,如想使用ip访问,建议开启app_route配置。 是 {"name":"default_group_hide","enable":true,"config": "on"} - - off on/off cascade 是否开启级联功能。 是 {"name":"app_route","enable":true,"config": "{\"enable\": \"on\", \"cascade_auth_key\": \"abcdefabcdefabcdefabcdefabcdef11\", \"cascade_instance_ids\":\"104e4816-1e9c-4345-be3a-14528727d0e3\"}"} enable 是否开启级联功能 off on/off cascade_auth_key 用于生成级联认证token的加密key。 - - cascade_instance_ids 级联时允许作为上级的实例ID。 - - sandbox 是否支持lda函数沙箱配置。 是 {"name":"sandbox","enable":true,"config": "{\"max_cpu_time\": 30000, \"max_memory\": 1073741824}"} max_cpu_time 允许函数API中执行的CPU时间占用的最高时长。单位:毫秒 60000 ms 1-1000000 ms max_memory 允许函数API中执行的内存大小。单位:字节 256 M 1-9536 M livedata_config 是否支持后端服务自定义配置。同时存在sandbox和livedata_config时,优先使用livedata_config 是 {"name":"sandbox","enable":true,"config": "{\"max_cpu_time\": 30000, \"max_memory\": 1073741824, \"max_memory\": 1073741824, \"dataapi_return_type\": \"no_string\", \"gw_address_protocol\": \"http\", \"livedata_env\": \"offline\",\"procedure_async\": \"off\"}"} max_cpu_time 允许函数API中执行的CPU时间占用的最高时长。单位:毫秒 60000 ms 1-1000000 ms max_memory 允许函数API中执行的内存大小。单位:字节 256 M 1-9536 M livedata_env 自定义后端的运行模式,设置为online时,自定义后端API将会按照线上格式返回。 online online/offline gw_address_protocol DICT:gw_rest_float_addr变量中使用的默认请求协议。 none http/https/none procedure_async 存储过程是否使用异步执行。 off on/off dataapi_return_type 数据API的返回格式。 no_string string/no_string real_ip_from_xff 是否使用X-Forwarded-For头中的IP作为ACL、流控的判断依据。 是 {"name": "real_ip_from_xff","enable": true,"config": {"enable": "on","xff_index": -1}} enable 是否开启 off on/off xff_index X-Forwarded-For头中IP的排序序号,值允许为正数、负数、0。 值为0或正数时,获取X-Forwarded-For头中对应索引的IP。 值为负数时,按倒序方式从X-Forwarded-For头中获取IP。 例如到达API网关的X-Forwarded-For头中依次有IP1,IP2,IP3三个IP地址,xff_index取0时获取IP1,xff_index取1时获取IP2,xff_index取-1时获取IP3,xff_index取-2时获取IP2。 -1 int32有效值 apiclient_first_use_x_hw_id 自定义后端的ApiClient类是否优先使用X-HW-ID字段进行校验。 是 {"name":"apiclient_first_use_x_hw_id","enable":true,"config": "on"} - - off on/off custom_log 是否支持自定义日志功能。 是 {"name":"custom_log","enable":true,"config": "{\"custom_logs\":[{\"location\":\"header\",\"name\":\"test\"},{\"location\":\"query\",\"name\":\"x-query-test001\"}]}"} custom_logs 自定义日志中要打印参数的集合,数量不超过10个。 - - location 参数位置。 - header/query/cookie name 参数名称。 - - real_ip_header_getter 是否开启用户自定义Header获取源ip地址,作为访问控制、流控策略的源ip生效依据。 是 {"name":"real_ip_header_getter","enable":true,"config": "{\"enable\": \"on\",\"header_getter\": \"header:testIP\"}"} enable 是否开启。 off on/off header_getter 获取用户源IP地址的自定义Header。 - - vpc_name_modifiable 负载通道名称是否支持修改。 是 {"name":"vpc_name_modifiable","enable":true,"config": "on"} - - on on/off default_group_host_trustlist DEFAULT分组中的API是否支持非本实例IP访问。 是 {"name":"default_group_host_trustlist","enable":true,"config": "{\"enable\":\"on\",\"hosts\":[\"123.2.2.2\",\"202.2.2.2\"]}"} enable 是否开启。 off on/off hosts 非本实例IP列表。 - - data_api_column_types_converted_to_string 数据后端是否支持数据列类型转换String类型。 是 {"name": "data_api_column_types_converted_to_string", "enable": true, "config": "{\"enable\":\"on\",\"column_types\":[\"nvarchar2\"]}"} enable 是否开启。 off on/off column_types 数据列类型列表:勾选要转换String类型的数据列类型,当前仅支持nvarchar2类型。 - - 父主题: 附录
  • 响应示例 状态码: 200 OK { "total" : 2, "size" : 2, "groups" : [ { "update_time" : "2020-07-31T06:55:55Z", "name" : "api_group_001", "on_sell_status" : 2, "remark" : "group1", "sl_domains" : [ "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com", "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.cn" ], "sl_domain" : "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com", "id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "register_time" : "2020-07-31T06:55:55Z", "status" : 1, "is_default" : 2, "version" : "V1" }, { "update_time" : "2020-06-24T15:29:42.421926Z", "name" : "api_group_002", "on_sell_status" : 2, "remark" : "group2", "sl_domain" : "02a8ab3cb2784de5a096852829671ae7.apic.****.com", "sl_domains" : [ "02a8ab3cb2784de5a096852829671ae7.apic.****.com", "02a8ab3cb2784de5a096852829671ae7.apic.****.cn" ], "id" : "02a8ab3cb2784de5a096852829671ae7", "register_time" : "2020-06-24T15:29:42.421926Z", "status" : 1, "is_default" : 2, "version" : "V1" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "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" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 groups Array of ApiGroupInfo objects 分组列表 表5 ApiGroupInfo 参数 参数类型 描述 id String 编号 name String API分组名称 status Integer 状态 1: 有效 2: 锁定 sl_domain String 系统默认分配的子域名 register_time String 创建时间 update_time String 最近修改时间 on_sell_status Integer 是否已上架云市场: 1:已上架 2:未上架 3:审核中 ROMA Connect暂未对接云市场,此字段默认返回2 url_domains Array of UrlDomain objects 分组上绑定的独立域名列表 sl_domains Array of strings 系统默认分配的子域名列表 remark String 描述 call_limits Integer 流控时长内分组下的API的总访问次数限制,默认不限,请根据服务的负载能力自行设置 暂不支持 time_interval Integer 流控时长 暂不支持 time_unit String 流控的时间单位 暂不支持 is_default Integer 是否为默认分组 version String 分组版本 V1:全局分组 V2:应用级分组 roma_app_id String 分组归属的集成应用编号。 分组版本V2时必填。 roma_app_name String 分组归属的集成应用名称 表6 UrlDomain 参数 参数类型 描述 id String 域名编号 domain String 访问域名 cname_status Integer 域名cname状态: 1:未解析 2:解析中 3:解析成功 4:解析失败 ssl_id String SSL证书编号 ssl_name String SSL证书名称 min_ssl_version String 最小ssl协议版本号。支持TLSv1.1或TLSv1.2 缺省值:TLSv1.1 verified_client_certificate_enabled Boolean 是否开启客户端证书校验。只有绑定证书时,该参数才生效。当绑定证书存在trusted_root_ca时,默认开启;当绑定证书不存在trusted_root_ca时,默认关闭。 缺省值:false is_has_trusted_root_ca Boolean 是否存在信任的根证书CA。当绑定证书存在trusted_root_ca时为true。 缺省值:false ssl_infos Array of SslInfo objects SSL证书列表 表7 SslInfo 参数 参数类型 描述 ssl_id String SSL证书编号 ssl_name String SSL证书名称 algorithm_type String 证书算法类型: RSA ECC SM2 type String 证书可见范围: instance:当前实例 global:全局 缺省值:global 状态码: 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 错误描述
  • 功能介绍 将API发布到不同的环境后,对于不同的环境,可能会有不同的环境变量,比如,API的服务部署地址,请求的版本号等。 用户可以定义不同的环境变量,用户在定义API时,在API的定义中使用这些变量,当调用API时,服务集成会将这些变量替换成真实的变量值,以达到不同环境的区分效果。 环境变量定义在API分组上,该分组下的所有API都可以使用这些变量。 1.环境变量的变量名称必须保持唯一,即一个分组在同一个环境上不能有两个同名的变量 2.环境变量区分大小写,即变量ABC与变量abc是两个不同的变量 3.设置了环境变量后,使用到该变量的API的调试功能将不可使用。 4.定义了环境变量后,使用到环境变量的地方应该以对称的#标识环境变量,当API发布到相应的环境后,会对环境变量的值进行替换,如:定义的API的URL为:https://#address#:8080,环境变量address在RELEASE环境上的值为:192.168.1.5,则API发布到RELEASE环境后的真实的URL为:https://192.168.1.5:8080。
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 variable_value 是 String 变量值支持英文字母、数字、英文格式的下划线、中划线,斜线(/)、点、冒号,1 ~ 255个字符。 env_id 是 String 环境编号 最小长度:1 最大长度:65 group_id 是 String API分组编号 最小长度:1 最大长度:65 variable_name 是 String 变量名,支持英文字母、数字、英文格式的下划线、中划线,必须以英文字母开头,3~32个字符。在API定义中等于#Name的值#部分(区分大小写),发布到环境里的API被变量值换。 说明: 中文字符必须为UTF-8或者unicode编码。
  • 响应参数 状态码: 201 表4 响应Body参数 参数 参数类型 描述 variable_value String 变量值支持英文字母、数字、英文格式的下划线、中划线,斜线(/)、点、冒号,1 ~ 255个字符。 env_id String 环境编号 最小长度:1 最大长度:65 group_id String API分组编号 最小长度:1 最大长度:65 variable_name String 变量名,支持英文字母、数字、英文格式的下划线、中划线,必须以英文字母开头,3~32个字符。在API定义中等于#Name的值#部分(区分大小写),发布到环境里的API被变量值换。 说明: 中文字符必须为UTF-8或者unicode编码。 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 错误描述
  • 响应示例 状态码: 201 Created { "variable_value" : "192.168.1.5", "env_id" : "7a1ad0c350844ee69479b47df9a881cb", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "id" : "25054838a624400bbf2267cf5b3a3f70", "variable_name" : "address" } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:variable_name" } 状态码: 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.3003", "error_msg" : "Environment 7a1ad0c350844ee69479b47df9a881cb does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应示例 状态码: 200 OK { "restrict_cidrs" : [ "127.0.0.1/32", "192.168.0.1/24" ], "resource_subnet_cidr" : "192.168.0.1/24" } 状态码: 401 Unauthorized { "error_code" : "APIC.7102", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIC.7106", "error_msg" : "No permissions to request for the method" } 状态码: 404 Not Found { "error_code" : "APIC.7302", "error_msg" : "Instance not found" } 状态码: 500 Internal Server Error { "error_code" : "APIC.9000", "error_msg" : "Failed to request internal service" }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 restrict_cidrs Array of strings 受限的IP网段的CIDR列表。 resource_subnet_cidr String 资源租户的IP网段的CIDR。 状态码: 401 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 200 OK { "name" : "romamqs_640bb069-151e-4d5e-bd1b-xxxxxxxxxxxx", "engine" : "kafka", "port" : 9093, "status" : "RUNNING", "description" : "roma-mqs", "type" : "cluster", "specification" : "100MB", "engine_version" : "1.1.0", "connect_address" : "192.168.0.57,192.168.0.227,192.168.0.234", "instance_id" : "640bb069-151e-4d5e-bd1b-xxxxxxxxxxxx", "resource_spec_code" : "dms.instance.kafka.cluster.c3.mini", "charging_mode" : 1, "vpc_id" : "5810f4bb-b202-45cd-a5d1-xxxxxxxxxxxx", "vpc_name" : "vpc-4aeb", "created_at" : "1601016527494", "product_id" : "00300-30308-0--0", "security_group_id" : "20d120f2-70ba-4c8d-a6a4-xxxxxxxxxxxx", "security_group_name" : "sg-5ab2", "subnet_id" : "08c8e51c-7013-43ee-bb0a-xxxxxxxxxxxx", "subnet_name" : "subnet-4afa", "subnet_cidr" : "192.168.0.0/24", "available_zones" : [ "9f1c5806706d4c1fb0eb72f0a9b18c77" ], "user_id" : "4d1a542e7bcf400cb9c8efada01406d8", "user_name" : "paas_test", "access_user" : "mqs-gen-user-1601016526411", "maintain_begin" : "22:00:00", "maintain_end" : "02:00:00", "enable_log_collection" : false, "storage_space" : 490, "total_storage_space" : 600, "used_storage_space" : 25, "partition_num" : "300", "enable_publicip" : true, "publicip_address" : "10.10.10.170", "ssl_enable" : true, "cross_vpc_info" : "{\"192.168.0.227\":{\"advertised_ip\":\"192.168.0.227\",\"port\":9011,\"port_id\":\"6ba24c0a-c3ba-4fb8-9adb-84b7a346a623\"},\"192.168.0.57\":{\"advertised_ip\":\"192.168.0.57\",\"port\":9011,\"port_id\":\"4d34a44d-d968-4dcb-89a9-e38e62626df6\"},\"192.168.0.234\":{\"advertised_ip\":\"192.168.0.234\",\"port\":9011,\"port_id\":\"9eac2e81-323c-4d2d-acce-7f84f2d3bd9b\"}}", "storage_resource_id" : "234705d3-8f33-451a-92aa-xxxxxxxxxxxx", "storage_spec_code" : "dms.physical.storage.normal", "service_type" : "advanced", "storage_type" : "hec", "is_logical_volume" : true, "extend_times" : 0, "retention_policy" : "produce_reject", "ipv6_enable" : false, "ipv6_connect_addresses" : [ ], "connector_enable" : false, "mqs_connector_enable" : true, "mqs_connector_address" : "192.168.0.10:9776;192.168.0.17:9776", "connector_id" : "", "rest_enable" : true, "rest_connect_address" : "https://10.10.10.170:9292", "kafka_public_status" : "false", "public_bandwidth" : 0, "public_boundwidth" : 0, "message_query_inst_enable" : true, "vpc_client_plain" : false, "support_features" : "kafka.crossvpc.domain.enable,feature.physerver.kafka.topic.accesspolicy,rabbitmq.plugin.management,roma_app_enable,auto_topic_switch,feature.physerver.kafka.user.manager,route,kafka.new.pod.port,feature.physerver.kafka.topic.modify,message_trace_enable,features.pod.token.access,roma.user.manage.no.support,feature.physerver.kafka.pulbic.dynamic,features.log.collection", "trace_enable" : false, "agent_enable" : false, "listeners" : [ { "name" : "mqs-kafka-1", "port" : 9096, "backend" : { "ip" : [ "192.168.0.227" ], "port" : 9096, "health_check" : { "protocol" : "TCP_CHECK", "port" : 9093, "param" : null } } }, { "name" : "mqs-kafka-2", "port" : 9097, "backend" : { "ip" : [ "192.168.0.234" ], "port" : 9097, "health_check" : { "protocol" : "TCP_CHECK", "port" : 9093, "param" : null } } }, { "name" : "mqs-connector-0", "port" : 20911, "backend" : { "ip" : [ "192.168.0.10" ], "port" : 20911, "health_check" : { "protocol" : "TCP_CHECK", "port" : 20911, "param" : null } } }, { "name" : "mqs-connector-1", "port" : 20912, "backend" : { "ip" : [ "192.168.0.17" ], "port" : 20912, "health_check" : { "protocol" : "TCP_CHECK", "port" : 20912, "param" : null } } }, { "name" : "mqs-kafka-0", "port" : 9095, "backend" : { "ip" : [ "192.168.0.57" ], "port" : 9095, "health_check" : { "protocol" : "TCP_CHECK", "port" : 9093, "param" : null } } }, { "name" : "mqs-namesrv", "port" : 9776, "backend" : { "ip" : [ "192.168.0.10", "192.168.0.17" ], "port" : 9776, "health_check" : { "protocol" : "TCP_CHECK", "port" : 9776, "param" : null } } }, { "name" : "mqs-rest", "port" : 9292, "backend" : { "ip" : [ "192.168.0.38", "192.168.0.230" ], "port" : 9292, "health_check" : { "protocol" : "TCP_CHECK", "port" : 9292, "param" : null } } } ], "pod_connect_address" : "10.10.10.122:9080,10.10.10.96:9080,10.10.10.66:9080", "disk_encrypted" : false, "kafka_private_connect_address" : "192.168.0.227:9093,192.168.0.234:9093,192.168.0.57:9093", "enable_auto_topic" : false, "ces_version" : "linux,v1,v2", "plugin_enable" : false, "public_access_enabled" : "false", "node_num" : 3 }
  • 响应示例 状态码: 200 OK { "task" : { "task_id" : "15366328208d4d77b76532fe9f4006a6", "task_name" : "fdi_task_v2mysql-tomysql", "task_type" : "timing", "status" : "stop", "project_id" : "c53626012ba84727b938ca8bf03108ef", "source_datasource_id" : "30969b205e8f4392a25fb321112d1753", "target_datasource_id" : "30969b205e8f4392a25fb321112d1753", "source_datasource_name" : "fdi_ds_testmysqlv2", "target_datasource_name" : "fdi_ds_testmysqlv2", "source_app_id" : "eaaa8ad0-f967-416a-ab73-d995ef656e89", "target_app_id" : "eaaa8ad0-f967-416a-ab73-d995ef656e89", "source_app_name" : "app-testV2-interface", "target_app_name" : "app-testV2-interface", "created_date" : 1605288733684, "last_modified_date" : 1605288733684, "description" : "crate task", "task_tag" : "fdi_autotest" }, "task_detail" : "{\"needAPI\":false,\"targetDsId\":\"7049282e5678490d8e5a5c55d77638f6\",\"sourceSelectedDatasource\":{\"extend_meta_data\":[],\"orderType\":\"ASC\",\"sourceDateColumn\":\"\",\"dataTimestamp\":\"\",\"sourceTable\":\"mydb.tb_tmp01\",\"sourceSelectedColumnList\":[{\"null_able\":\"1\",\"unique\":\"0\",\"field_length\":\"11\",\"field_type\":\"INT\",\"field_name\":\"id\"},{\"null_able\":\"1\",\"unique\":\"0\",\"field_length\":\"25\",\"field_type\":\"VARCHAR\",\"field_name\":\"name\"},{\"null_able\":\"1\",\"unique\":\"0\",\"field_length\":\"11\",\"field_type\":\"INT\",\"field_name\":\"deptId\"},{\"null_able\":\"1\",\"unique\":\"0\",\"field_length\":\"11\",\"field_type\":\"INT\",\"field_name\":\"age\"}],\"isParse\":\"true\",\"querySql\":\"\",\"whereOptions\":[],\"instanceId\":\"02a7726e-1fc2-44b5-ae96-84a2b5f0e660\",\"sourceMetaData\":{\"dataSource\":[]},\"isAddSql\":false,\"meta_data\":[],\"where\":[],\"need_inc_migration\":false,\"textInputValue\":\"\",\"orderColumn\":\"\",\"isTextInput\":false},\"targetDatasource\":\"mysql\",\"needEmailNew\":false,\"description\":\"\",\"taskTag\":\"\",\"mappingTableProperties\":[{\"sourceNullable\":\"1\",\"sourceUnique\":\"0\",\"targetUnique\":\"0\",\"targetNullable\":\"1\"},{\"sourceNullable\":\"1\",\"sourceUnique\":\"0\",\"targetUnique\":\"0\",\"targetNullable\":\"1\"},{\"sourceNullable\":\"1\",\"sourceUnique\":\"0\",\"targetUnique\":\"0\",\"targetNullable\":\"1\"},{\"sourceNullable\":\"1\",\"sourceUnique\":\"0\",\"targetUnique\":\"0\",\"targetNullable\":\"1\"}],\"sourceDatasourceType\":\"MYSQL\",\"taskType\":2,\"sourceDatasource\":\"mysql\",\"targetDatasourceType\":\"MYSQL\",\"mappingSourceTextOrNot\":[{\"flag\":false},{\"flag\":false},{\"flag\":false},{\"flag\":false}],\"mappingTable\":[{\"targetColumnType\":\"INT\",\"isAddDateMapping\":false,\"sourceSupport\":\"1\",\"targetColumnLength\":\"11\",\"isAddMapping\":false,\"isAddBooleanMapping\":false,\"sourceColumnLength\":\"11\",\"targetColumn\":\"id\",\"sourceColumnType\":\"INT\",\"targetSupport\":\"1\",\"isAddFDIUUIDMapping\":false,\"sourceColumn\":\"id\"},{\"targetColumnType\":\"VARCHAR\",\"isAddDateMapping\":false,\"sourceSupport\":\"1\",\"targetColumnLength\":\"25\",\"isAddMapping\":false,\"isAddBooleanMapping\":false,\"sourceColumnLength\":\"25\",\"targetColumn\":\"name\",\"sourceColumnType\":\"VARCHAR\",\"targetSupport\":\"1\",\"isAddFDIUUIDMapping\":false,\"sourceColumn\":\"name\"},{\"targetColumnType\":\"INT\",\"isAddDateMapping\":false,\"sourceSupport\":\"1\",\"targetColumnLength\":\"11\",\"isAddMapping\":false,\"isAddBooleanMapping\":false,\"sourceColumnLength\":\"11\",\"targetColumn\":\"deptId\",\"sourceColumnType\":\"INT\",\"targetSupport\":\"1\",\"isAddFDIUUIDMapping\":false,\"sourceColumn\":\"deptId\"},{\"targetColumnType\":\"INT\",\"isAddDateMapping\":false,\"sourceSupport\":\"1\",\"targetColumnLength\":\"11\",\"isAddMapping\":false,\"isAddBooleanMapping\":false,\"sourceColumnLength\":\"11\",\"targetColumn\":\"age\",\"sourceColumnType\":\"INT\",\"targetSupport\":\"1\",\"isAddFDIUUIDMapping\":false,\"sourceColumn\":\"age\"}],\"targetSelectedDatasource\":{\"targetNeedCreateTable\":false,\"targetSelectedColumnList\":[{\"null_able\":\"1\",\"unique\":\"0\",\"field_length\":\"11\",\"field_type\":\"INT\",\"field_name\":\"id\"},{\"null_able\":\"1\",\"unique\":\"0\",\"field_length\":\"25\",\"field_type\":\"VARCHAR\",\"field_name\":\"name\"},{\"null_able\":\"1\",\"unique\":\"0\",\"field_length\":\"11\",\"field_type\":\"INT\",\"field_name\":\"deptId\"},{\"null_able\":\"1\",\"unique\":\"0\",\"field_length\":\"11\",\"field_type\":\"INT\",\"field_name\":\"age\"}],\"supportPartUpdate\":false,\"targetTable\":\"mydb.tb_tmp01_target\",\"instanceId\":\"02a7726e-1fc2-44b5-ae96-84a2b5f0e660\",\"batch_number_style\":\"UUID\",\"isSupportClearTab\":false,\"batchNumber\":\"\"},\"taskName\":\"fdi_task_5ykjp7\",\"sourceDsId\":\"7049282e5678490d8e5a5c55d77638f6\",\"projectId\":\"c53626012ba84727b938ca8bf03108ef\",\"needMQS\":false,\"mappingInput\":{},\"mappingRequired\":true}" }
  • 请求示例 创建一个数据集成普通任务,任务类型为定时,手动配置映射 { "task" : { "task_name" : "fdi_task_v2mysql-tomysql", "task_type" : "TIMING", "source_datasource_id" : "30969b205e8f4392a25fb321112d1753", "target_datasource_id" : "30969b205e8f4392a25fb321112d1753", "description" : "mysql", "task_tag" : "fdi_autotest" }, "task_detail" : "{\"sourceSelectedDatasource\":{\"dataTimestamp\":1606807799782,\"isNeedPageSrcApi\":true,\"pageKeySrcApi\":\"pageNum\",\"pageSizeKeySrcApi\":\"pageSize\",\"resultTotalRootPath\":\"\",\"isUseDynamicSignal\":false,\"timeshift\":\"\",\"startTimeKey\":\"\",\"beginDateColSrcApi\":\"beginTime\",\"endDateColSrcApi\":\"endTime\",\"rootPath\":\"\",\"sourceParams\":[{\"keys\":\"pageNum\",\"value\":\"0\"},{\"keys\":\"pageSize\",\"value\":\"10\"},{\"keys\":\"beginTime\",\"value\":\"1\"},{\"keys\":\"endTime\",\"value\":\"1\"}],\"sourceHeaders\":[],\"sourceBodyType\":\"raw-json\",\"bodyRaw\":\"{\\\"pageNum\\\":\\\"1\\\",\\\"pageSize\\\":\\\"10\\\"}\",\"sourceBodyFormData\":[],\"sourceResponseType\":\"json\",\"sourceMetaData\":{\"dataSource\":[{\"index\":0,\"name\":\"name\",\"type\":\"String\",\"format\":\"\",\"path\":\"\"},{\"index\":1,\"name\":\"age\",\"type\":\"Integer\",\"format\":\"\",\"path\":\"\"}],\"mode\":\"keyValue\"},\"incr_migration_type\":\"systemDefault\",\"period_granularity\":\"\",\"period_assignment\":\"\",\"period_right_boarder\":\"\",\"pagingEndType\":\"paging-list\",\"pagingEndFieldPath\":\"\",\"pageNumLimit\":\"1\",\"servicetype\":\"None\",\"current_page_num\":\"1\",\"page_size\":\"10\",\"need_inc_migration\":true,\"date_form\":\"unix_ms\",\"timeZone\":\"GMT+08:00\",\"reset_incr_begin_time\":false,\"compensation_time\":\"0\",\"advanceStartTime\":\"0\",\"advanceStartTimeUnit\":\"day\",\"isParse\":\"true\"},\"targetSelectedDatasource\":{\"targetNeedCreateTable\":false,\"isSupportClearTab\":false,\"targetTable\":\"CDCMODEL.NODE\",\"batchNumber\":\"\",\"targetSelectedColumnList\":[{\"field_name\":\"NODE_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"0\",\"unique\":\"1\"},{\"field_name\":\"AVAILABILITY_ZONE\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"CACHE_PORT\",\"field_type\":\"VARCHAR2\",\"field_length\":\"8\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"FLOATING_IP_ADDRESS\",\"field_type\":\"VARCHAR2\",\"field_length\":\"32\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"NAME\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"NODE_TYPE\",\"field_type\":\"VARCHAR2\",\"field_length\":\"255\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"PRIVATE_IP\",\"field_type\":\"VARCHAR2\",\"field_length\":\"32\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"USER_NAME\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"PRIVATE_KEY\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"ROOT_PASSWORD\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"SERVER_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"STATUS\",\"field_type\":\"VARCHAR2\",\"field_length\":\"255\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"SUBNET_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"0\",\"unique\":\"0\"},{\"field_name\":\"SUBNET_NAME\",\"field_type\":\"VARCHAR2\",\"field_length\":\"256\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"INSTANCE_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"DATAVOLUME_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"CACHE_ROLE\",\"field_type\":\"VARCHAR2\",\"field_length\":\"255\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"RES_SUBNET_IP\",\"field_type\":\"VARCHAR2\",\"field_length\":\"32\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"SYSTEMVOLUME_ID\",\"field_type\":\"VARCHAR2\",\"field_length\":\"64\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"SYSADMIN_PASSWORD\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"NEW_ROOT_PASSWD\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"NEW_SYSADMIN_PASSWD\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"ROOT_PASSWORD_OVERDUE_TIME\",\"field_type\":\"TIMESTAMP(6)\",\"field_length\":\"0\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"OPERATION_MSG\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"RES_SUBNET_IP_BETA\",\"field_type\":\"VARCHAR2\",\"field_length\":\"32\",\"null_able\":\"1\",\"unique\":\"0\"},{\"field_name\":\"METRIC_DATA\",\"field_type\":\"VARCHAR2\",\"field_length\":\"2048\",\"null_able\":\"1\",\"unique\":\"0\"}],\"supportPartUpdate\":false},\"mappingTable\":[],\"mappingInput\":{\"dataSource\":[{\"sourceKey\":\"name\",\"targetKey\":\"RES_SUBNET_IP_BETA\"},{\"sourceKey\":\"age\",\"targetKey\":\"METRIC_DATA\"}]},\"mappingRequired\":true,\"error_handler\":{\"path\":\"data1\",\"datasource_id\":\"79c4caaa3e1441dfb0351038fcf5f281\",\"mode\":\"OBS\",\"app_id\":\"73965e3c-72b2-40c3-8335-2154ebd6c23a\",\"stop_task_when_obs_failure\":false},\"afterImplementation\":{\"actionType\":\"KAFKA\",\"appId\":\"73965e3c-72b2-40c3-8335-2154ebd6c23a\",\"datasourceId\":\"a87a31a6288e4698865be122ae485dc0\",\"topic\":\"lgytest99\",\"messageContent\":\"success\"}}" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 permissions Array of strings 权限 id Integer 产品ID 最小值:1 最大值:99999999999999999 product_serial String 产品唯一序列(系统唯一值,用于MQS的TOPIC中标记产品) 最小长度:0 最大长度:64 app_id String 应用ID 最小长度:0 最大长度:64 name String 产品名称,创建产品时租户内唯一,长度最大64,仅支持中文,英文字母,数字,下划线和中划线 最小长度:0 最大长度:64 manufacturer_id String 产品供应商ID 最小长度:0 最大长度:64 manufacturer_name String 厂商名称 最小长度:0 最大长度:64 model String 产品型号 最小长度:0 最大长度:64 product_type Integer 产品类型,0-普通产品(不支持子设备) 1-网关产品 最小值:0 最大值:10 description String 产品描述,长度0-200 最小长度:0 最大长度:200 protocol_type Integer 产品的协议类型 0-mqtt 1-CoAP 2-modbus 4-opcua 5-扩展协议 最小值:0 最大值:10 device_type String 产品的设备类型(默认Default) 最小长度:0 最大长度:64 version String 产品版本 最小长度:0 最大长度:64 created_user CreatedUser object 创建时的用户 last_updated_user LastUpdatedUser object 最后更新时的用户 created_datetime Long 创建时间,timestamp(ms),使用UTC时区 最小值:1 最大值:99999999999999999 app_name String 应用名称 最小长度:0 最大长度:256 data_format Integer data_format 0-JSON 1-USER_DEFINED 最小值:1 最大值:99999999999999999 status Integer 产品状态 0-启用 1-禁用 最小值:0 最大值:1 缺省值:0 support_mqs_topic Integer 命令响应topic状态 0-启用 1-禁用 最小值:0 最大值:1 缺省值:0 表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
  • 响应示例 状态码: 200 OK { "permissions" : [ "read", "access", "delete", "modify" ], "id" : 120671, "product_serial" : "Dd1bRt122894", "app_id" : "a1503e51-46f7-4d23-8617-7cb2d28dde98", "name" : "pro-opcua", "manufacturer_id" : "pro-opcua", "manufacturer_name" : "pro-opcua", "model" : "pro-opcua", "product_type" : 0, "description" : "opcua product", "protocol_type" : 4, "device_type" : "default", "version" : "version", "created_datetime" : 1607481372416, "last_updated_datetime" : 1607481372416, "app_name" : "app-link", "data_format" : 0, "created_user" : { "user_id" : "6546435432432", "user_name" : "user1" }, "last_updated_user" : { "user_id" : "6546435432432", "user_name" : "user1" } } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-product.update]. Parameter is [product_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 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" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:100000 表3 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 产品名称,创建产品时租户内唯一,长度1-64,仅支持中文,英文字母,数字,下划线和中划线 最小长度:0 最大长度:64 description 否 String 产品描述,长度0-200 最小长度:0 最大长度:200 manufacturer_id 是 String 产品供应商ID,支持英文大小写,数字,下划线和中划线,长度2-50 最小长度:0 最大长度:64 manufacturer_name 是 String 厂商名称,支持长度2-64 最小长度:0 最大长度:64 model 是 String 产品型号,支持英文大小写,数字,下划线,中划线和空格(首尾空格会被忽略),长度2-50 最小长度:0 最大长度:64 device_type 是 String 产品的设备类型(默认Default Type) 最小长度:0 最大长度:64 version 否 String 模型版本 最小长度:0 最大长度:64 status 否 Integer 产品状态 0-启用 1-禁用 最小值:0 最大值:1 缺省值:0 support_mqs_topic 否 Integer 命令响应topic状态 0-启用 1-禁用 最小值:0 最大值:1
  • 请求示例 为指定规则添加目标端数据源,目标类型为MQS,目标端不支持SSL加密 { "destination_type" : 0, "app_id" : "ef3845be-091a-4ab5-869a-9de0025e2165", "destination_name" : "destination", "topic" : "/target_topic1", "server" : "xx.xx.xx.xx", "token" : "sd123r12312w12wdrfvgrt4t34t", "tag" : "tag1", "mqs_sasl_ssl" : false, "user_name" : "user1", "password" : "AS223ds4320d" }
  • 响应示例 状态码: 201 Created { "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.save]. Parameter is [rule_oid]. Processor is [path].", "request_id" : "cb39e78a-afd3-4e04-901d-70468b1c23dc-1619602712496-cnnorth7a-P-romalink-service01" } 状态码: 404 Not Found { "error_code" : "ROMA.00110006", "error_msg" : "The resource does not exist. Check whether the resource ID 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" }
  • 响应参数 状态码: 201 表4 响应Body参数 参数 参数类型 描述 destination_id Integer 目标数据源ID 最小值:1 最大值:99999999999999999 destination_type Integer 操作类型,枚举值:0-目标端为本ROMA实例内MQS; 7-目标端为设备 最小值:0 最大值:10 app_id String 应用ID,目标端为0时需明确对方的APP_ID 最小长度:0 最大长度:64 destination_name String 目标数据源名称 最小长度:0 最大长度:64 topic String 目标数据源主题 最小长度:0 最大长度:64 server String 目标端数据源服务 最小长度:0 最大长度:200 token String 目标端数据源token 最小长度:0 最大长度:1000 tag String 目标数据源标签 最小长度:0 最大长度:200 mqs_sasl_ssl Boolean 目标端数据源MQS的SASL字段是否需要支持SSL加密 user_name String 目标数据源用户名 最小长度:0 最大长度:80 password String 目标数据源密码 最小长度: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
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:100000 表3 请求Body参数 参数 是否必选 参数类型 描述 destination_type 是 Integer 操作类型,枚举值:0-目标端为ROMA实例MQS; 1-目标端为本ROMA实例内FI KAFKA数据源; 2-目标端为本ROMA实例内MRS KAFKA数据源; 3-目标端为本ROMA实例内KAFKA数据源; 6-目标端为DIS数据源;7-目标端为设备; 最小值:0 最大值:7 app_id 否 String 应用ID,destination_type值为0时,为MQS的topic所属集成应用APP_ID;destination_type值为1、2或3时,为对应KAFKA类数据源所属集成应用APP_ID,destination_type值为7时,为设备所属集成应用APP_ID 最小长度:0 最大长度:64 destination_name 否 String 目标数据源名称,destination_type值为1、2或3时, 为对应KAFKA类数据源的名称 最小长度:0 最大长度:64 topic 是 String 目标数据源主题,destination_type值为0时,从MQS服务中获取已有topic;destination_type值为1、2或3时, 从对应KAFKA类数据源中获取已有topic 最小长度:0 最大长度:64 server 否 String 目标端数据源服务,如下情况时server字段必填:destination_type值为0时, 为MQS连接地址; destination_type值为1、2或3时, 为KAFKA类数据源的连接地址,destination_type值为7时,为设备所属产品的产品名 最小长度:0 最大长度:64 token 否 String 目标端数据源token,destination_type值为7时,为设备的ClientID 最小长度:0 最大长度:1000 tag 否 String 目标数据源标签,destination_type值为7时,为设备的设备名 最小长度:0 最大长度:64 mqs_sasl_ssl 否 Boolean 目标端数据源MQS的SASL字段是否需要支持SSL加密 user_name 否 String 目标数据源用户名 最小长度:0 最大长度:64 password 否 String 目标数据源密码 最小长度:0 最大长度:64
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 mapping_id String 映射唯一ID 最小长度:1 最大长度:64 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 404 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
  • 响应示例 状态码: 200 OK { "datasource_id" : "acd5502992254b3ab2dfd5b6900159db", "datasource_name" : "TY_KAFKA", "datasource_type" : "KAFKA", "content" : { "project_id" : "c53626012ba84727b938ca8bf03108ef", "type" : "KAFKA", "instance_id" : "05173009-2e5f-4773-8303-8e05cc9c9302", "broker" : "10.01.01.01:9092", "ssl_username" : "1", "ssl_password" : "******", "ssl_enable" : true }, "create_time" : 1616784907101, "update_time" : 1619650507230, "app_id" : "141bbdf5-131e-4111-898d-5a6292a2113b", "app_name" : "app-zhe", "instance_id" : "05173009-2e5f-4773-8303-8e05cc9c9302", "remark" : "No change.", "app_permission" : [ "read", "access", "delete", "modify" ] }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 app_quota_id String 客户端配额编号 name String 配额名称。支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3-255字符 call_limits Integer 客户端配额的访问次数限制 time_unit String 限定时间单位:SECOND:秒、MINUTE:分、HOURE:时、DAY:天 time_interval Integer 配额的限定时间值 remark String 参数说明和描述 最大长度:255 reset_time String 首次配额重置时间点,不配置默认为首次调用时间计算 create_time String 创建时间 bound_app_num Integer 配额策略已绑定应用数量 状态码: 400 表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 { "app_quota_id" : "c900c5612dbe451bb43cbcc49cfaf2f3", "call_limits" : 1000, "create_time" : "2020-09-19T07:27:47Z", "name" : "ClientQuota_demo", "reset_time" : "2020-09-20 00:00:00", "time_interval" : 1, "time_unit" : "DAY" } 状态码: 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.3093", "error_msg" : "App quota c900c5612dbe451bb43cbcc49cfaf2f3 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 datasource String 数据源配额 api String 后端api配额 scripts String 脚本配额 datasource_used String 已使用的数据源数量 api_used String 已使用的后端api数量 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
共100000条