华为云用户手册

  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 total Integer 总数。 size Integer 本次返回数量。 items Array of NotificationResponseBody objects 订阅管理列表。 表5 NotificationResponseBody 参数 参数类型 描述 notification_id Integer 订阅ID。 type Integer 订阅类型,0:设备上线通知类型,1:设备下线通知类型,2:设备添加通知类型, 3:设备删除通知类型,4:设备变更通知类型。 status Integer 订阅管理状态,0:启用,1:停用。 topic String 订阅的Topic名称。 instance_id String 实例ID。 app_id String 应用ID。 状态码: 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。
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "features" : [ { "config" : "on", "enable" : true, "id" : "db9a9260cd3e4a16a9b5747a65d3ffaa", "instance_id" : "f0fa1789-3b76-433b-a787-9892951c620e", "name" : "app_api_key", "update_time" : "2020-08-24T01:17:31.041984Z" } ] } 状态码: 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.3030", "error_msg" : "The instance does not exist;id:f0fa1789-3b76-433b-a787-9892951c620e" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 features Array of FeatureInfoV2 objects 实例特性列表 表5 FeatureInfoV2 参数 参数类型 描述 id String 特性编号 name String 特性名称 enable Boolean 是否开启特性 config String 特性参数配置 instance_id 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 错误描述
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 FormData参数 参数 是否必选 参数类型 描述 source_ds_id 是 String 源端数据源ID。 source_group 否 String 源表分组。 target_ds_id 是 String 目标端数据源ID。 target_group 否 String 目标表分组。 task_id 否 String 任务唯一标识,任务ID。 ext_info 否 String 额外标识。 task_type 否 Integer 1:实时任务,2:定时任务。 mapping_prefix 否 String 映射前缀(根据前后缀组合将源端表映射至匹配目标端表名称 = 前缀(可选) + 源端表名称 + 后缀(可选))。 mapping_suffix 否 String 映射后缀(根据前后缀组合将源端表映射至匹配目标端表名称 = 前缀(可选) + 源端表名称 + 后缀(可选))。 target_select_mapping_tables 否 String 目标端映射范围(选择多表用半角,分隔:schema.table1,schema.table2;选择全库:schema.*)。 source_select_mapping_tables 否 String 源端映射范围(选择多表用半角,分隔:schema.table1,schema.table2;选择全库:schema.*)。
  • 响应示例 状态码: 200 ok [ { "target_instance_id" : "62afe8b5-6bf0-40ea-b4f6-6b06a39be754", "source_app_id" : "c24d7cf4-0e5a-416c-b197-30e6696b98f2", "mapping" : [ { "ext_info" : { "server_id" : 1665647763438 }, "id" : "f1c1d7f3afc94c1c995628df55939ced", "mapping" : [ { "is_add_boolean_mapping" : false, "is_add_custom_mapping" : false, "is_add_date_mapping" : false, "is_add_fdi_uuid_mapping" : false, "is_add_mapping" : false, "source_column" : "c1", "source_column_length" : "10", "source_column_type" : "INT", "target_column" : "c1", "target_column_length" : "10", "target_column_type" : "INT" }, { "is_add_boolean_mapping" : false, "is_add_custom_mapping" : false, "is_add_date_mapping" : false, "is_add_fdi_uuid_mapping" : false, "is_add_mapping" : false, "source_column" : "c2", "source_column_length" : "100", "source_column_type" : "VARCHAR", "target_column" : "c2", "target_column_length" : "100", "target_column_type" : "VARCHAR" } ], "mapping_percent" : 100, "project_id" : "0ab7e64afd80d2822fe0c00d26395a1f", "source_columns" : [ { "field_length" : "10", "field_name" : "c1", "field_type" : "INT", "null_able" : "0", "unique" : "1" }, { "field_length" : "100", "field_name" : "c2", "field_type" : "VARCHAR", "null_able" : "1", "unique" : "0" } ], "source_ds_id" : "984edcd6735c4988b15f6a497cb97c5a", "source_group" : "SOURCE_GROUP1", "source_table" : "test.t1", "status" : "ADD", "target_columns" : [ { "field_length" : "10", "field_name" : "c1", "field_type" : "INT", "null_able" : "0", "unique" : "0" }, { "field_length" : "100", "field_name" : "c2", "field_type" : "VARCHAR", "null_able" : "1", "unique" : "0" } ], "target_ds_id" : "dd14c908aa4d446b85949550f523ff83", "target_group" : "TARGET_GROUP1", "target_table" : "fditest.t1", "task_id" : "e530a006683d400e8b3bac1d7c00952b", "updated_time" : 1665647764511 } ], "target_ds_name" : "fdi_MySQL_zqx_205", "target_app_id" : "c24d7cf4-0e5a-416c-b197-30e6696b98f2", "source_instance_id" : "62afe8b5-6bf0-40ea-b4f6-6b06a39be754", "task_id" : "e530a006683d400e8b3bac1d7c00952b", "source_ds_type" : "MYSQL", "ext_info" : { "server_id" : 1665647763438 }, "target_ds_type" : "MYSQL", "total" : 1, "source_group" : "SOURCE_GROUP1", "source_ds_id" : "984edcd6735c4988b15f6a497cb97c5a", "target_group" : "TARGET_GROUP1", "source_ds_name" : "mysql8.0.30", "target_ds_id" : "dd14c908aa4d446b85949550f523ff83" } ]
  • 响应参数 状态码: 201 表5 响应Body参数 参数 参数类型 描述 name String 自定义认证的名称。 长度为3 ~ 64位的字符串,字符串由中文、英文字母、数字、“_”组成,且只能以英文或中文开头。 type String 自定义认证类型 FRONTEND:前端 BACKEND:后端 authorizer_type String 自定义认证函数类型: LD:自定义后端函数 FUNC:函数服务函数 authorizer_uri String 函数地址。 注意:使用自定义后端的函数API,API请求方法必须为POST,且API状态必须为已部署。 network_type String 对接函数的网络架构类型 V1:非VPC网络架构 V2:VPC网络架构 注意:该字段在APIC场景下不生效 authorizer_version String 函数版本。 当函数别名URN和函数版本同时传入时,函数版本将被忽略,只会使用函数别名URN authorizer_alias_uri String 函数别名地址。 当函数别名URN和函数版本同时传入时,函数版本将被忽略,只会使用函数别名URN identities Array of Identity objects 认证来源 ttl Integer 缓存时间 user_data String 用户数据 ld_api_id String 自定义后端服务ID。 自定义认证函数类型为LD时必填 need_body Boolean 是否发送body auth_downgrade_enabled Boolean 宽松模式,连接函数鉴权服务失败或者函数鉴权服务返回5XX,网关是否接受客户端请求。 id String 自定义认证编号 create_time String 创建时间 roma_app_id String 自定义认证所属应用编号 roma_app_name String 自定义认证所属应用名称 表6 Identity 参数 参数类型 描述 name String 参数名称。 支持数字,英文,下划线,中划线,点,且只能以数字或英文开头。 location String 参数位置 validation String 参数校验表达式,默认为null,不做校验 状态码: 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 错误描述
  • 响应示例 状态码: 201 Created { "name" : "Authorizer_demo", "type" : "FRONTEND", "authorizer_type" : "LD", "authorizer_uri" : "/test", "network_type" : "", "authorizer_version" : "", "authorizer_alias_uri" : "", "identities" : [ { "name" : "header", "location" : "HEADER" } ], "ttl" : 5, "id" : "0d982c1ac3da493dae47627b6439fc5c", "create_time" : "2020-09-23T02:32:10.354159293Z", "need_body" : true } 状态码: 400 Bad Request { "error_code" : "APIG.2011", "error_msg" : "Invalid parameter value,parameterName:type. 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.3019", "error_msg" : "The function URN does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 请求示例 创建一个自定义认证,认证类型为前端认证,函数类型为自定义后端函数,认证来源使用Header参数 { "name" : "Authorizer_demo", "type" : "FRONTEND", "authorizer_type" : "LD", "ld_api_id" : "6f8e61317e4e4fbf8e8220cc19fcced9", "authorizer_uri" : "/test", "network_type" : "", "authorizer_version" : "", "authorizer_alias_uri" : "", "identities" : [ { "name" : "header", "location" : "HEADER" } ], "ttl" : 5 }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 自定义认证的名称。 长度为3 ~ 64位的字符串,字符串由中文、英文字母、数字、“_”组成,且只能以英文或中文开头。 type 是 String 自定义认证类型 FRONTEND:前端 BACKEND:后端 authorizer_type 是 String 自定义认证函数类型: LD:自定义后端函数 FUNC:函数服务函数 authorizer_uri 是 String 函数地址。 注意:使用自定义后端的函数API,API请求方法必须为POST,且API状态必须为已部署。 network_type 否 String 对接函数的网络架构类型 V1:非VPC网络架构 V2:VPC网络架构 注意:该字段在APIC场景下不生效 authorizer_version 否 String 函数版本。 当函数别名URN和函数版本同时传入时,函数版本将被忽略,只会使用函数别名URN authorizer_alias_uri 否 String 函数别名地址。 当函数别名URN和函数版本同时传入时,函数版本将被忽略,只会使用函数别名URN identities 否 Array of Identity objects 认证来源 ttl 否 Integer 缓存时间 user_data 否 String 用户数据 ld_api_id 否 String 自定义后端服务ID。 自定义认证函数类型为LD时必填 need_body 否 Boolean 是否发送body auth_downgrade_enabled 否 Boolean 宽松模式,连接函数鉴权服务失败或者函数鉴权服务返回5XX,网关是否接受客户端请求。 表4 Identity 参数 是否必选 参数类型 描述 name 是 String 参数名称。 支持数字,英文,下划线,中划线,点,且只能以数字或英文开头。 location 是 String 参数位置 validation 否 String 参数校验表达式,默认为null,不做校验
  • 响应示例 状态码: 200 OK { "name" : "throttle_demo", "create_time" : "2020-07-31T08:44:02.205366118Z", "remark" : "Throttling Policy 1", "type" : 1, "time_interval" : 1, "ip_call_limits" : 600, "app_call_limits" : 300, "time_unit" : "SECOND", "api_call_limits" : 800, "id" : "3437448ad06f4e0c91a224183116e965", "user_call_limits" : 0, "enable_adaptive_control" : "FALSE", "bind_num" : 0, "is_inclu_special_throttle" : 2 } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3005", "error_msg" : "Request throttling policy 3437448ad06f4e0c91a224183116e965 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 app_call_limits Integer APP流量限制是指一个API在时长之内被每个APP访问的次数上限,该数值不超过用户流量限制值。输入的值不超过2147483647。正整数。 name String 流控策略名称。支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3 ~ 64字符。 说明: 中文字符必须为UTF-8或者unicode编码。 time_unit String 流控的时间单位 remark String 流控策略描述字符长度不超过255。 说明: 中文字符必须为UTF-8或者unicode编码。 api_call_limits Integer API流量限制是指时长内一个API能够被访问的次数上限。该值不超过系统默认配额限制,系统默认配额为200tps,用户可根据实际情况修改该系统默认配额。输入的值不超过2147483647。正整数。 type Integer 流控策略的类型 1:基础,表示绑定到流控策略的单个API流控时间内能够被调用多少次。 2:共享,表示绑定到流控策略的所有API流控时间内能够被调用多少次。 enable_adaptive_control String 是否开启动态流控: TRUE FALSE 暂不支持 user_call_limits Integer 用户流量限制是指一个API在时长之内每一个用户能访问的次数上限,该数值不超过API流量限制值。输入的值不超过2147483647。正整数。 time_interval Integer 流量控制的时长单位。与“流量限制次数”配合使用,表示单位时间内的API请求次数上限。输入的值不超过2147483647。正整数。 ip_call_limits Integer 源IP流量限制是指一个API在时长之内被每个IP访问的次数上限,该数值不超过API流量限制值。输入的值不超过2147483647。正整数。 id String 流控策略的ID bind_num Integer 流控绑定的API数量 is_inclu_special_throttle Integer 是否包含特殊流控配置 1:包含 2:不包含 create_time String 创建时间 状态码: 401 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 id String 编号 name String 名称 remark String 描述 creator String APP的创建者 USER:用户自行创建 MARKET:云市场分配 暂不支持MARKET update_time String 更新时间 app_key String APP的key app_secret String 密钥 register_time String 注册时间 status Integer 状态 1: 有效 app_type String APP的类型: apig:存量apig应用,不推荐使用 roma:roma集成应用 roma_app_type String ROMA_APP的类型: subscription:订阅应用 integration:集成应用 状态码: 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 错误描述
  • 响应示例 状态码: 200 OK { "creator" : "USER", "update_time" : "2020-08-03T13:09:13Z", "app_key" : "ee8f878c252747028f07eb116c2cd91b", "name" : "app_demo", "remark" : "app example", "id" : "356de8eb7a8742168586e5daf5339965", "app_secret" : "416**********ab8", "register_time" : "2020-08-03T13:09:13Z", "status" : 1, "app_type" : "apig" } 状态码: 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.3002", "error_msg" : "App 356de8eb7a8742168586e5daf5339965 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 请求示例 为指定自定义后端创建脚本,后端类型为函数后端,脚本类型为SQL { "api_type" : "function", "scripts" : [ { "type" : "SQL", "object_name" : "fun", "content" : "ZnVuY3Rpb24gZXhlY3V0ZShkYXRhKSB7CiAgICByZXR1cm4gIkhlbGxvIHdvcmxkISIKfQ==" } ] }
  • 响应示例 状态码: 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" : [ { "type" : "SQL", "object_name" : "fun", "content" : "ZnVuY3Rpb24gZXhlY3V0ZShkYXRhKSB7CiAgICByZXR1cm4gIkhlbGxvIHdvcmxkISIKfQ==", "created_time" : "2020-09-19T06:29:35Z", "modified_time" : "2020-09-19T06:29:35Z" } ], "status" : 1, "type" : "function", "version" : "1.0.1" } 状态码: 400 Bad Request { "error_code" : "APIG.2011", "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.3081", "error_msg" : "authorizer with id: 0d982c1ac3da493dae47627b6439fc5c not found" } 状态码: 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参数 参数 是否必选 参数类型 描述 api_type 否 String API类型 data:数据API function:函数API scripts 否 Array of LdApiScriptBase objects API脚本信息列表 表4 LdApiScriptBase 参数 是否必选 参数类型 描述 ds_id 否 String 数据源编号,当api_type = data时,必选 ds_name 否 String 数据源名称 ds_type 否 String 数据源类型: oracle:oracle数据源类型 mysql:mysql数据源类型 mongodb:mongodb数据源类型 redis:redis数据源类型 postgresql:postgresql/opengauss数据源类型 hive:hive数据源类型 mssql:sqlserver数据源类型 sqlserver:sqlserver数据源类型 dws:dws数据源类型 gauss100:gauss100数据源类型 zenith:zenith数据源类型 hana: hana数据源类型 clickhouse: clickhouse数据源类型 mrshive: mrshive数据源类型(tag:Site_hybrid) dm : dameng数据源类型(tag:hcs) opengauss : opengauss数据源类型(tag:hcs) type 否 String 脚本类型 SQL:sql语句 SP:存储过程 object_name 是 String 返回对象。 content 是 String API脚本内容 请对脚本进行base64编码 enable_result_paging 否 Boolean 数据脚本是否结果分页,当api_type = data时有效 enable_preparestatement 否 Boolean 数据脚本是否预编译,当api_type = data时有效
  • 响应示例 状态码: 200 OK { "total" : 2, "size" : 2, "apis" : [ { "run_env_name" : "RELEASE", "group_name" : "api_group_001", "publish_id" : "9f27d1dc4f4242a9abf88e563dbfc33d", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "name" : "Api_mock", "remark" : "Mock backend API", "run_env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID", "id" : "3a955b791bd24b1c9cd94c745f8d1aad", "type" : 1, "auth_type" : "IAM", "req_uri" : "/test/mock" }, { "run_env_name" : "RELEASE", "group_name" : "APIGroup_d00511069", "publish_id" : "0c613568c8644a1b92172156f77a5759", "group_id" : "d7d0b9a54469424f942e16a6b6026936", "name" : "API_nevj", "run_env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID", "id" : "9e07bc00a1864ab4aafd4a23d19dd1c2", "type" : 1, "auth_type" : "APP", "req_uri" : "/fdasf" } ] } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:throttle_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.3005", "error_msg" : "Request throttling policy 3437448ad06f4e0c91a224183116e965 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 apis Array of ApiForThrottle objects 本次查询返回的API列表 表5 ApiForThrottle 参数 参数类型 描述 auth_type String API的认证方式 run_env_name String 发布的环境名 group_name String API所属分组的名称 publish_id String 发布记录的编号 group_id String API所属分组的编号 name String API名称 remark String API描述 run_env_id String 发布的环境id id String API编号 req_uri String API的请求地址 tags Array of strings API绑定的标签,标签配额默认10条,可以联系技术调整。 type Integer API类型 throttle_apply_id String 与流控策略的绑定关系编号 throttle_name String 绑定的流控策略名称 apply_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 错误描述
  • 响应示例 状态码: 201 Created { "update_time" : "2020-07-31T06:55:55.383169299Z", "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:55.383169068Z", "status" : 1, "is_default" : 2, "version" : "V1", "sl_domain_access_enabled" : true } 状态码: 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" }
  • 响应参数 状态码: 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_domain_access_enabled Boolean 调试域名是否可以访问,true表示可以访问,false表示禁止访问 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 verified_client_certificate_enabled Boolean 是否开启客户端证书校验。只有绑定证书时,该参数才生效。当绑定证书存在trusted_root_ca时,默认开启;当绑定证书不存在trusted_root_ca时,默认关闭。 is_has_trusted_root_ca Boolean 是否存在信任的根证书CA。当绑定证书存在trusted_root_ca时为true。 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:全局 状态码: 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编码。 remark 否 String API分组描述。 说明: 中文字符必须为UTF-8或者unicode编码。 roma_app_id 否 String 分组归属的集成应用编号。 分组版本V2时必填。 version 否 String 分组版本 V1:全局分组 V2:应用级分组
  • 响应示例 状态码: 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" }
  • 响应参数 状态码: 201 表4 响应Body参数 参数 参数类型 描述 variable_value String 变量值支持英文字母、数字、英文格式的下划线、中划线,斜线(/)、点、冒号,1 ~ 255个字符。 env_id String 环境编号 group_id String API分组编号 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 错误描述
  • 功能介绍 将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 环境编号 group_id 是 String API分组编号 variable_name 是 String 变量名,支持英文字母、数字、英文格式的下划线、中划线,必须以英文字母开头,3~32个字符。在API定义中等于#Name的值#部分(区分大小写),发布到环境里的API被变量值替换。 说明: 中文字符必须为UTF-8或者unicode编码。
  • 响应示例 状态码: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 }
  • 请求示例 创建一个数据集成普通任务,任务类型为定时,手动配置映射 { "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 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}" }
  • 请求示例 为指定规则添加目标端数据源,目标类型为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" : "**********" }
  • 响应示例 状态码: 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" }
共100000条
提示

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