openapi: 3.2.0 info: title: HAProxy Data Plane Table 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: Table paths: /services/haproxy/configuration/peers/{parent_name}/tables: get: description: Returns an array of all tables that are configured in specified peer section. operationId: getTables parameters: - $ref: '#/components/parameters/parent_name' - $ref: '#/components/parameters/transaction_id' responses: '200': description: Successful operation headers: Configuration-Version: description: Configuration file version schema: type: string content: application/json: schema: $ref: '#/components/schemas/tables' default: $ref: '#/components/responses/DefaultError' summary: Return an array of tables tags: - Table post: description: Adds a new table in the specified peer section in the configuration file. operationId: createTable parameters: - $ref: '#/components/parameters/parent_name' - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/version' - $ref: '#/components/parameters/force_reload' responses: '201': description: Table created content: application/json: schema: $ref: '#/components/schemas/table' '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/table' '400': $ref: '#/components/responses/BadRequest' '409': $ref: '#/components/responses/AlreadyExists' default: $ref: '#/components/responses/DefaultError' summary: Add a new table tags: - Table requestBody: content: application/json: schema: $ref: '#/components/schemas/table' required: true /services/haproxy/configuration/peers/{parent_name}/tables/{name}: delete: description: Deletes a table configuration by it's name in the specified peer section. operationId: deleteTable parameters: - description: Table name in: path name: name required: true schema: type: string - $ref: '#/components/parameters/parent_name' - $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: Table deleted '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Delete a table tags: - Table get: description: Returns one table configuration by it's name in the specified peer section. operationId: getTable parameters: - description: Table name in: path name: name required: true schema: type: string - $ref: '#/components/parameters/parent_name' - $ref: '#/components/parameters/transaction_id' responses: '200': description: Successful operation headers: Configuration-Version: description: Configuration file version schema: type: string content: application/json: schema: $ref: '#/components/schemas/table' '404': $ref: '#/components/responses/AlreadyExists' default: $ref: '#/components/responses/DefaultError' summary: Return one table tags: - Table put: description: Replaces a table configuration by it's name in the specified peer section. operationId: replaceTable parameters: - description: Table name in: path name: name required: true schema: type: string - $ref: '#/components/parameters/parent_name' - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/version' - $ref: '#/components/parameters/force_reload' responses: '200': description: Table replaced content: application/json: schema: $ref: '#/components/schemas/table' '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/table' '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Replace a table tags: - Table requestBody: content: application/json: schema: $ref: '#/components/schemas/table' required: true components: parameters: 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 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 parent_name: name: parent_name in: path description: Parent name required: true schema: type: string pattern: ^[^\r\n<>*;$#&{}"]+$ 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 schemas: error: additionalProperties: type: string description: API Error properties: code: type: - integer - 'null' message: type: - string - 'null' required: - code - message title: Error type: object tables: title: Tables description: HAProxy table array type: array items: $ref: '#/components/schemas/table' table: properties: expire: pattern: ^\d+(ms|s|m|h|d)?$ type: - string - 'null' x-default-unit: ms x-duration: true metadata: additionalProperties: type: object name: type: string no_purge: type: boolean x-display-name: No Purge recv_only: type: boolean x-display-name: Receive Only size: pattern: ^\d+(k|K|m|M|g|G)?$ type: string x-size: true store: type: string type: enum: - ip - integer - string - binary type: string type_len: type: - integer - 'null' x-display-name: Type write_to: type: - string - 'null' required: - name type: object 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