> ## Documentation Index
> Fetch the complete documentation index at: https://altostrat.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Look up Eligible Gateways for Failover

> Detects eligible upstream gateway IP addresses for a router interface used in WAN failover configuration.



## OpenAPI

````yaml /api/en/wan-failover.yaml post /failover/{site_id}/gateways
openapi: 3.0.3
info:
  title: Altostrat WAN Failover API
  version: 1.0.0
  description: >-
    Manage SDX WAN failover service state and WAN tunnel configuration through
    the portal-facing `/failover` and `/wan` gateway paths.
servers:
  - url: https://v1.api.altostrat.io
security:
  - BearerAuth: []
tags:
  - name: Failover Service
    description: Activate and manage the WAN Failover service for a specific site.
  - name: WAN Tunnels
    description: >-
      Manage individual WAN connections (tunnels) for a site's failover
      configuration.
  - name: Helper Endpoints
    description: >-
      Utility endpoints for discovering router information to aid in
      configuration.
paths:
  /failover/{site_id}/gateways:
    post:
      tags:
        - Helper Endpoints
      summary: Look up Eligible Gateways for Failover
      description: >-
        Detects eligible upstream gateway IP addresses for a router interface
        used in WAN failover configuration.
      operationId: getFailoverEligibleGateways
      parameters:
        - $ref: '#/components/parameters/SiteId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - interface
              properties:
                interface:
                  type: string
                  description: The name of the interface on the router to query.
                  example: ether1-wan
      responses:
        '200':
          description: A list of potential gateway IP addresses for the interface.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EligibleGateway'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    SiteId:
      name: site_id
      in: path
      required: true
      description: The unique identifier for the site.
      schema:
        type: string
        format: uuid
        example: 9c69345c-8d39-4786-9f17-8153c988c89a
  schemas:
    EligibleGateway:
      type: object
      properties:
        gateway:
          type: string
          format: ipv4
          description: A potential gateway IP address.
          example: 198.51.100.1
        is_dhcp:
          type: boolean
          description: Indicates if the gateway is likely assigned via DHCP.
          example: false
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: A broad category for the error (e.g., 'invalid_request_error').
          example: invalid_request_error
        code:
          type: string
          description: A short, unique string identifying the specific error.
          example: parameter_invalid
        message:
          type: string
          description: A human-readable description of what went wrong.
          example: The value for 'type' must be one of the supported connection types.
        doc_url:
          type: string
          description: >-
            A direct link to the documentation page for this specific error
            code.
          example: https://docs.altostrat.io/errors/parameter_invalid
  responses:
    BadRequest:
      description: >-
        Bad Request - The request was malformed, contained invalid parameters,
        or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized - The API key is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: >-
        Not Found - The requested resource (e.g., site_id, tunnel_id) does not
        exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: Internal Server Error - An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your JWT in the format: Bearer <token>'

````