华为云用户手册

  • 请求示例 批量导出集成资产,导出多个集成应用和数据集成任务。 POST https://{endpoint}/v2/{project_id}/instances/{instance_id}/assets/export { "apps" : [ { "id" : "b1e6b1e6-4f3f-4a80-bb45-f4b9039f95a3" }, { "id" : "b2e6b145-4f3f-4a80-aa45-f4b8029f95a4" } ], "tasks" : [ { "id" : "b2e6a456-1234-4a80-aa45-f4b8029f95a4" }, { "id" : "123456648-4f3f-4a80-aa45-f4b00005a42" } ] }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 apps 是 Array of apps objects 应用列表。 tasks 是 Array of tasks objects 任务列表。 表4 apps 参数 是否必选 参数类型 描述 id 否 String 应用ID。 表5 tasks 参数 是否必选 参数类型 描述 id 否 String 任务ID。
  • 响应参数 状态码: 200 表6 响应Body参数 参数 参数类型 描述 job_id String 资产导出作业的ID,可用于查询作业进度,获取导出作业进度。 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。
  • 响应示例 状态码: 200 OK { "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, "need_body" : true, "id" : "0d982c1ac3da493dae47627b6439fc5c", "create_time" : "2020-09-23T02:32:10Z", "roma_app_id" : "98df09fb-d459-4cbf-83a7-2b55ca6f3d5d", "roma_app_name" : "app-demo" } 状态码: 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.3081", "error_msg" : "authorizer with id: 0d982c1ac3da493dae47627b6439fc5c not found" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表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场景下不生效 缺省值:V1 authorizer_version String 函数版本。 当函数别名URN和函数版本同时传入时,函数版本将被忽略,只会使用函数别名URN 最大长度:64 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 id String 自定义认证编号 create_time String 创建时间 roma_app_id String 自定义认证所属应用编号 roma_app_name String 自定义认证所属应用名称 表4 Identity 参数 参数类型 描述 name String 参数名称。 支持数字,英文,下划线,中划线,点,且只能以数字或英文开头。 最小长度:0 最大长度:32 location String 参数位置 validation String 参数校验表达式,默认为null,不做校验 最大长度:1024 状态码: 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 { "user_name" : "4MjxbCl4q461", "password" : "*************" } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-product.queryAuthentication]. Parameter is [productId]. 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" }
  • 响应示例 状态码: 200 OK { "total" : 91, "size" : 1, "permissions" : [ "modify" ], "topics" : [ { "policiesOnly" : false, "name" : "topic-test", "replication" : 3, "partition" : 3, "retention_time" : 72, "sync_replication" : false, "sync_message_flush" : false, "app_id" : "ba1408c8-xxxx-xxxx-xxxx-21a218f4xxxx", "app_name" : "app-test", "permissions" : [ "read", "access", "delete", "modify" ], "external_configs" : { }, "description" : "", "sensitive_word" : "", "topic_type" : 0 } ], "remain_partitions" : 37, "max_partitions" : 300 } 状态码: 400 Bad Request { "error_code" : 400, "error_msg" : "Bad Request" } 状态码: 403 Forbidden { "error_code" : 403, "error_msg" : "Forbidden" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 total Integer topic的总数。 size Integer 当前查询的topic数量。 permissions Array of strings 允许操作的权限。 topics Array of topics objects Topic列表。 remain_partitions Integer 剩余分区数。 max_partitions Integer 分区总数。 表5 topics 参数 参数类型 描述 policiesOnly Boolean 是否只更新策略。 name String topic名称。 replication Integer 副本数,配置数据的可靠性。 partition Integer topic分区数,设置消费的并发数。 retention_time Integer 消息老化时间。 sync_message_flush Boolean 是否使用同步落盘。默认值为false。同步落盘会导致性能降低。 sync_replication Boolean 是否开启同步复制,开启后,客户端生产消息时相应的也要设置acks=-1,否则不生效,默认关闭。 app_id String 集成应用key。 app_key String 集成应用key。 app_name String 应用名称。 permissions Array of strings 允许操作的权限。 external_configs Object 其他配置。 description String 描述。 sensitive_word String 敏感字段。 topic_type Integer topic类型。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误信息 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误信息
  • 响应示例 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:id. Please refer to the support documentation" } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3009", "error_msg" : "The app authorization record does not exist,id:dd29b33ae4394e3b924b582c6b40880b" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 200 OK { "total" : 2, "size" : 2, "members" : [ { "host" : "192.168.0.5", "weight" : 1, "is_backup" : false, "member_group_name" : "", "status" : 1, "port" : 22, "ecs_id" : "192.168.0.5", "ecs_name" : "192.168.0.5", "id" : "be63c6260a1043888187f84af39c9f0e", "vpc_channel_id" : "56a7d7358e1b42459c9d730d65b14e59", "create_time" : "2020-07-23T07:11:57Z", "member_group_id" : "" }, { "host" : "192.168.1.124", "weight" : 2, "is_backup" : false, "member_group_name" : "", "status" : 1, "port" : 22, "ecs_id" : "192.168.1.124", "ecs_name" : "192.168.1.124", "id" : "a57b13f1b89b417ca8acd76909e6df67", "vpc_channel_id" : "56a7d7358e1b42459c9d730d65b14e59", "create_time" : "2020-07-23T07:11:57Z", "member_group_id" : "" } ] } 状态码: 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.3023", "error_msg" : "The VPC channel does not exist,id:56a7d7358e1b42459c9d730d65b14e59" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 members Array of VpcMemberInfo objects 本次查询到的云服务器列表 表5 VpcMemberInfo 参数 参数类型 描述 host String 后端服务器地址 后端实例类型为ip时必填 最大长度:64 weight Integer 权重值。 允许您对后端服务进行评级,权重值越大,转发到该云服务的请求数量越多。 最小值:0 最大值:10000 is_backup Boolean 是否备用节点。 开启后对应后端服务为备用节点,仅当非备用节点全部故障时工作。 实例需要升级到对应版本才支持此功能,若不支持请联系技术支持。 缺省值:false member_group_name String 后端服务器组名称。为后端服务地址选择服务器组,便于统一修改对应服务器组的后端地址。 status Integer 后端服务器状态 1:可用 2:不可用 port Integer 后端服务器端口 最小值:0 最大值:65535 ecs_id String 后端云服务器的编号。 后端实例类型为ecs时必填,支持英文,数字,“-”,“_”,1 ~ 64字符。 最大长度:255 ecs_name String [后端云服务器的名称。] 后端实例类型为ecs时必填,支持汉字,英文,数字,“-”,“_”,“.”,1 ~ 64字符。 最大长度:64 id String 后端实例对象的编号 vpc_channel_id String VPC通道的编号 create_time String 后端实例增加到VPC通道的时间 member_group_id String 后端服务器组编号 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 app_id String APP编号 app_acl_type String 类型 PERMIT (白名单类型) DENY (黑名单类型) app_acl_values Array of strings ACL策略值,支持IP、IP范围和CIDR方式。IP范围以英文中划线分隔。 状态码: 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 { "app_id" : "9ed8b7fe84224de681e7d7a5587e76dc", "app_acl_type" : "PERMIT", "app_acl_values" : [ "192.168.0.1", "192.168.0.5-192.168.0.10", "192.168.0.100/28" ] } 状态码: 400 Bad Request { "error_code" : "APIG.2012", "error_msg" : "Invalid parameter value,parameterName:app_id. Please refer to the support documentation" } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3004", "error_msg" : "App 9ed8b7fe84224de681e7d7a5587e76dc does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 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
  • 响应示例 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-device-groups.addDeviceIntoGroup]. Parameter is [batchRequest]. Processor is [body].", "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" : "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" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:100000 表3 请求Body参数 参数 是否必选 参数类型 描述 resources 是 Array of integers 设备ID列表,自动向下取整 最小值:1 最大值:9999999999999999999 数组长度:0 - 9999
  • 请求示例 创建Web后端API { "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "match_mode" : "NORMAL", "name" : "Api_http", "auth_type" : "AUTHORIZER", "authorizer_id" : "0d982c1ac3da493dae47627b6439fc5c", "backend_type" : "HTTP", "backend_api" : { "url_domain" : "10.10.10.156:12346", "req_protocol" : "HTTP", "req_method" : "GET", "req_uri" : "/test/benchmark", "timeout" : 5000 }, "req_protocol" : "HTTPS", "req_uri" : "/test/http", "remark" : "Web backend API", "type" : 1, "req_method" : "GET", "result_normal_sample" : "normal result", "result_failure_sample" : "failure result", "tags" : [ "webApi" ], "req_params" : [ { "name" : "query_demo", "location" : "QUERY", "type" : "STRING", "required" : 1 }, { "name" : "header-demo", "location" : "HEADER", "type" : "STRING", "required" : 2 } ], "backend_params" : [ { "name" : "backHeader", "value" : "header-demo", "location" : "HEADER", "origin" : "REQUEST" }, { "name" : "backQuery", "value" : "query_demo", "location" : "QUERY", "origin" : "REQUEST" }, { "name" : "X-CONSTANT-HEADER", "value" : "demo", "location" : "HEADER", "origin" : "CONSTANT", "remark" : "constant_demo" }, { "name" : "app-id", "value" : "$context.appId", "location" : "HEADER", "origin" : "SYSTEM", "remark" : "consumer app id" } ] } 创建函数工作流后端API { "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "match_mode" : "NORMAL", "name" : "Api_function", "auth_type" : "APP", "backend_type" : "FUNCTION", "func_info" : { "authorizer_id" : "5b8cd3f06f004115aec69c58f57272c9", "function_urn" : "'urn:fss:region01:73d69ae0cfcf460190522d06b60f05ad:function:default:auto_testfunc93749'", "invocation_type" : "sync", "timeout" : 5000, "version" : "latest" }, "req_protocol" : "HTTPS", "req_uri" : "/test/function", "remark" : "function API", "type" : 1, "req_method" : "GET", "result_normal_sample" : "normal result", "result_failure_sample" : "failure result", "tags" : [ "functionApi" ] } 创建模拟后端API { "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "match_mode" : "SWA", "name" : "Api_mock", "auth_type" : "IAM", "backend_type" : "MOCK", "mock_info" : { "result_content" : "mock success" }, "policy_mocks" : [ { "name" : "mock_policy_backend", "effect_mode" : "ANY", "result_content" : "mock policy success", "conditions" : [ { "condition_origin" : "source", "condition_value" : "1.0.1.0" } ] } ], "req_protocol" : "HTTPS", "req_uri" : "/test/mock", "remark" : "mock api", "type" : 1, "req_method" : "GET", "result_normal_sample" : "normal result", "result_failure_sample" : "failure result", "tags" : [ "mockApi" ] }
  • 响应示例 状态码: 201 Created 示例 1 { "id" : "5f918d104dc84480a75166ba99efff21", "tags" : [ "webApi" ], "arrange_necessary" : 2, "backend_type" : "HTTP", "auth_type" : "AUTHORIZER", "auth_opt" : { "app_code_auth_type" : "DISABLE" }, "authorizer_id" : "0d982c1ac3da493dae47627b6439fc5c", "backend_api" : { "update_time" : "2020-07-31T12:42:51.325312994Z", "vpc_status" : 2, "url_domain" : "10.10.10.156:12346", "req_protocol" : "HTTP", "id" : "1ce8fda3586d4371bd83c955df37e102", "req_method" : "GET", "register_time" : "2020-07-31T12:42:51.325312721Z", "req_uri" : "/benchmark", "timeout" : 5000, "status" : 1 }, "cors" : false, "status" : 1, "group_name" : "api_group_001", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "group_version" : "V1", "response_id" : "981e6c8f847f47199a9faf4409b751a5", "match_mode" : "NORMAL", "name" : "Api_http", "req_protocol" : "HTTPS", "req_method" : "GET", "req_uri" : "/test/http", "type" : 1, "result_normal_sample" : "normal result", "result_failure_sample" : "failure result", "version" : "V0.0.1", "register_time" : "2020-07-31T12:42:51.314357035Z", "update_time" : "2020-07-31T12:42:51.314357324Z", "remark" : "Web backend API", "req_params" : [ { "name" : "query_demo", "location" : "QUERY", "type" : "STRING", "valid_enable" : 2, "required" : 1, "id" : "57c8bf3c97ef40ee94eace95dff30014", "pass_through" : 1 }, { "name" : "header-demo", "location" : "HEADER", "type" : "STRING", "valid_enable" : 2, "required" : 2, "id" : "8d993be96980415faa6b1fb2ebd647e0", "pass_through" : 1 } ], "backend_params" : [ { "name" : "backHeader", "value" : "header-demo", "location" : "HEADER", "origin" : "REQUEST", "id" : "709f0ea376b44aaf907aaaa37d8cce92", "req_param_id" : "8d993be96980415faa6b1fb2ebd647e0" }, { "name" : "backQuery", "value" : "query_demo", "location" : "QUERY", "origin" : "REQUEST", "id" : "2f152d0fb54445039158d29c2a4f69ee", "req_param_id" : "57c8bf3c97ef40ee94eace95dff30014" }, { "name" : "X-CONSTANT-HEADER", "value" : "demo", "location" : "HEADER", "origin" : "CONSTANT", "remark" : "constant_demo", "id" : "20142102c6aa4f3c97d5fd6ef4010ac2" }, { "name" : "app-id", "value" : "$context.appId", "location" : "HEADER", "origin" : "SYSTEM", "remark" : "consumer app id", "id" : "a1349c61016e4d999ca783a50bfeee2b" } ] } 示例 2 { "id" : "abd9c4b2ff974888b0ba79be7e6b2763", "arrange_necessary" : 2, "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "group_name" : "api_group_001", "group_version" : "V1", "match_mode" : "NORMAL", "name" : "Api_function", "auth_type" : "APP", "auth_opt" : { "auth_code_auth_type" : "DISABLE" }, "backend_type" : "FUNCTION", "func_info" : { "id" : "c0740524cd4c40e3801a7afe5375f8b0", "authorizer_id" : "5b8cd3f06f004115aec69c58f57272c9", "function_urn" : "'urn:fss:region01:73d69ae0cfcf460190522d06b60f05ad:function:default:auto_testfunc93749'", "invocation_type" : "sync", "timeout" : 5000, "version" : "latest", "register_time" : "2020-08-02T15:36:19.897262803Z", "update_time" : "2020-08-02T15:36:19.897262993Z", "status" : 1 }, "cors" : false, "req_protocol" : "HTTPS", "req_uri" : "/test/function", "remark" : "function api", "type" : 1, "version" : "V0.0.1", "status" : 1, "req_method" : "GET", "result_normal_sample" : "normal result", "result_failure_sample" : "failure result", "tags" : [ "functionApi" ], "register_time" : "2020-08-02T15:36:19.892012381Z", "update_time" : "2020-08-02T15:36:19.892012627Z" } 示例 3 { "id" : "3a955b791bd24b1c9cd94c745f8d1aad", "arrange_necessary" : 2, "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "group_name" : "api_group_001", "group_version" : "V1", "match_mode" : "SWA", "name" : "Api_mock", "auth_type" : "IAM", "auth_opt" : { "auth_code_auth_type" : "DISABLE" }, "backend_type" : "MOCK", "mock_info" : { "id" : "e74bbc75825c4c38ae84ccab6bdc6175", "result_content" : "mock success", "update_time" : "2020-08-02T15:56:52.301790686Z", "register_time" : "2020-08-02T15:56:52.301790367Z" }, "policy_mocks" : [ { "name" : "mock api", "id" : "1cb05173a4c84b7d996e30145cce3c7d", "effect_mode" : "ANY", "result_content" : "mock policy success", "conditions" : [ { "condition_origin" : "source", "condition_value" : "1.0.1.0", "id" : "8650b3a94e7344df8251658d8aee1f6d" } ] } ], "cors" : false, "req_protocol" : "HTTPS", "req_uri" : "/test/mock", "remark" : "mock api", "type" : 1, "version" : "V0.0.1", "req_method" : "GET", "result_normal_sample" : "normal result", "result_failure_sample" : "failure result", "tags" : [ "mockApi" ], "register_time" : "2020-08-02T15:56:52.286099413Z", "update_time" : "2020-08-02T15:56:52.286099715Z", "status" : 1 } 状态码: 400 Bad Request { "error_code" : "APIG.2011", "error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation" } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3019", "error_msg" : "The function URN does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 请求消息 请求参数 表2 Body参数 名称 类型 是否必填 描述 app_id string 是 应用ID。 product_name string 是 需要创建产品的名称,输入参数不能为空,长度最大64,仅支持中文,英文字母,数字,下划线和中划线。 remark string 否 描述信息,不能超过200个字符。 请求示例 https://example.cloud.com/v1/80e2b******f4a398d6409a50932d917/link/instances/fb3b24ab-5d87-473d-9c57-fc6******6a1/products { "app_id" : "app01", "product_name" : "product01", "remark" : "this is a demo." }
  • 响应消息 响应参数 表3 响应参数 名称 类型 描述 password string 密码。 product_id integer 产品ID。 product_name string 产品名。 product_serial string 产品序列号。 remark string 描述信息,不能超过200个字符。 user_name string 用户名。 响应示例 { "product_id": 250, "product_name": "product01", "product_serial": "wbgfcYR6p250", "remark": "this is a demo.", "password": "*****************", "user_name": "8f9be623df1249429dcfead6c0d541d3" }
  • 响应参数 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 404 表4 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 500 表5 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64
  • 响应示例 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-rulesrc.delete]. 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 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 OK { "total" : 1, "size" : 1, "items" : [ { "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" }, "authentication" : { "user_name" : "4MjxbCl4q461", "password" : "********" } } ] } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-product.search]. Parameter is [product_type]. 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 OK { "total" : 1, "size" : 1, "entities" : { "task_id" : "15366328208d4d77b76532fe9f4006a6", "task_name" : "task_cdc_oracle2oracle", "task_type" : "TIMING", "status" : 0, "created_date" : "1605288733684", "version" : "2", "last_modified_time" : 456223355566, "execute_status" : "ERROR", "source_app_id" : "73b7f7a6-d1b8-4806-a0f8-278fe7186592", "target_app_id" : "73b7f7a6-d1b8-4806-a0f8-278fe7186592", "source_instance_id" : "fae7ff6c-8e07-4cf8-9e67-589cab2f017c", "target_instance_id" : "fae7ff6c-8e07-4cf8-9e67-589cab2f017c", "ext_type" : "cdc", "enterprise_project_id" : "0", "task_tag" : "fdi_autotest" } }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 total Long 查询任务列表任务总个数 最小值:0 最大值:1000000 size Integer 查询任务列表返回的当前页的任务个数 最小值:0 最大值:1000 entities Array of BriefTaskRespBean objects 查询任务列表返回的对象 数组长度:1 - 9999 表5 BriefTaskRespBean 参数 参数类型 描述 task_id String 任务ID 最小长度:1 最大长度:64 task_name String 任务名称 最小长度:1 最大长度:64 task_type String 任务类型 REALTIME (实时) TIMING (定时) 最小长度:1 最大长度:10 status Integer 任务状态 0 (停止/未启动) 1 (运行中) 最小值:0 最大值:1 created_date String 创建时间 version String 任务的版本 最小长度:0 最大长度:10 last_modified_time Long 上次修改时间 最小值:1 最大值:9999999999999999999 execute_status String 任务执行状态 UNSTARTED (未启动) WAITING (等待执行) RUNNING (执行中) SUCCESS (执行成功) CANCELLED (任务取消) ERROR (执行异常) 最小长度:1 最大长度:64 source_app_id String 源端数据源所属应用ID 最小长度:1 最大长度:64 target_app_id String 目标端数据源所属应用ID 最小长度:1 最大长度:64 source_instance_id String 源端实例ID 最小长度:1 最大长度:64 target_instance_id String 目标端实例ID 最小长度:1 最大长度:64 ext_type String 组合任务类型,可为空 最小长度:1 最大长度:64 enterprise_project_id String 企业项目ID 最小长度:1 最大长度:64 task_tag String 任务标签 最小长度:1 最大长度:64 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
  • 响应示例 状态码: 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" }, "authentication" : { "user_name" : "4MjxbCl4q461", "password" : "********" } } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-product.searchProductDetails]. 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" }
  • 响应示例 状态码: 200 OK { "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, "need_body" : true, "id" : "0d982c1ac3da493dae47627b6439fc5c", "create_time" : "2020-09-23T02:32:10Z", "roma_app_id" : "98df09fb-d459-4cbf-83a7-2b55ca6f3d5d", "roma_app_name" : "app-demo" } 状态码: 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" }
  • 请求示例 修改指定的自定义认证,修改认证来源参数 { "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 }
  • 响应参数 状态码: 200 表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场景下不生效 缺省值:V1 authorizer_version String 函数版本。 当函数别名URN和函数版本同时传入时,函数版本将被忽略,只会使用函数别名URN 最大长度:64 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 id String 自定义认证编号 create_time String 创建时间 roma_app_id String 自定义认证所属应用编号 roma_app_name String 自定义认证所属应用名称 表6 Identity 参数 参数类型 描述 name String 参数名称。 支持数字,英文,下划线,中划线,点,且只能以数字或英文开头。 最小长度:0 最大长度:32 location String 参数位置 validation String 参数校验表达式,默认为null,不做校验 最大长度:1024 状态码: 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 错误描述
共100000条