openapi: 3.2.0 info: title: HAProxy Data Plane Health Check 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: Health Check paths: /services/haproxy/configuration/healthchecks: get: description: Returns an array of all configured healthchecks. operationId: getHealthChecks parameters: - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/full_section' responses: '200': description: Successful operation headers: Configuration-Version: description: Configuration file version schema: type: string content: application/json: schema: $ref: '#/components/schemas/healthchecks' default: $ref: '#/components/responses/DefaultError' summary: Return an array of healthchecks tags: - Health Check post: description: Adds a new healthcheck to the configuration file. operationId: createHealthCheck parameters: - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/version' - $ref: '#/components/parameters/force_reload' - $ref: '#/components/parameters/full_section' responses: '201': description: HealthCheck created content: application/json: schema: $ref: '#/components/schemas/healthcheck' '202': description: Configuration change accepted and reload requested headers: Reload-ID: description: ID of the requested reload schema: type: string content: application/json: schema: $ref: '#/components/schemas/healthcheck' '400': $ref: '#/components/responses/BadRequest' '409': $ref: '#/components/responses/AlreadyExists' default: $ref: '#/components/responses/DefaultError' summary: Add a healthcheck tags: - Health Check requestBody: content: application/json: schema: $ref: '#/components/schemas/healthcheck' required: true /services/haproxy/configuration/healthchecks/{name}: delete: description: Deletes a healthcheck from the configuration by it's name. operationId: deleteHealthCheck parameters: - description: HealthCheck name in: path name: name required: true schema: type: string - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/version' - $ref: '#/components/parameters/force_reload' responses: '202': description: Configuration change accepted and reload requested headers: Reload-ID: description: ID of the requested reload schema: type: string '204': description: HealthCheck deleted '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Delete a healthcheck tags: - Health Check get: description: Returns one healthcheck configuration by it's name. operationId: getHealthCheck parameters: - description: HealthCheck name in: path name: name required: true schema: type: string - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/full_section' responses: '200': description: Successful operation headers: Configuration-Version: description: Configuration file version schema: type: string content: application/json: schema: $ref: '#/components/schemas/healthcheck' '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Return a healthcheck tags: - Health Check put: description: Replaces a healthcheck configuration by it's name. operationId: replaceHealthCheck parameters: - description: HealthCheck name in: path name: name required: true schema: type: string - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/version' - $ref: '#/components/parameters/force_reload' - $ref: '#/components/parameters/full_section' responses: '200': description: HealthCheck replaced content: application/json: schema: $ref: '#/components/schemas/healthcheck' '202': description: Configuration change accepted and reload requested headers: Reload-ID: description: ID of the requested reload schema: type: string content: application/json: schema: $ref: '#/components/schemas/healthcheck' '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Replace a healthcheck tags: - Health Check requestBody: content: application/json: schema: $ref: '#/components/schemas/healthcheck' required: true components: parameters: version: name: version in: query description: Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. required: false schema: type: integer force_reload: name: force_reload in: query description: If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. required: false schema: type: boolean default: false full_section: name: full_section in: query description: Indicates if the action affects the specified child resources as well required: false schema: type: boolean default: false transaction_id: name: transaction_id in: query description: ID of the transaction where we want to add the operation. Cannot be used when version is specified. required: false schema: type: string schemas: tcp_checks: title: TCP Checks Array type: array items: $ref: '#/components/schemas/tcp_check' httpchk_params: properties: host: type: string method: enum: - HEAD - PUT - POST - GET - TRACE - PATCH - DELETE - CONNECT - OPTIONS type: string uri: pattern: ^[^ ]*$ type: string version: type: string type: object x-display-name: HTTP Check http_checks: title: HTTP Checks Array type: array items: $ref: '#/components/schemas/http_check' return_header: properties: fmt: type: string name: type: string required: - name - fmt type: object x-go-name: ReturnHeader pgsql_check_params: properties: username: type: string 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 http_check: properties: addr: pattern: ^[^\s]+$ type: string x-dependency: type: value: connect alpn: pattern: ^[^\s]+$ type: string x-dependency: type: value: connect x-display-name: ALPN Protocols body: type: string x-dependency: type: value: send body_log_format: type: string x-dependency: type: value: send check_comment: type: string x-dependency: type: value: - comment - connect - expect - send default: type: boolean x-dependency: type: value: connect error_status: enum: - L7OKC - L7RSP - L7STS - L6RSP - L4CON type: string x-dependency: type: value: expect exclamation_mark: type: boolean x-dependency: type: value: expect x-display-name: Expect Exclamation Mark headers: items: $ref: '#/components/schemas/return_header' type: array x-dependency: type: value: send x-go-name: CheckHeaders x-omitempty: true linger: type: boolean x-dependency: type: value: connect match: enum: - status - rstatus - hdr - fhdr - string - rstring pattern: ^[^\s]+$ type: string x-dependency: type: required: true value: expect x-display-name: Expect Match metadata: additionalProperties: type: object method: enum: - HEAD - PUT - POST - GET - TRACE - PATCH - DELETE - CONNECT - OPTIONS type: string x-dependency: type: value: send min_recv: type: - integer - 'null' x-dependency: type: value: expect ok_status: enum: - L7OK - L7OKC - L6OK - L4OK type: string x-dependency: type: value: expect on_error: type: string x-dependency: type: value: expect on_success: type: string x-dependency: type: value: expect pattern: type: string x-dependency: type: required: true value: expect port: maximum: 65535 minimum: 1 type: - integer - 'null' x-dependency: type: value: connect port_string: type: string x-dependency: type: value: connect proto: type: string x-dependency: type: value: connect send_proxy: type: boolean x-dependency: type: value: connect sni: type: string x-dependency: type: value: connect ssl: type: boolean x-dependency: type: value: connect status-code: type: string x-dependency: type: value: expect tout_status: enum: - L7TOUT - L6TOUT - L4TOUT type: string x-dependency: type: value: expect type: enum: - comment - connect - disable-on-404 - expect - send - send-state - set-var - set-var-fmt - unset-var type: string uri: type: string x-dependency: type: value: send uri_log_format: type: string x-dependency: type: value: send var_expr: type: string x-dependency: type: required: true value: - set-var x-display-name: Var Expression var_format: type: string x-dependency: type: required: true value: - set-var-fmt x-display-name: Var Format var_name: pattern: ^[^\s]+$ type: string x-dependency: type: required: true value: - set-var - set-var-fmt - unset-var var_scope: pattern: ^[^\s]+$ type: string x-dependency: type: required: true value: - set-var - set-var-fmt - unset-var version: type: string x-dependency: type: value: send via_socks4: type: boolean x-dependency: type: value: connect required: - type title: HTTP Check type: object healthcheck_base: description: HealthCheck with all it's children resources properties: httpchk_params: $ref: '#/components/schemas/httpchk_params' x-dependency: type: value: httpchk mysql_check_params: $ref: '#/components/schemas/mysql_check_params' x-dependency: type: value: mysql-check name: pattern: ^[A-Za-z0-9-_.:]+$ type: string pgsql_check_params: $ref: '#/components/schemas/pgsql_check_params' x-dependency: type: value: pgsql-check smtpchk_params: $ref: '#/components/schemas/smtpchk_params' x-dependency: type: value: smtpchk type: enum: - httpchk - ldap-check - mysql-check - pgsql-check - redis-check - smtpchk - spop-check - ssl-hello-chk - tcp-check type: string required: - name type: object x-go-name: HealthCheckBase mysql_check_params: properties: client_version: enum: - pre-41 - post-41 type: string username: type: string type: object tcp_check: properties: action: enum: - comment - connect - expect - send - send-lf - send-binary - send-binary-lf - set-var - set-var-fmt - unset-var type: string addr: pattern: ^[^\s]+$ type: string x-dependency: action: value: connect alpn: pattern: ^[^\s]+$ type: string x-dependency: action: value: connect x-display-name: ALPN Protocols check_comment: type: string x-dependency: action: value: - connect - expect - send - send-lf - send-binary - send-binary-lf data: type: string x-dependency: action: required: true value: send default: type: boolean x-dependency: action: value: connect error_status: enum: - L7OKC - L7RSP - L7STS - L6RSP - L4CON type: string x-dependency: action: value: expect exclamation_mark: type: boolean x-dependency: action: value: expect x-display-name: Expect Exclamation Mark fmt: type: string x-dependency: action: required: true value: send-lf hex_fmt: type: string x-dependency: action: required: true value: send-binary-lf hex_string: type: string x-dependency: action: required: true value: send-binary linger: type: boolean x-dependency: action: value: connect match: enum: - string - rstring - string-lf - binary - rbinary - binary-lf pattern: ^[^\s]+$ type: string x-dependency: action: required: true value: expect x-display-name: Expect Match metadata: additionalProperties: type: object min_recv: type: integer x-dependency: action: value: expect ok_status: enum: - L7OK - L7OKC - L6OK - L4OK type: string x-dependency: action: value: expect on_error: type: string x-dependency: action: value: expect on_success: type: string x-dependency: action: value: expect pattern: type: string x-dependency: action: required: true value: expect port: maximum: 65535 minimum: 1 type: - integer - 'null' x-dependency: action: value: connect port_string: type: string x-dependency: action: value: connect proto: type: string x-dependency: action: value: connect send_proxy: type: boolean x-dependency: action: value: connect sni: type: string x-dependency: action: value: connect ssl: type: boolean x-dependency: action: value: connect status-code: type: string x-dependency: action: value: expect tout_status: enum: - L7TOUT - L6TOUT - L4TOUT type: string x-dependency: action: value: expect var_expr: type: string x-dependency: action: required: true value: - set-var x-display-name: Var Expression var_fmt: type: string x-dependency: action: required: true value: - set-var-fmt x-display-name: Var Log format var_name: pattern: ^[^\s]+$ type: string x-dependency: action: required: true value: - set-var - set-var-fmt - unset-var var_scope: pattern: ^[^\s]+$ type: string x-dependency: action: required: true value: - set-var - set-var-fmt - unset-var via_socks4: type: boolean x-dependency: action: value: connect required: - action title: TCP Check type: object healthcheck: allOf: - $ref: '#/components/schemas/healthcheck_base' - properties: http_check_list: $ref: '#/components/schemas/http_checks' x-go-name: HTTPCheckRuleList tcp_check_list: $ref: '#/components/schemas/tcp_checks' x-go-name: TCPCheckRuleList type: object description: HealthCheck with all it's children resources type: object x-go-name: HealthCheck smtpchk_params: properties: domain: type: string hello: type: string type: object healthchecks: title: HealthChecks description: HAProxy healthchecks array type: array items: $ref: '#/components/schemas/healthcheck' responses: BadRequest: description: Bad request headers: Configuration-Version: description: Configuration file version schema: type: string content: application/json: schema: $ref: '#/components/schemas/error' DefaultError: description: General Error 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' 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' securitySchemes: basic_auth: type: http scheme: basic externalDocs: url: https://docs.haproxy.org/ description: HAProxy Documentation