openapi: 3.2.0 info: title: HAProxy Data Plane Transactions 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: Transactions description: 'Managing transactions. Configuration changes can be grouped in the transaction. You start the transaction with trasactions POST, and call the configuration changes you need with parameter transaction_id. When you want to commit the transaction, you call the transactions PUT and all changes in that transaction is committed. If you call a configuration change without the transaction_id, transaction mechanism is implicitly called with one operation in transaction.' paths: /services/haproxy/transactions: get: description: Returns a list of HAProxy configuration transactions. Transactions can be filtered by their status. operationId: getTransactions parameters: - description: Filter by transaction status in: query name: status required: false schema: type: string enum: - failed - in_progress responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/transactions' default: $ref: '#/components/responses/DefaultError' summary: Return list of HAProxy configuration transactions tags: - Transactions post: description: Starts a new transaction and returns it's id operationId: startTransaction parameters: - description: Configuration version on which to work on in: query name: version required: true schema: type: integer responses: '201': description: Transaction started headers: Configuration-Version: description: Configuration file version schema: type: string content: application/json: schema: $ref: '#/components/schemas/transaction' '429': description: Too many open transactions content: application/json: schema: example: code: 429 message: cannot start a new transaction, reached the maximum amount of 20 active transactions available properties: code: type: integer message: type: string type: object default: $ref: '#/components/responses/DefaultError' summary: Start a new transaction tags: - Transactions /services/haproxy/transactions/{id}: delete: description: Deletes a transaction. operationId: deleteTransaction parameters: - description: Transaction id in: path name: id required: true schema: type: string responses: '204': description: Transaction deleted '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Delete a transaction tags: - Transactions get: description: Returns one HAProxy configuration transactions. operationId: getTransaction parameters: - description: Transaction id in: path name: id required: true schema: type: string responses: '200': description: Successful operation headers: Configuration-Version: description: Configuration file version schema: type: string content: application/json: schema: $ref: '#/components/schemas/transaction' '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Return one HAProxy configuration transactions tags: - Transactions put: description: Commit transaction, execute all operations in transaction and return msg operationId: commitTransaction parameters: - description: Transaction id in: path name: id required: true schema: type: string - $ref: '#/components/parameters/force_reload' responses: '200': description: Transaction successfully committed headers: Configuration-Version: description: Configuration file version schema: type: string content: application/json: schema: $ref: '#/components/schemas/transaction' '202': description: Configuration change accepted and reload requested headers: Configuration-Version: description: Configuration file version schema: type: string Reload-ID: description: ID of the requested reload schema: type: string content: application/json: schema: $ref: '#/components/schemas/transaction' '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' '406': $ref: '#/components/responses/NotAcceptable' default: $ref: '#/components/responses/DefaultError' summary: Commit transaction tags: - Transactions components: schemas: error: additionalProperties: type: string description: API Error properties: code: type: - integer - 'null' message: type: - string - 'null' required: - code - message title: Error type: object transactions: title: Transactions array description: Configuration transactions array type: array items: $ref: '#/components/schemas/transaction' transaction: description: HAProxy configuration transaction example: _version: 2 id: 273e3385-2d0c-4fb1-aa27-93cbb31ff203 status: in_progress properties: _version: type: integer id: pattern: ^[^\s]+$ type: string status: enum: - failed - outdated - in_progress - success type: string title: Configuration transaction 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' NotAcceptable: description: The specified resource cannot be handled headers: Configuration-Version: description: Configuration file version schema: type: string content: application/json: schema: $ref: '#/components/schemas/error' parameters: 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 securitySchemes: basic_auth: type: http scheme: basic externalDocs: url: https://docs.haproxy.org/ description: HAProxy Documentation