HAProxy Service Discovery API

The Service Discovery API from HAProxy — 4 operation(s) for service discovery.

Operations 10

GET /service_discovery/aws Return an array of all configured AWS regions #
POST /service_discovery/aws Add a new AWS region #
DELETE /service_discovery/aws/{id} Delete an AWS region #
GET /service_discovery/aws/{id} Return an AWS region #
PUT /service_discovery/aws/{id} Replace an AWS region #
GET /service_discovery/consul Return an array of all configured Consul servers #
POST /service_discovery/consul Add a new Consul server #
DELETE /service_discovery/consul/{id} Delete a Consul server #
GET /service_discovery/consul/{id} Return one Consul server #
PUT /service_discovery/consul/{id} Replace a Consul server #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/haproxy-service-discovery-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

haproxy-service-discovery-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: HAProxy Data Plane Service Discovery API
  description: 'API for editing and managing haproxy instances. Provides process information, configuration management,

    haproxy stats and logs.'
  version: '3.4'
  contact:
    name: HAProxy Support
    url: https://my.haproxy.com/portal/cust/login
    email: support@haproxy.com
servers:
- url: /v3
security:
- basic_auth: []
tags:
- name: Service Discovery
paths:
  /service_discovery/aws:
    get:
      description: Return all configured AWS regions.
      operationId: getAWSRegions
      responses:
        200:
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/awsRegions'
        default:
          $ref: '#/components/responses/DefaultError'
      summary: Return an array of all configured AWS regions
      tags:
      - Service Discovery
    post:
      description: 'Add a new AWS region.

        Credentials are not required in case Dataplane API is running in an EC2 instance with proper IAM role attached.'
      operationId: createAWSRegion
      responses:
        201:
          description: Resource created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/awsRegion'
        400:
          $ref: '#/components/responses/BadRequest'
        409:
          $ref: '#/components/responses/AlreadyExists'
        default:
          $ref: '#/components/responses/DefaultError'
      summary: Add a new AWS region
      tags:
      - Service Discovery
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/awsRegion'
        required: true
  /service_discovery/aws/{id}:
    delete:
      description: Delete an AWS region configuration by it's id.
      operationId: deleteAWSRegion
      parameters:
      - description: AWS region ID
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Resource deleted
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/DefaultError'
      summary: Delete an AWS region
      tags:
      - Service Discovery
    get:
      description: Return one AWS Region configuration by it's id.
      operationId: getAWSRegion
      parameters:
      - description: AWS region id
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/awsRegion'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/DefaultError'
      summary: Return an AWS region
      tags:
      - Service Discovery
    put:
      description: Replace an AWS region configuration by its id.
      operationId: replaceAWSRegion
      parameters:
      - description: AWS Region ID
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Resource updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/awsRegion'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/DefaultError'
      summary: Replace an AWS region
      tags:
      - Service Discovery
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/awsRegion'
        required: true
  /service_discovery/consul:
    get:
      description: Returns all configured Consul servers.
      operationId: getConsuls
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/consuls'
        default:
          $ref: '#/components/responses/DefaultError'
      summary: Return an array of all configured Consul servers
      tags:
      - Service Discovery
    post:
      description: Adds a new Consul server.
      operationId: createConsul
      responses:
        '201':
          description: Consul created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/consul'
        '400':
          $ref: '#/components/responses/BadRequest'
        '409':
          $ref: '#/components/responses/AlreadyExists'
        default:
          $ref: '#/components/responses/DefaultError'
      summary: Add a new Consul server
      tags:
      - Service Discovery
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/consul'
        required: true
  /service_discovery/consul/{id}:
    delete:
      description: Deletes a Consul server configuration by it's id.
      operationId: deleteConsul
      parameters:
      - description: Consul server Index
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Consul server deleted
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/DefaultError'
      summary: Delete a Consul server
      tags:
      - Service Discovery
    get:
      description: Returns one Consul server configuration by it's id.
      operationId: getConsul
      parameters:
      - description: Consul server id
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/consul'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/DefaultError'
      summary: Return one Consul server
      tags:
      - Service Discovery
    put:
      description: Replaces a Consul server configuration by it's id.
      operationId: replaceConsul
      parameters:
      - description: Consul Index
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Consul server replaced
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/consul'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          $ref: '#/components/responses/DefaultError'
      summary: Replace a Consul server
      tags:
      - Service Discovery
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/consul'
        required: true
