华为云用户手册

  • 请求示例 重发偏移量为4的消息,并为该消息添加指定消息头 POST https://{endpoint}/v2/{project_id}/mqs/instances/{instance_id}/messages/action?action_id=resend { "topic" : "topic-test", "partition" : 0, "message_offset" : 4, "consumer_key" : "keyA" }
  • 响应参数 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 400 Bad Request { "error_code" : "APIG.2011", "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.3084", "error_msg" : "The livedata API does not exist, id: bd42841c20184da6bbf457c6d8a06e37" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应示例 状态码: 201 OK { "applies" : [ { "app_id" : "98df09fb-d459-4cbf-83a7-2b55ca6f3d5d", "app_quota_id" : "c900c5612dbe451bb43cbcc49cfaf2f3", "bound_time" : "2020-09-19T07:43:11.948178051Z" } ] } 状态码: 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.3093", "error_msg" : "The App quota c900c5612dbe451bb43cbcc49cfaf2f3 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 201 表4 响应Body参数 参数 参数类型 描述 applies Array of AppQuotaAppBinding objects 客户端应用与客户端配额绑定列表 表5 AppQuotaAppBinding 参数 参数类型 描述 app_quota_id String 客户端配额编号 app_id String 客户端应用编号 bound_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 { "users" : [ { "name" : "chenjunjie", "id" : "06d9106f3b000f241f83c010d6b78c81" }, { "name" : "fdi-dm", "id" : "076d742f028025191fe9c0109200f5c8" } ] } 状态码: 403 Forbidden { "error_code" : "ROMA.00000101", "error_msg" : "error summary", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 users Array of CandidatesUser objects 候选用户成员列表。 表5 CandidatesUser 参数 参数类型 描述 name String 用户名称。 id String 用户ID。 状态码: 403 表6 响应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参数 参数 是否必选 参数类型 描述 call_limits 是 Integer 流控时间内特殊对象能够访问API的最大次数限制 最小值:1 object_id 是 String 特殊APP的编号或特殊租户的账号ID 最小长度:1 最大长度:65 object_type 是 String 特殊对象类型
  • 响应参数 状态码: 201 表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 错误描述
  • 响应示例 状态码: 201 Created { "call_limits" : 150, "app_name" : "app_demo", "object_name" : "app_demo", "object_id" : "356de8eb7a8742168586e5daf5339965", "throttle_id" : "3437448ad06f4e0c91a224183116e965", "apply_time" : "2020-08-04T02:40:56.717710961Z", "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.3004", "error_msg" : "App 356de8eb7a8742168586e5daf5339965 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 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 错误描述
  • 响应示例 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:domain_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.3020", "error_msg" : "The URL domain 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参数 参数 是否必选 参数类型 描述 certificate_ids 是 Array of strings 证书的id集合 verified_client_certificate_enabled 否 Boolean 是否开启客户端证书校验。当绑定证书存在trusted_root_ca时,默认开启;当绑定证书不存在trusted_root_ca时,默认关闭。
  • 请求示例 修改指定数据集成普通任务,修改源端和目标端配置 { "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\":\"\",\"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,\"targetColumnLength\":\"11\",\"isAddMapping\":false,\"isAddBooleanMapping\":false,\"sourceColumnLength\":\"11\",\"targetColumn\":\"id\",\"sourceColumnType\":\"Int\",\"isAddFDIUUIDMapping\":false,\"sourceColumn\":\"id\"},{\"targetColumnType\":\"VARCHAR\",\"isAddDateMapping\":false,\"targetColumnLength\":\"25\",\"isAddMapping\":false,\"isAddBooleanMapping\":false,\"sourceColumnLength\":\"25\",\"targetColumn\":\"name\",\"sourceColumnType\":\"Varchar\",\"isAddFDIUUIDMapping\":false,\"sourceColumn\":\"name\"},{\"targetColumnType\":\"INT\",\"isAddDateMapping\":false,\"targetColumnLength\":\"11\",\"isAddMapping\":false,\"isAddBooleanMapping\":false,\"sourceColumnLength\":\"11\",\"targetColumn\":\"deptId\",\"sourceColumnType\":\"Int\",\"isAddFDIUUIDMapping\":false,\"sourceColumn\":\"deptId\"},{\"targetColumnType\":\"INT\",\"isAddDateMapping\":false,\"targetColumnLength\":\"11\",\"isAddMapping\":false,\"isAddBooleanMapping\":false,\"sourceColumnLength\":\"11\",\"targetColumn\":\"age\",\"sourceColumnType\":\"Int\",\"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}" }
  • 响应示例 状态码: 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.queryCommandResponseDetail]. Parameter is [command_id]. Processor is [path].", "request_id" : "cb39e78a-afd3-4e04-901d-70468b1c23dc-1619602712496-cnnorth7a-P-romalink-service01" } 状态码: 404 Not Found { "error_code" : "ROMA.00110006", "error_msg" : "The resource does not exist. Check whether the resource ID 1 is correct.", "request_id" : "13984193-ca65-4954-9b7f-4b7d680399d6-1619678681445-cnnorth7a-P-romalink-service01" } 状态码: 500 Internal Server Error { "error_code" : "ROMA.00110002", "error_msg" : "The instance does not exist. project_id: 397cd10b30544c588b2f4a56d83856c4, instance_id: f3bb386a-23ec-47aa-9943-4c60ac658611", "request_id" : "c8c06d0a-be92-4fdf-9d10-bc20131ab158-1619593104919-cnnorth7a-P-romalink-service01" }
  • 响应参数 状态码: 200 表3 响应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的枚举值数组,使用逗号分隔 最小长度:0 最大长度:2000 enum_dict Object 当数据类型为boolean枚举值时填写json格式数据,形如"enum_dict":{"0":"xxx","1":"xxx"} 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 404 表5 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 500 表6 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64
  • 响应示例 状态码: 200 OK { "id" : "5f918d104dc84480a75166ba99efff21", "tags" : [ "webApi" ], "arrange_necessary" : 2, "backend_type" : "HTTP", "auth_type" : "APP", "auth_opt" : { "app_code_auth_type" : "DISABLE" }, "backend_api" : { "update_time" : "2020-08-02T16:32:47.077028841Z", "vpc_channel_status" : 1, "vpc_channel_info" : { "vpc_channel_id" : "56a7d7358e1b42459c9d730d65b14e59", "vpc_channel_proxy_host" : "www.example.com" }, "url_domain" : "56a7d7358e1b42459c9d730d65b14e59", "req_protocol" : "HTTPS", "id" : "1ce8fda3586d4371bd83c955df37e102", "req_method" : "GET", "register_time" : "2020-07-31T12:42:51Z", "req_uri" : "/test/benchmark", "timeout" : 5000, "status" : 1 }, "cors" : false, "status" : 1, "group_name" : "api_group_001", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "group_version" : "V1", "match_mode" : "NORMAL", "name" : "Api_http", "req_protocol" : "HTTPS", "req_method" : "GET", "req_uri" : "/test/http", "type" : 1, "version" : "V0.0.1", "result_normal_sample" : "Normal response example", "result_failure_sample" : "Failure response example", "register_time" : "2020-07-31T12:42:51Z", "update_time" : "2020-08-02T16:32:47.046288842Z", "remark" : "Web backend API", "backend_params" : [ { "name" : "X-CONSTANT-HEADER", "value" : "demo", "location" : "HEADER", "origin" : "CONSTANT", "remark" : "constant_demo", "id" : "8cb2eba19e7a4423a4e835647a8b8d76" }, { "name" : "app-id", "value" : "$context.appId", "location" : "HEADER", "origin" : "SYSTEM", "remark" : "Application ID of the invoker.", "id" : "216ddda836e74d528f364ff589d9dd21" } ] } 状态码: 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.3002", "error_msg" : "API 5f918d104dc84480a75166ba99efff21 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 请求示例 修改指定API的配置信息,匹配模式改为绝对匹配,认证方式改为APP认证,Web后端改为使用负载通道,并新增后端参数 { "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "match_mode" : "NORMAL", "name" : "Api_http", "auth_type" : "APP", "backend_type" : "HTTP", "backend_api" : { "vpc_channel_status" : 1, "vpc_channel_info" : { "vpc_channel_id" : "56a7d7358e1b42459c9d730d65b14e59", "vpc_channel_proxy_host" : "www.example.com" }, "req_protocol" : "HTTPS", "req_method" : "GET", "req_uri" : "/test/benchmark", "timeout" : 5000 }, "cors" : false, "req_protocol" : "HTTPS", "req_uri" : "/test/http", "remark" : "Web backend API", "type" : 1, "req_method" : "GET", "result_normal_sample" : "Normal response example", "result_failure_sample" : "Failure response example", "backend_params" : [ { "name" : "X-CONSTANT-HEADER", "value" : "demo", "location" : "HEADER", "origin" : "CONSTANT", "remark" : "constant_demo" }, { "name" : "app-id", "value" : "$context.appId", "location" : "HEADER", "origin" : "SYSTEM", "remark" : "Application ID of the invoker." } ], "tags" : [ "webApi" ] }
  • 响应示例 状态码: 200 OK { "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" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 variable_value 是 String 变量值支持英文字母、数字、英文格式的下划线、中划线,斜线(/)、点、冒号,1 ~ 255个字符。
  • 响应参数 状态码: 200 表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 错误描述
  • 响应示例 状态码: 200 OK { "size" : 1, "items" : [ { "id" : 14, "name" : "group_name", "parent_id" : 0, "children" : [ ] } ] } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-device-groups.selectGroupNodeTree]. Parameter is [app_id]. Processor is [query].", "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" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回数量 最小值:1 最大值:9999 items Array of GroupTreeResponse objects 设备分组信息 数组长度:0 - 9999 表5 GroupTreeResponse 参数 参数类型 描述 id Integer 分组id 最小值:1 最大值:99999999 name String 分组名称 最小长度:0 最大长度:200 parent_id Integer 父分组id 最小值:1 最大值:99999999 children Array of GroupTreeResponse objects 子分组 数组长度:0 - 9999 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 dispatch_id String 调度计划ID 最小长度:1 最大长度:64 task_id String 调度计划关联的任务ID 最小长度:1 最大长度:64 start_datetime Integer 调度计划的执行开始时间 最小值:0 最大值:99999999999999999 period String 调度计划执行周期的时间单位,当使用cron表达式时,为空 MIN (分钟) HOUR (小时) DAY (日) WEEK (周) MON (月) 最小长度:0 最大长度:36 dispatch_interval Integer 调度计划的执行间隔时间周期 最小值:1 最大值:59 created_date Integer 调度计划的创建时间 最小值:1 最大值:99999999999999999 last_modified_date Integer 调度计划最近一次的修改时间 最小值:1 最大值:99999999999999999 remark String 调度计划的备注信息 最小长度:8 最大长度:36 use_quartz_cron Boolean 调度计划是否使用cron表达式,允许如下值: true (使用cron表达式) false (不使用cron表达式) 最小长度:4 最大长度:16 cron String 调度计划的cron表达式 最小长度:8 最大长度:255 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
  • 响应示例 状态码: 200 OK { "dispatch_id" : "a0f7fa9897da423dadbe8391d7ea7a43", "task_id" : "15366328208d4d77b76532fe9f4006a6", "start_datetime" : 1605339505609, "period" : "DAY", "dispatch_interval" : 1, "created_date" : 1605311230685, "last_modified_date" : 1605311230685, "remark" : "123", "use_quartz_cron" : false } 状态码: 400 Bad Request { "code" : 400, "reason" : { "error_code" : "FDI.3149", "error_msg" : "The task ID is empty." } } 状态码: 404 Not Found { "code" : 404, "reason" : { "error_code" : "FDI.3180", "error_msg" : "This task is not in the project." } }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 start_datetime 否 Integer 调度计划的执行开始时间 最小值:0 最大值:99999999999999999 period 否 String 调度计划执行周期的时间单位,当使用cron表达式时,为空 MIN (分钟) HOUR (小时) DAY (日) WEEK (周) MON (月) 最小长度:0 最大长度:36 dispatch_interval 否 Integer 调度计划的执行间隔时间周期 最小值:1 最大值:59 remark 否 String 调度计划的备注信息 最小长度:8 最大长度:36 use_quartz_cron 否 Boolean 调度计划是否使用cron表达式,允许如下值: true (使用cron表达式) false (不使用cron表达式) 最小长度:4 最大长度:16 cron 否 String 调度计划的cron表达式 最小长度:8 最大长度:255
  • 响应示例 状态码: 200 OK { "protocol" : "http", "path" : "/vpc/demo", "method" : "GET", "port" : 22, "threshold_abnormal" : 5, "threshold_normal" : 2, "time_interval" : 10, "http_code" : "200", "enable_client_ssl" : false, "status" : 1, "timeout" : 5, "id" : "3b3d02026c5f402d85e8645ea95b0816", "vpc_channel_id" : "d38c55c926ca44c2bfb37886d93b9a0d", "create_time" : "2020-07-23T07:11:57Z" } 状态码: 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" }
  • 请求示例 修改指定VPC通道的健康检查配置,协议修改为HTTP,关闭双向认证 { "http_code" : "200", "path" : "/vpc/demo", "port" : 22, "protocol" : "http", "threshold_abnormal" : 5, "threshold_normal" : 2, "time_interval" : 10, "timeout" : 5, "enable_client_ssl" : false }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 protocol String 使用以下协议,对VPC中主机执行健康检查: TCP HTTP HTTPS path String 健康检查时的目标路径。protocol = http或https时必选 method String 健康检查时的请求方法 缺省值:GET port Integer 健康检查的目标端口,缺少或port = 0时为VPC中主机的端口号。 若此端口存在非0值,则使用此端口进行健康检查。 最小值:0 最大值:65535 threshold_normal Integer 正常阈值。判定VPC通道中主机正常的依据为:连续检查x成功,x为您设置的正常阈值。 最小值:1 最大值:10 threshold_abnormal Integer 异常阈值。判定VPC通道中主机异常的依据为:连续检查x失败,x为您设置的异常阈值。 最小值:1 最大值:10 time_interval Integer 间隔时间:连续两次检查的间隔时间,单位为秒。必须大于timeout字段取值。 最小值:5 最大值:300 http_code String 检查目标HTTP响应时,判断成功使用的HTTP响应码。取值范围为100到599之前的任意整数值,支持如下三种格式: 多个值,如:200,201,202 一系列值,如:200-299 组合值,如:201,202,210-299 protocol = http时必选 enable_client_ssl Boolean 是否开启双向认证。若开启,则使用实例配置中的backend_client_certificate配置项的证书 缺省值:false status Integer 健康检查状态 1:可用 2:不可用 timeout Integer 超时时间:检查期间,无响应的时间,单位为秒。必须小于time_interval字段取值。 最小值:2 最大值:30 vpc_channel_id String VPC通道的编号 id String 健康检查的编号 create_time 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条