API网关 APIG-修改API:请求示例

时间:2024-12-10 19:05:06

请求示例

修改一个API,API认证方式为APP认证,后端配置使用负载通道

{
  "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,
    "retry_count" : "-1"
  },
  "cors" : false,
  "req_protocol" : "HTTPS",
  "req_uri" : "/test/http",
  "remark" : "Web backend API",
  "type" : 1,
  "req_method" : "GET",
  "result_normal_sample" : "Example success response",
  "result_failure_sample" : "Example failure response",
  "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" : "App ID of the API caller"
  } ],
  "tags" : [ "webApi" ]
}
support.huaweicloud.com/api-apig/UpdateApiV2.html