应用与数据集成平台 ROMA CONNECT-修改API:请求示例

时间:2024-08-14 15:30:05

请求示例

修改指定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" ]
}
support.huaweicloud.com/api-roma/UpdateApiV2.html