API7 Docs

Get Upstream by ID

GET /v1/upstream/{upstream_id}

GET /v1/upstream/{upstream_id}

Interactive request editor loads with JavaScript.

Path Parameters

upstream_id*string

Upstream ID.

Response Body

application/json

application/json

curl -X GET "http://127.0.0.1:9090/v1/upstream/string"

OK

{
  "scheme": "http",
  "pass_host": "pass",
  "nodes": [
    {
      "host": "127.0.0.1",
      "port": 80,
      "weight": 1
    },
    {
      "host": "foo.com",
      "port": 80,
      "weight": 2
    }
  ],
  "hash_on": "vars",
  "update_time": 1634543819,
  "key": "remote_addr",
  "create_time": 1634539759,
  "id": "1",
  "type": "chash"
}
Complete operation details and schema variants

GET /v1/upstream/{upstream_id}

Get Upstream by ID

Get an upstream by ID.

Parameters

  • upstream_id (path, string, required): Upstream ID.

Responses

  • 200: OK
  • 404: Upstream not found
  • error_msg (string, required):

cURL

curl -X GET 'http://127.0.0.1:9090/v1/upstream/{upstream_id}'