Updated on 2023-04-06 GMT+08:00

x-apigateway-backend.httpEndpoints

Meaning: HTTP backend service definition.

Scope of effect: x-apigateway-backend

Example:

paths:
  '/users/{userId}':
    get:
      produces:
        - "application/json"
      parameters:
        - name: "X-Auth-Token"
          description: "Authentication token"
          type: "string"
          in: "header"
          required: true
      responses:
        default:
          description: "default response"
      x-apigateway-request-type: "public"
      x-apigateway-backend:
        type: "HTTP"
        httpEndpoints:
          address: "example.com"
          scheme: "http"
          method: "GET"
          path: "/users"
          timeout: 30000
Table 1 Parameter description

Parameter

Mandatory

Type

Description

address

Yes

Array

Backend service address. The format is <Domain name or IP address>:[Port number]

scheme

Yes

String

Backend request protocol. HTTP and HTTPS are supported.

method

Yes

String

Backend request method. The options include GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH, and ANY.

path

Yes

String

Backend request path, which can contain variables.

timeout

No

Number

Backend request timeout in milliseconds. The range is 1–60,000, and the default value is 5000.