openapi: 3.2.0 info: title: HAProxy Data Plane TCP Response Rule 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: TCPResponseRule paths: /services/haproxy/configuration/backends/{parent_name}/tcp_response_rules: get: description: Returns all TCP Response Rules that are configured in specified backend. operationId: getAllTCPResponseRuleBackend 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/tcp_response_rules' default: $ref: '#/components/responses/DefaultError' summary: Return an array of all TCP Response Rules tags: - TCPResponseRule put: description: Replaces a whole list of TCP Response Rules with the list given in parameter operationId: replaceAllTCPResponseRuleBackend parameters: - $ref: '#/components/parameters/parent_name' - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/version' - $ref: '#/components/parameters/force_reload' responses: '200': description: All TCP Response Rule lines replaced content: application/json: schema: $ref: '#/components/schemas/tcp_response_rules' '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/tcp_response_rules' '400': $ref: '#/components/responses/BadRequest' default: $ref: '#/components/responses/DefaultError' summary: Replace a TCP Response Rule list tags: - TCPResponseRule requestBody: content: application/json: schema: $ref: '#/components/schemas/tcp_response_rules' required: true /services/haproxy/configuration/defaults/{parent_name}/tcp_response_rules: get: description: Returns all TCP Response Rules that are configured in specified backend. operationId: getAllTCPResponseRuleDefaults 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/tcp_response_rules' default: $ref: '#/components/responses/DefaultError' summary: Return an array of all TCP Response Rules tags: - TCPResponseRule put: description: Replaces a whole list of TCP Response Rules with the list given in parameter operationId: replaceAllTCPResponseRuleDefaults parameters: - $ref: '#/components/parameters/parent_name' - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/version' - $ref: '#/components/parameters/force_reload' responses: '200': description: All TCP Response Rule lines replaced content: application/json: schema: $ref: '#/components/schemas/tcp_response_rules' '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/tcp_response_rules' '400': $ref: '#/components/responses/BadRequest' default: $ref: '#/components/responses/DefaultError' summary: Replace a TCP Response Rule list tags: - TCPResponseRule requestBody: content: application/json: schema: $ref: '#/components/schemas/tcp_response_rules' required: true /services/haproxy/configuration/backends/{parent_name}/tcp_response_rules/{index}: delete: description: Deletes a TCP Response Rule configuration by it's index from the specified backend. operationId: deleteTCPResponseRuleBackend parameters: - description: TCP Response Rule Index in: path name: index required: true schema: type: integer - $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: TCP Response Rule deleted '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Delete a TCP Response Rule tags: - TCPResponseRule get: description: Returns one TCP Response Rule configuration by it's index in the specified backend. operationId: getTCPResponseRuleBackend parameters: - description: TCP Response Rule Index in: path name: index required: true schema: type: integer - $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/tcp_response_rule' '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Return one TCP Response Rule tags: - TCPResponseRule post: description: Adds a new TCP Response Rule of the specified type in the specified backend. operationId: createTCPResponseRuleBackend parameters: - description: TCP Response Rule Index in: path name: index required: true schema: type: integer - $ref: '#/components/parameters/parent_name' - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/version' - $ref: '#/components/parameters/force_reload' responses: '201': description: TCP Response Rule created content: application/json: schema: $ref: '#/components/schemas/tcp_response_rule' '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/tcp_response_rule' '400': $ref: '#/components/responses/BadRequest' '409': $ref: '#/components/responses/AlreadyExists' default: $ref: '#/components/responses/DefaultError' summary: Add a new TCP Response Rule tags: - TCPResponseRule requestBody: content: application/json: schema: $ref: '#/components/schemas/tcp_response_rule' required: true put: description: Replaces a TCP Response Rule configuration by it's Index in the specified backend. operationId: replaceTCPResponseRuleBackend parameters: - description: TCP Response Rule Index in: path name: index required: true schema: type: integer - $ref: '#/components/parameters/parent_name' - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/version' - $ref: '#/components/parameters/force_reload' responses: '200': description: TCP Response Rule replaced content: application/json: schema: $ref: '#/components/schemas/tcp_response_rule' '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/tcp_response_rule' '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Replace a TCP Response Rule tags: - TCPResponseRule requestBody: content: application/json: schema: $ref: '#/components/schemas/tcp_response_rule' required: true /services/haproxy/configuration/defaults/{parent_name}/tcp_response_rules/{index}: delete: description: Deletes a TCP Response Rule configuration by it's index from the specified backend. operationId: deleteTCPResponseRuleDefaults parameters: - description: TCP Response Rule Index in: path name: index required: true schema: type: integer - $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: TCP Response Rule deleted '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Delete a TCP Response Rule tags: - TCPResponseRule get: description: Returns one TCP Response Rule configuration by it's index in the specified backend. operationId: getTCPResponseRuleDefaults parameters: - description: TCP Response Rule Index in: path name: index required: true schema: type: integer - $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/tcp_response_rule' '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Return one TCP Response Rule tags: - TCPResponseRule post: description: Adds a new TCP Response Rule of the specified type in the specified backend. operationId: createTCPResponseRuleDefaults parameters: - description: TCP Response Rule Index in: path name: index required: true schema: type: integer - $ref: '#/components/parameters/parent_name' - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/version' - $ref: '#/components/parameters/force_reload' responses: '201': description: TCP Response Rule created content: application/json: schema: $ref: '#/components/schemas/tcp_response_rule' '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/tcp_response_rule' '400': $ref: '#/components/responses/BadRequest' '409': $ref: '#/components/responses/AlreadyExists' default: $ref: '#/components/responses/DefaultError' summary: Add a new TCP Response Rule tags: - TCPResponseRule requestBody: content: application/json: schema: $ref: '#/components/schemas/tcp_response_rule' required: true put: description: Replaces a TCP Response Rule configuration by it's Index in the specified backend. operationId: replaceTCPResponseRuleDefaults parameters: - description: TCP Response Rule Index in: path name: index required: true schema: type: integer - $ref: '#/components/parameters/parent_name' - $ref: '#/components/parameters/transaction_id' - $ref: '#/components/parameters/version' - $ref: '#/components/parameters/force_reload' responses: '200': description: TCP Response Rule replaced content: application/json: schema: $ref: '#/components/schemas/tcp_response_rule' '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/tcp_response_rule' '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' default: $ref: '#/components/responses/DefaultError' summary: Replace a TCP Response Rule tags: - TCPResponseRule requestBody: content: application/json: schema: $ref: '#/components/schemas/tcp_response_rule' 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 tcp_response_rule: additionalProperties: false description: HAProxy TCP Response Rule configuration (corresponds to tcp-response) example: cond: if cond_test: '{ src 192.168.0.0/16 }' index: 0 type: content properties: action: enum: - accept - close - lua - reject - sc-add-gpc - sc-inc-gpc - sc-inc-gpc0 - sc-inc-gpc1 - sc-set-gpt - sc-set-gpt0 - send-spoe-group - set-bandwidth-limit - set-fc-mark - set-fc-tos - set-log-level - set-mark - set-nice - set-tos - set-var - set-var-fmt - silent-drop - unset-var - do-log type: string x-dependency: type: required: true value: content bandwidth_limit_limit: type: string x-dependency: action: value: set-bandwidth-limit type: value: content x-display-name: Standard HAProxy expression bandwidth_limit_name: type: string x-dependency: action: value: set-bandwidth-limit type: value: content x-display-name: Bandwidth limit name bandwidth_limit_period: type: string x-dependency: action: value: set-bandwidth-limit type: value: content x-display-name: Standard HAProxy expression cond: enum: - if - unless type: string x-dependency: type: value: content x-display-name: Condition cond_test: type: string x-dependency: cond: required: true type: value: content x-display-name: Condition Test x-dynamic-enum: freeFormat: true operation: getACLs property: acl_name expr: type: string x-dependency: action: required: true value: - set-src-port - sc-set-gpt0 - set-fc-mark - set-fc-tos type: value: content x-display-name: Standard HAProxy expression log_level: enum: - emerg - alert - crit - err - warning - notice - info - debug - silent type: string x-dependency: action: required: true value: set-log-level type: value: content log_profile: type: string x-dependency: action: value: do-log x-display-name: Log Profile lua_action: pattern: ^[^\s]+$ type: string x-dependency: action: required: true value: lua type: value: content x-display-name: Lua action name lua_params: type: string x-dependency: action: value: lua type: value: content x-display-name: Lua action params mark_value: pattern: ^(0x[0-9A-Fa-f]+|[0-9]+)$ type: string x-dependency: action: required: true value: set-mark type: value: content x-display-name: Mark Value metadata: additionalProperties: type: object nice_value: maximum: 1024 minimum: -1024 type: integer x-dependency: action: required: true value: set-nice type: value: content x-display-name: Nice Value rst_ttl: type: integer x-dependency: type: required: true value: - silent-drop x-display-name: RST TTL sc_expr: type: string x-dependency: action: required: true value: - sc-add-gpc - sc-inc-gpc type: value: content x-display-name: ScSet Expression Value sc_id: type: integer x-dependency: action: required: true value: - sc-add-gpc - sc-inc-gpc - sc-inc-gpc0 - sc-inc-gpc1 - sc-set-gpt - sc-set-gpt0 type: value: content sc_idx: type: integer x-dependency: action: required: true value: - sc-add-gpc - sc-set-gpt - sc-inc-gpc type: value: content sc_int: type: - integer - 'null' x-dependency: action: required: true value: - sc-add-gpc - sc-inc-gpc type: value: content x-display-name: ScSet Integer Value spoe_engine: pattern: ^[^\s]+$ type: string x-dependency: action: required: true value: send-spoe-group type: value: content x-display-name: SPOE Engine spoe_group: pattern: ^[^\s]+$ type: string x-dependency: action: required: true value: send-spoe-group type: value: content x-display-name: SPOE Group timeout: type: - integer - 'null' x-default-unit: ms x-dependency: type: required: true value: inspect-delay x-duration: true tos_value: pattern: ^(0x[0-9A-Fa-f]+|[0-9]+)$ type: string x-dependency: action: required: true value: set-tos type: value: content x-display-name: Tos Value type: enum: - content - inspect-delay type: string var_format: type: string x-dependency: action: required: true value: set-var-fmt type: value: content x-display-name: Var Format var_name: pattern: ^[^\s]+$ type: string x-dependency: action: required: true value: - unset-var type: value: content var_scope: pattern: ^[^\s]+$ type: string x-dependency: action: value: unset-var type: value: content required: - type title: TCP Response Rule type: object tcp_response_rules: title: TCP Response Rules Array description: HAProxy TCP response rules array (corresponds to tcp-response directive) type: array items: $ref: '#/components/schemas/tcp_response_rule' 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