fbpx
GEThttps://api.spotinst.io/loadBalancer/middleware?accountId={ACCOUNT_ID}

Describe all middlewares and their full JSONs

URL Parameters

Parameter Type Description
ACCOUNT_ID String

Account ID from Spotinst console

Example: act-12345
Request

Headers
{
  "Content-Type": "application/json",
  "Authorization": "Bearer ${token}"
}
Response - 200

Headers
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "status": {
    "code": 200,
    "message": "OK"
  },
  "count": 2,
  "kind": "spotinst:lb:middleware",
  "items": [
    {
      "id": "mw-01c4ec988f3d",
      "balancerId": "lb-57e0dad0627c",
      "type": "ACL",
      "priority": 1,
      "spec": {
        "action": "ALLOW",
        "conditions": [
          {
            "type": "HTTP_REQUEST_IP",
            "values": [
              "1.2.3.4",
              "1.2.3.5"
            ]
          }
        ]
      },
      "tags": [],
      "updatedAt": "2017-06-26T06:06:38.000Z",
      "createdAt": "2017-06-26T06:06:38.000Z"
    },
    {
      "id": "mw-01c4ec988f3s",
      "balancerId": "lb-57e0dad0627c",
      "type": "ACL",
      "priority": 2,
      "spec": {
        "action": "DENY",
        "conditions": [
          {
            "type": "HTTP_REQUEST_COOKIE",
            "values": [
              "username=John Doe"
            ]
          }
        ]
      },
      "tags": [],
      "updatedAt": "2017-06-26T06:06:38.000Z",
      "createdAt": "2017-06-26T06:06:38.000Z"
    }
  ]
}