华为云用户手册

  • 响应示例 状态码: 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.3017", "error_msg" : "Signature key 0b0e8f456b8742218af75f945307173c does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 401 表3 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 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场景下不生效 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 自定义认证所属应用名称 表4 Identity 参数 参数类型 描述 name String 参数名称。 支持数字,英文,下划线,中划线,点,且只能以数字或英文开头。 location String 参数位置 validation String 参数校验表达式,默认为null,不做校验 状态码: 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 错误描述
  • 请求示例 创建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" }
  • 响应示例 状态码: 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" }
  • 响应参数 状态码: 400 表3 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 404 表4 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 500 表5 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 size Integer 本次返回的列表长度 total Long 满足条件的记录数 acls Array of ApiAclInfoWithBindNum objects 本次查询返回的ACL策略列表 表5 ApiAclInfoWithBindNum 参数 参数类型 描述 acl_name String ACL策略名称 acl_type String 类型 PERMIT(白名单类型) DENY(黑名单类型) acl_value String ACL策略的值 bind_num Integer 绑定的API数量 entity_type String 对象类型 IP DOMAIN DOMAIN_ID id String ACL策略编号 update_time String 更新时间 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表10 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "acls" : [ { "bind_num" : 0, "id" : "7eb619ecf2a24943b099833cd24a01ba", "acl_name" : "acl_demo", "entity_type" : "IP", "acl_type" : "PERMIT", "acl_value" : "192.168.1.5,192.168.10.1", "update_time" : "2020-08-04T08:42:43Z" } ] } 状态码: 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 OK { "update_time" : "2020-07-31T06:55:55Z", "name" : "api_group_001", "on_sell_status" : 2, "remark" : "group1", "sl_domains" : [ "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com", "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.cn" ], "sl_domain" : "c77f5e81d9cb4424bf704ef2b0ac7600.apic.****.com", "id" : "c77f5e81d9cb4424bf704ef2b0ac7600", "register_time" : "2020-07-31T06:55:55Z", "status" : 1, "is_default" : 2, "version" : "V1", "sl_domain_access_enabled" : true } 状态码: 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.3001", "error_msg" : "API group c77f5e81d9cb4424bf704ef2b0ac7600 does not exist" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应参数 状态码: 200 表3 响应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 分组归属的集成应用名称 表4 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证书列表 表5 SslInfo 参数 参数类型 描述 ssl_id String SSL证书编号 ssl_name String SSL证书名称 algorithm_type String 证书算法类型: RSA ECC SM2 type String 证书可见范围: instance:当前实例 global:全局 状态码: 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 错误描述
  • 响应参数 状态码: 401 表3 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 403 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 404 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述 状态码: 500 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误描述
  • 响应示例 状态码: 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.3022", "error_msg" : "The API version does not exist,id:ee1a5a38d3d3493abf1dc4ed6cacfa0b" } 状态码: 500 Internal Server Error { "error_code" : "APIG.9999", "error_msg" : "System error" }
  • 响应示例 状态码:200 OK { "topic" : "topic-test", "partition" : 0, "message_offset" : 4, "consumer_key" : "keyA" } 状态码:400 Bad Request { "error_code" : 400, "error_msg" : "Bad Request" } 状态码:403 Forbidden { "error_code" : 403, "error_msg" : "Forbidden" }
  • 响应参数 状态码:200 表5 响应Body参数 参数 参数类型 描述 topic String Topic名称。 partition Integer 分区。 message_offset Integer 消息偏移量。 consumer_key String 应用Key。在该消息头中添加一个consumer_key的消息头。 状态码:400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息。 状态码:403 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息。
  • 请求示例 重发偏移量为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" }
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表4 请求Body参数 参数 是否必选 参数类型 描述 topic 是 String Topic名称。 partition 是 Integer 分区。 message_offset 是 Number 消息偏移量。 consumer_key 否 String 应用Key。在该消息头中添加一个consumer_key的消息头。
  • 响应参数 状态码: 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 错误描述
  • 响应示例 状态码: 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" }
  • 响应参数 状态码: 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 表3 响应Body参数 参数 参数类型 描述 property_id Integer 属性ID。 property_name String 属性名称,首位必须为字母,支持大小写字母、数字、中划线及下划线,长度2-50。 description String 属性描述,长度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-必填。 min String 最小值,当data_type为integer或number时有效。 max String 最大值,当data_type为integer或number时有效。 step String 步长,当data_type为integer或number时有效。 max_length Integer 字符串最大长度,当data_type为string、datetime、json时有效。 unit String 属性单位。 enum_list String string的枚举值数组,使用逗号分隔,单个长度取决于max_length参数。 enum_dict Object 当数据类型为boolean枚举值时填写json格式数据,形如"enum_dict":{"0":"xxx","1":"xxx"}。 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 404 表5 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。 状态码: 500 表6 响应Body参数 参数 参数类型 描述 error_code String 系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 error_msg String 错误描述。 request_id String 消息ID。
  • 响应示例 状态码: 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 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" ] }
  • 请求参数 表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 环境编号 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 错误描述
共100000条
提示

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