components:
  schemas:
    consul:
      additionalProperties: false
      description: Consul server configuration
      example:
        address: 127.0.0.1
        enabled: true
        id: '0'
        port: 90
        retry_timeout: 10
      properties:
        address:
          pattern: ^[^\s]+$
          type: string
        defaults:
          description: Name of the defaults section to be used in backends created by this service
          type: string
        description:
          type: string
        enabled:
          type: boolean
        health_check_policy:
          default: none
          description: "Defines the health check conditions required for each node to be considered valid for the service.\n  none: all nodes are considered valid\n  any: a node is considered valid if any one health check is 'passing'\n  all: a node is considered valid if all health checks are 'passing'\n  min: a node is considered valid if the number of 'passing' checks is greater or equal to the 'health_check_policy_min' value.\n    If the node has less health checks configured then 'health_check_policy_min' it is considered invalid."
          enum:
          - none
          - any
          - all
          - min
          type: string
        health_check_policy_min:
          type: integer
          x-dependency:
            health_check_policy:
              value: min
        id:
          description: Auto generated ID.
          pattern: ^[^\s]+$
          type:
          - string
          - 'null'
        mode:
          default: http
          enum:
          - http
          - https
          type: string
        name:
          type: string
        namespace:
          type: string
        port:
          maximum: 65535
          minimum: 1
          type: integer
        retry_timeout:
          description: Duration in seconds in-between data pulling requests to the consul server
          minimum: 1
          type: integer
        server_slots_base:
          default: 10
          type: integer
        server_slots_growth_increment:
          type: integer
        server_slots_growth_type:
          default: exponential
          enum:
          - linear
          - exponential
          type: string
        service_allowlist:
          items:
            pattern: ^[^\s]+$
            type: string
          type: array
          x-omitempty: true
        service_denylist:
          items:
            pattern: ^[^\s]+$
            type: string
          type: array
          x-omitempty: true
        service_name_regexp:
          description: Regular expression used to filter services by name.
          type: string
        token:
          pattern: ^[^\s]+$
          type: string
      required:
      - address
      - port
      - enabled
      - retry_timeout
      title: Consul server
      type: object
    error:
      additionalProperties:
        type: string
      description: API Error
      properties:
        code:
          type:
          - integer
          - 'null'
        message:
          type:
          - string
          - 'null'
      required:
      - code
      - message
      title: Error
      type: object
    awsRegion:
      description: AWS region configuration
      example:
        access_key_id: '****************L7GT'
        allowlist:
        - key: tag-key
          value: Instance:Having:This:Tag
        denylist:
        - key: tag:Environment
          value: development
        enabled: true
        id: '0'
        ipv4_address: private
        name: frontend-service
        region: us-east-1
        retry_timeout: 1
        secret_access_key: '****************soLl'
      properties:
        access_key_id:
          description: AWS Access Key ID.
          type: string
        allowlist:
          description: Specify the AWS filters used to filter the EC2 instances to add
          items:
            $ref: '#/components/schemas/awsFilters'
          type: array
          x-omitempty: true
        denylist:
          description: Specify the AWS filters used to filter the EC2 instances to ignore
          items:
            $ref: '#/components/schemas/awsFilters'
          type: array
          x-omitempty: true
        description:
          type: string
        enabled:
          type: boolean
        id:
          description: Auto generated ID.
          pattern: ^[^\s]+$
          readOnly: true
          type:
          - string
          - 'null'
        ipv4_address:
          description: Select which IPv4 address the Service Discovery has to use for the backend server entry
          enum:
          - private
          - public
          type: string
        name:
          type: string
        region:
          type: string
        retry_timeout:
          description: Duration in seconds in-between data pulling requests to the AWS region
          minimum: 1
          type: integer
        secret_access_key:
          description: AWS Secret Access Key.
          type: string
        server_slots_base:
          default: 10
          type: integer
        server_slots_growth_increment:
          type: integer
        server_slots_growth_type:
          default: exponential
          enum:
          - linear
          - exponential
          type: string
      required:
      - name
      - region
      - enabled
      - retry_timeout
      - ipv4_address
      title: AWS region
      type: object
    awsRegions:
      title: AWS
      description: AWS regions array
      type: array
      items:
        $ref: '#/components/schemas/awsRegion'
    awsFilters:
      properties:
        key:
          description: Key to use as filter, using the format specified at https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html#options
          type: string
        value:
          description: Value of the filter to use
          type: string
      required:
      - key
      - value
      type: object
    consuls:
      title: Consuls
      description: Consuls array
      type: array
      items:
        $ref: '#/components/schemas/consul'
  responses:
    DefaultError:
      description: General Error
      headers:
        Configuration-Version:
          description: Configuration file version
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    NotFound:
      description: The specified resource was not found
      headers:
        Configuration-Version:
          description: Configuration file version
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    BadRequest:
      description: Bad request
      headers:
        Configuration-Version:
          description: Configuration file version
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    AlreadyExists:
      description: The specified resource already exists
      headers:
        Configuration-Version:
          description: Configuration file version
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
  securitySchemes:
    basic_auth:
      type: http
      scheme: basic
externalDocs:
  url: https://docs.haproxy.org/
  description: HAProxy Documentation