华为云用户手册

  • URI GET /v1/{project_id}/link/instances/{instance_id}/topics 表1 参数说明 参数 类型 是否必填 说明 project_id string 是 租户每个区域对应的项目ID。 instance_id string 是 租户使用ROMA Connect的实例ID。 device_name string 是 根据输入的设备名称查询。 product_name string 是 根据输入的产品名称查询。
  • 响应示例 状态码: 200 OK { "failure" : [ { "bind_id" : "b11e5970f732440dbea647580647d57f", "error_code" : "APIG.3012", "error_msg" : "The request throttling policy binding record does not exist" } ], "success_count" : 1 } 状态码: 400 Bad Request { "error_code" : "APIG.2011", "error_msg" : "parameter action should be \\\"delete\\\"" } 状态码: 401 Unauthorized { "error_code" : "APIG.1002", "error_msg" : "Incorrect token or token resolution failed" } 状态码: 403 Forbidden { "error_code" : "APIG.1005", "error_msg" : "No permissions to request this method" } 状态码: 404 Not Found { "error_code" : "APIG.3030", "error_msg" : "The instance does not exist;id:f0fa1789-3b76-433b-a787-9892951c620ec" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表5 响应Body参数 参数 参数类型 描述 success_count Integer 成功解除绑定的API和流控策略绑定关系的数量 failure Array of ThrottleBindingBatchFailure objects 解除绑定失败的API和流控绑定关系及错误信息 表6 ThrottleBindingBatchFailure 参数 参数类型 描述 bind_id String 解除绑定失败的API和流控策略绑定关系ID error_code String 解除绑定失败的错误码 error_msg String 解除绑定失败的错误信息 api_id String 解除绑定失败的API的ID api_name String 解除绑定失败的API的名称 状态码: 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 错误描述
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表4 请求Body参数 参数 是否必选 参数类型 描述 throttle_bindings 否 Array of strings 需要解除绑定的API和流控策略绑定关系ID列表
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 id String 应用ID。 secret String 应用认证访问SECRET,未提供(字段不存在或值为null)时随机生成。 字符集:英文字母、数字、!、@、#、$、%、+、=、点、中划线、斜线/。 复杂度:满足大小写字母、数字、特殊字符的复杂度组合,考虑兼容性暂时不做复杂度校验。 状态码: 403 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。
  • 响应示例 状态码: 200 OK { "id" : "b2e6b145-4f3f-4a80-aa45-f4b8029f95a3", "secret" : "JNs1VK3vLdTT9Djd" } 状态码: 403 Forbidden { "error_code" : "ROMA.00000101", "error_msg" : "error summary", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43" }
  • 响应示例 状态码: 200 OK { "app_id" : "98df09fb-d459-4cbf-83a7-2b55ca6f3d5d", "config_name" : "app-config-demo", "config_type" : "password", "config_value" : "******", "description" : "", "id" : "a8bf4963c54544be81d5af4cc4630bde", "update_time" : "2020-09-07T07:10:07.601494336Z" } 状态码: 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 表4 响应Body参数 参数 参数类型 描述 id String 应用配置编号 app_id String 应用编号 config_type String 应用配置类型 config_name String 应用配置名称 config_value String 应用配置值 update_time String 应用配置更新时间 description 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 错误描述
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 config_type 是 String 应用配置类型: variable:模板变量 password:密码 certificate:证书 config_value 否 String 应用配置值: config_type = variable:config_value为模板变量的值 config_type = password:config_value为密码值 config_type = certificate:调用创建或修改应用配置接口,config_value值非必填,自定义后端函数使用config_value值需要包含证书public_key(必填),私钥private_key(必填)和密码passphrase(非必填),格式如:"{\"public_key\": ",\"private_key\":\"\",\"passphrase\":\"\"}" description 否 String 应用配置描述 最大长度:1024
  • 响应参数 状态码: 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 Created 示例 1 { "name" : "Api_http", "type" : 1, "version" : "V2", "req_protocol" : "HTTP", "req_method" : "GET", "req_uri" : "/test/http", "auth_type" : "APP", "auth_opt" : { "app_code_auth_type" : "DISABLE" }, "cors" : false, "match_mode" : "NORMAL", "backend_type" : "HTTP", "remark" : "Web backend API", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "body_remark" : "", "result_normal_sample" : "Normal response example", "result_failure_sample" : "Failure response example", "authorizer_id" : "", "tags" : [ "webApi" ], "roma_app_id" : "957dcd1e-d8f4-432e-8e71-df55cf772aba", "domain_name" : "", "tag" : "", "id" : "5f918d104dc84480a75166ba99efff21", "status" : 1, "arrange_necessary" : 2, "register_time" : "2022-02-09T02:46:36.913996908Z", "update_time" : "2022-02-09T02:46:36.913997175Z", "group_name" : "api_group_001", "group_version" : "V2", "run_env_name" : "", "run_env_id" : "", "publish_id" : "", "roma_app_name" : "app-htyr", "ld_api_id" : "", "backend_api" : { "authorizer_id" : "", "url_domain" : "10.10.10.156:12346", "req_protocol" : "HTTP", "remark" : "", "req_method" : "GET", "version" : "", "req_uri" : "/test/bechmark", "timeout" : 5000, "enable_client_ssl" : false, "retry_count" : "-1", "id" : "86686e62cabe44b392ad4a0856165e92", "status" : 1, "register_time" : "2022-02-09T02:46:36.914978278Z", "update_time" : "2022-02-09T02:46:36.914978525Z", "vpc_channel_info" : { "cascade_flag" : false, "vpc_channel_id" : "", "vpc_channel_port" : 0 }, "vpc_channel_status" : 2 }, "api_group_info" : { "id" : "02b157a33b394babb0b08c010bc3d76b", "name" : "api_group", "status" : 1, "sl_domain" : "02b157a33b394babb0b08c010bc3d76b.apic.****.com", "register_time" : "2022-02-09T02:46:31Z", "update_time" : "2022-02-09T02:46:31Z", "on_sell_status" : 2, "url_domains" : [ { "id" : "e91b83b07744e8eb1872d695ed4743b", "domain" : "domain.com", "cname_status" : 3, "ssl_id" : "ddsa83b07744e8eb1872d695ed4743b", "ssl_name" : "certificate", "min_ssl_version" : "TLSv1.1" } ] }, "func_info" : null, "mock_info" : null, "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" : "Application ID of the invoker.", "id" : "a1349c61016e4d999ca783a50bfeee2b" } ], "policy_functions" : null, "policy_mocks" : null, "policy_https" : [ ] } 示例 2 { "name" : "Api_function", "type" : 1, "version" : "V0.0.1", "req_protocol" : "HTTPS", "req_method" : "GET", "req_uri" : "/test/function", "auth_type" : "APP", "auth_opt" : { "auth_code_auth_type" : "DISABLE" }, "cors" : false, "match_mode" : "NORMAL", "backend_type" : "FUNCTION", "remark" : "FunctionGraph backend API", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "body_remark" : "", "result_normal_sample" : "Normal response example", "result_failure_sample" : "Failure response example", "authorizer_id" : "", "tags" : [ "functionApi" ], "tag" : "", "roma_app_id" : "f77f5e81d9cb4424bf704ef2b0ac7690", "domain_name" : "www.sss.com", "id" : "abd9c4b2ff974888b0ba79be7e6b2763", "status" : 1, "arrange_necessary" : 2, "register_time" : "2020-08-02T15:56:52.286099413Z", "update_time" : "2020-08-02T15:56:52.286099715Z", "group_name" : "api_group_001", "group_version" : "V1", "run_env_name" : "", "run_env_id" : "", "publish_id" : "", "publish_time" : "", "roma_app_name" : "app-dfge", "ld_api_id" : "", "backend_api" : null, "api_group_info" : { "id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "name" : "api_group", "status" : 1, "sl_domain" : "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com", "register_time" : "2020-08-02T15:56:52Z", "update_time" : "2020-08-02T15:56:52Z", "on_sell_status" : 2, "url_domains" : [ { "id" : "e91b83b07744e8eb1872d695ed4743b", "domain" : "domain.com", "cname_status" : 3, "ssl_id" : "ddsa83b07744e8eb1872d695ed4743b", "ssl_name" : "certificate", "min_ssl_version" : "TLSv1.1" } ] }, "mock_info" : null, "func_info" : { "id" : "c0740524cd4c40e3801a7afe5375f8b0", "authorizer_id" : "5b8cd3f06f004115aec69c58f57272c9", "function_urn" : "'urn:fss:region01:73d69ae0cfcf460190522d06b60f05ad:function:default:auto_testfunc93749'", "network_type" : "V1", "remark" : "", "invocation_type" : "sync", "timeout" : 5000, "version" : "latest", "alias_urn" : "urn:fss:region01:73d69ae0cfcf460190522d06b60f05ad:function:default:auto_testfunc93749:!a1", "register_time" : "2020-08-02T15:36:19.897262803Z", "update_time" : "2020-08-02T15:36:19.897262993Z", "status" : 1 }, "req_params" : [ ], "backend_params" : [ ], "policy_functions" : null, "policy_mocks" : [ ], "policy_https" : null } 示例 3 { "name" : "Api_mock", "type" : 1, "version" : "V0.0.1", "req_protocol" : "HTTPS", "req_method" : "GET", "req_uri" : "/test/mock", "auth_type" : "APP", "auth_opt" : { "auth_code_auth_type" : "DISABLE" }, "cors" : false, "match_mode" : "SWA", "backend_type" : "MOCK", "remark" : "Mock backend API", "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "body_remark" : "", "result_normal_sample" : "Normal response example", "result_failure_sample" : "Failure response example", "authorizer_id" : "", "tags" : [ "mockApi" ], "tag" : "", "roma_app_id" : "f77f5e81d9cb4424bf704ef2b0ac7690", "domain_name" : "www.sss.com", "id" : "3a955b791bd24b1c9cd94c745f8d1aad", "status" : 1, "arrange_necessary" : 2, "register_time" : "2020-08-02T15:56:52.286099413Z", "update_time" : "2020-08-02T15:56:52.286099715Z", "group_name" : "api_group_001", "group_version" : "V1", "run_env_name" : "", "run_env_id" : "", "publish_id" : "", "publish_time" : "", "roma_app_name" : "app-dfge", "ld_api_id" : "", "backend_api" : null, "api_group_info" : { "id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "name" : "api_group", "status" : 1, "sl_domain" : "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com", "register_time" : "2020-08-02T15:56:52Z", "update_time" : "2020-08-02T15:56:52Z", "on_sell_status" : 2, "url_domains" : [ { "id" : "e91b83b07744e8eb1872d695ed4743b", "domain" : "domain.com", "cname_status" : 3, "ssl_id" : "ddsa83b07744e8eb1872d695ed4743b", "ssl_name" : "certificate", "min_ssl_version" : "TLSv1.1" } ] }, "mock_info" : { "remark" : "", "result_content" : "mock success", "version" : "m1", "authorizer_id" : "", "status_code" : 200, "header" : [ ], "id" : "e74bbc75825c4c38ae84ccab6bdc6175", "register_time" : "2020-08-02T15:56:52.301790367Z", "status" : 1, "update_time" : "2020-08-02T15:56:52.301790686Z" }, "func_info" : null, "req_params" : [ ], "backend_params" : [ ], "policy_functions" : null, "policy_mocks" : [ ], "policy_https" : null } 状态码: 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" }
  • 请求示例 创建一个API,认证方式为自定义认证,匹配方式为绝对匹配,后端类型为Web后端,并自定义前端请求参数和后端请求参数 { "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 response example", "result_failure_sample" : "Failure response example", "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" : "Application ID of the invoker." } ] } 创建一个API,认证方式为APP认证,匹配方式为绝对匹配,后端类型为函数工作流 { "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'", "network_type" : "V1", "invocation_type" : "sync", "timeout" : 5000, "version" : "latest", "alias_urn" : "urn:fss:region01:73d69ae0cfcf460190522d06b60f05ad:function:default:auto_testfunc93749:!a1" }, "req_protocol" : "HTTPS", "req_uri" : "/test/function", "remark" : "FunctionGraph backend API", "type" : 1, "req_method" : "GET", "result_normal_sample" : "Normal response example", "result_failure_sample" : "Failure response example", "tags" : [ "functionApi" ] } 创建一个API,认证方式为APP认证,匹配方式为前缀匹配,后端类型为MOCK后端 { "group_id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "match_mode" : "SWA", "name" : "Api_mock", "auth_type" : "APP", "backend_type" : "MOCK", "mock_info" : { "result_content" : "mock success" }, "req_protocol" : "HTTPS", "req_uri" : "/test/mock", "remark" : "Mock backend API", "type" : 1, "req_method" : "GET", "result_normal_sample" : "Normal response example", "result_failure_sample" : "Failure response example", "tags" : [ "mockApi" ] }
  • 响应示例 状态码: 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 表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 { "datasource_id" : "acd5502992254b3ab2dfd5b6900159db", "datasource_name" : "TY_KAFKA", "datasource_type" : "KAFKA", "content" : { "project_id" : "c53626012ba84727b938ca8bf03108ef", "type" : "KAFKA", "instance_id" : "05173009-2e5f-4773-8303-8e05cc9c9302", "broker" : "10.01.01.01:9092", "ssl_username" : "1", "ssl_password" : "******", "ssl_enable" : true }, "create_time" : 1616784907101, "update_time" : 1619650507230, "app_id" : "141bbdf5-131e-4111-898d-5a6292a2113b", "app_name" : "app-zhe", "instance_id" : "05173009-2e5f-4773-8303-8e05cc9c9302", "remark" : "No change." }
  • 请求示例 修改指定的MySQL数据源,修改主机地址、端口号、用户名和密码 { "datasource_name" : "fdi_ds_y3k674", "datasource_type" : "MYSQL", "content" : { "host" : "**.**.**.**", "port" : "3306", "database_name" : "testfdi", "user_name" : "fditest", "password" : "******", "mode" : "default" }, "app_id" : "9dbd2cd2-9622-4a1b-ad47-31018cf44cbd", "description" : "testtesttest" }
  • 请求示例 为指定命令创建一个请求属性,数据类型为Integer,属性非必填,并设置最小和最大值 { "property_name" : "power_usage", "description" : "power_usage", "data_type" : "integer", "required" : 0, "min" : "0", "max" : "100", "step" : "1", "unit" : "W" }
  • 响应示例 状态码: 200 Created { "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, "method" : "RWE" } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-services-requests.saveCommandSend]. Parameter is [service_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 表4 响应Body参数 参数 参数类型 描述 property_id Integer 属性ID 最小值:1 最大值:99999999999999999 property_name String 属性名称,首位必须为字母,支持大小写字母,数字,中划线及下划线,长度2-50 最小长度:2 最大长度:50 description String 属性描述,长度0-200 最小长度:0 最大长度:200 data_type String 属性数据类型,boolean枚举值大小写敏感;number格式为数字,范围±1.0 x 10^-28 to ±7.9228 x 10^28;string为字符串;integer为整数;datetime为时间,格式为yyyyMMddTHHmmss;json为自定义json格式; array为数组类型 最小长度:0 最大长度:10 required Integer 是否必填 0-非必填 1-必填 最小值:0 最大值:10 min String 最小值,当data_type为integer或number时有效 缺省值:0 最小长度:0 最大长度:10 max String 最大值,当data_type为integer或number时有效 缺省值:65536 最小长度:0 最大长度:10 step String 步长,当data_type为integer或number时有效 缺省值:1 最小长度:0 最大长度:10 max_length Integer 字符串最大长度,当data_type为string, datetime, json时有效 最小值:1 最大值:99999999 缺省值:10 unit String 属性单位 最小长度:0 最大长度:10 enum_list String string的枚举值数组,使用逗号分隔 最小长度:0 最大长度:2000 enum_dict Object 当数据类型为boolean枚举值时填写json格式数据,形如"enum_dict":{"0":"xxx","1":"xxx"} 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:100000 表3 请求Body参数 参数 是否必选 参数类型 描述 property_name 是 String 属性名称,首位必须为字母,支持大小写字母,数字,中划线及下划线,长度2-50 最小长度:2 最大长度:50 description 否 String 属性描述,长度0-200 最小长度:0 最大长度:200 data_type 是 String 属性数据类型,boolean枚举值大小写敏感;number格式为数字,范围±1.0 x 10^-28 to ±7.9228 x 10^28;string为字符串;integer为整数;datetime为时间,格式为yyyyMMddTHHmmss;json为自定义json格式; array为数组类型 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 最大值:999999 缺省值:10 unit 否 String 属性单位 最小长度:0 最大长度:50 enum_list 否 String string的枚举值数组,使用逗号分隔 最小长度:0 最大长度:2000 enum_dict 否 Object 当数据类型为boolean枚举值时填写json格式数据,形如"enum_dict":{"0":"xxx","1":"xxx"} method 否 String 访问模式(兼容20.0,R属性可读,W属性可写,E属性可执行) 最小长度:1 最大长度:3
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "authorizer_list" : [ { "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, "user_data" : "authorizer_test", "id" : "0d982c1ac3da493dae47627b6439fc5c", "create_time" : "2020-09-23T02:32:10Z", "need_body" : true, "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: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-9892951c620e" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 authorizer_list Array of AuthorizerResp objects 自定义认证列表 表5 AuthorizerResp 参数 参数类型 描述 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 状态码: 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 { "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, "method" : "RWE" } 状态码: 400 Bad Request { "error_code" : "SCB.00000000", "error_msg" : "Parameter is not valid for operation [romalink.link-command.saveProperty]. Parameter is [service_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" }
  • 响应参数 状态码: 201 表4 响应Body参数 参数 参数类型 描述 property_id Integer 属性ID 最小值:1 最大值:99999999999999999 property_name String 属性名称,首位必须为字母,支持大小写字母,数字,中划线及下划线,长度2-50 最小长度:2 最大长度:50 description String 属性描述,长度0-200 最小长度:0 最大长度:200 data_type String 属性数据类型,boolean枚举值大小写敏感;number格式为数字,范围±1.0 x 10^-28 to ±7.9228 x 10^28;string为字符串;integer为整数;datetime为时间,格式为yyyyMMddTHHmmss;json为自定义json格式; array为数组类型 最小长度:0 最大长度:10 required Integer 是否必填 0-非必填 1-必填 最小值:0 最大值:10 min String 最小值,当data_type为integer或number时有效 缺省值:0 最小长度:0 最大长度:10 max String 最大值,当data_type为integer或number时有效 缺省值:65536 最小长度:0 最大长度:10 step String 步长,当data_type为integer或number时有效 缺省值:1 最小长度:0 最大长度:10 max_length Integer 字符串最大长度,当data_type为string, datetime, json时有效 最小值:1 最大值:99999999 缺省值:10 unit String 属性单位 最小长度:0 最大长度:10 enum_list String string的枚举值数组,使用逗号分隔 最小长度:0 最大长度:2000 enum_dict Object 当数据类型为boolean枚举值时填写json格式数据,形如"enum_dict":{"0":"xxx","1":"xxx"} method String 访问模式(兼容20.0,R属性可读,W属性可写,E属性可执行) 最小长度:1 最大长度:3 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 404 表6 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码 最小长度:0 最大长度:64 error_msg String 错误描述 最小长度:0 最大长度:200 request_id String 消息ID 最小长度:0 最大长度:64
  • 请求示例 为指定服务添加一个属性,数据类型为Integer,属性非必填,并设置最小和最大值 { "property_name" : "power_usage", "description" : "power_usage", "data_type" : "integer", "required" : 0, "min" : "0", "max" : "100", "step" : "1", "unit" : "W" }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度:1 最大长度:100000 表3 请求Body参数 参数 是否必选 参数类型 描述 property_name 是 String 属性名称,首位必须为字母,支持大小写字母,数字,中划线及下划线,长度2-50 最小长度:2 最大长度:50 description 否 String 属性描述,长度0-200 最小长度:0 最大长度:200 data_type 是 String 属性数据类型,boolean枚举值大小写敏感;number格式为数字,范围±1.0 x 10^-28 to ±7.9228 x 10^28;string为字符串;integer为整数;datetime为时间,格式为yyyyMMddTHHmmss;json为自定义json格式; array为数组类型 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 最大值:999999 缺省值:10 unit 否 String 属性单位 最小长度:0 最大长度:50 enum_list 否 String string的枚举值数组,使用逗号分隔 最小长度:0 最大长度:2000 enum_dict 否 Object 当数据类型为boolean枚举值时填写json格式数据,形如"enum_dict":{"0":"xxx","1":"xxx"} method 否 String 访问模式(兼容20.0,R属性可读,W属性可写,E属性可执行) 最小长度:1 最大长度:3
  • 响应示例 状态码: 200 OK { "total" : 2, "size" : 2, "tags" : [ "webApi", "functionApi" ] } 状态码: 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 满足条件的记录数 tags Array of strings 标签列表 状态码: 400 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 action 是 String 需要进行的操作。 online:发布 offline:下线 api_id 是 String API的编号,即:需要进行发布或下线的API的编号 env_id 是 String 环境的编号,即:API需要发布到哪个环境 remark 否 String 对发布动作的简述。字符长度不超过255 说明: 中文字符必须为UTF-8或者unicode编码。
共100000条