forked from haproxytech/dataplaneapi-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhaproxy-spec.yaml
More file actions
447 lines (447 loc) · 15.6 KB
/
haproxy-spec.yaml
File metadata and controls
447 lines (447 loc) · 15.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
---
swagger: "2.0"
info:
title: HAProxy Data Plane API
description: |
API for editing and managing haproxy instances. Provides process information, configuration management,
haproxy stats and logs.
version: '2.0'
contact:
name: HAProxy Support
url: https://my.haproxy.com/portal/cust/login
email: support@haproxy.com
externalDocs:
url: https://cbonte.github.io/haproxy-dconv/
description: HAProxy Documentation
definitions:
site:
$ref: "models/simple.yaml#/site"
sites:
title: Sites
description: |
Sites array. Sites are considered as one service and all farms connected to that service.
Farms are connected to service using use-backend and default_backend directives. Sites let you
configure simple HAProxy configurations, for more advanced options use /haproxy/configuration
endpoints.
type: array
items:
$ref: "#/definitions/site"
global:
$ref: "models/configuration.yaml#/global"
defaults:
$ref: "models/configuration.yaml#/defaults"
frontend:
$ref: "models/configuration.yaml#/frontend"
frontends:
title: Frontends
description: HAProxy frontends array
type: array
items:
$ref: '#/definitions/frontend'
backend:
$ref: "models/configuration.yaml#/backend"
backends:
title: Backends
description: HAProxy backends array
type: array
items:
$ref: '#/definitions/backend'
bind:
$ref: "models/configuration.yaml#/bind"
binds:
title: Binds
description: HAProxy frontend binds array (corresponds to bind directives)
type: array
items:
$ref: '#/definitions/bind'
server:
$ref: "models/configuration.yaml#/server"
servers:
title: Servers
description: HAProxy backend servers array
type: array
items:
$ref: '#/definitions/server'
http_request_rule:
$ref: "models/configuration.yaml#/http_request_rule"
http_request_rules:
title: HTTP Request Rules Array
description: HAProxy HTTP request rules array (corresponds to http-request directives)
type: array
items:
$ref: '#/definitions/http_request_rule'
http_response_rule:
$ref: "models/configuration.yaml#/http_response_rule"
http_response_rules:
title: HTTP Response Rules Array
description: HAProxy HTTP response rules array (corresponds to http-response directives)
type: array
items:
$ref: '#/definitions/http_response_rule'
tcp_request_rule:
$ref: "models/configuration.yaml#/tcp_request_rule"
tcp_request_rules:
title: TCP Request Rules Array
description: HAProxy TCP request rules array (corresponds to tcp-request directive)
type: array
items:
$ref: '#/definitions/tcp_request_rule'
tcp_response_rule:
$ref: "models/configuration.yaml#/tcp_response_rule"
tcp_response_rules:
title: TCP Response Rules Array
description: HAProxy TCP response rules array (corresponds to tcp-response directive)
type: array
items:
$ref: '#/definitions/tcp_response_rule'
backend_switching_rule:
$ref: "models/configuration.yaml#/backend_switching_rule"
backend_switching_rules:
title: Backend Switching Rules Array
description: HAProxy backend switching rules array (corresponds to use_backend directives)
type: array
items:
$ref: '#/definitions/backend_switching_rule'
server_switching_rule:
$ref: "models/configuration.yaml#/server_switching_rule"
server_switching_rules:
title: Server Switching Rules Array
description: HAProxy backend server switching rules array (corresponds to use-server directives)
type: array
items:
$ref: '#/definitions/server_switching_rule'
filter:
$ref: "models/configuration.yaml#/filter"
filters:
title: Filters Array
description: HAProxy filters array (corresponds to filter directive)
type: array
items:
$ref: '#/definitions/filter'
stick_rule:
$ref: "models/configuration.yaml#/stick_rule"
stick_rules:
title: Stick Rules Array
description: HAProxy backend stick rules array (corresponds to stick store-request, stick match, stick on, stick store-response)
type: array
items:
$ref: '#/definitions/stick_rule'
log_target:
$ref: "models/configuration.yaml#/log_target"
log_targets:
title: Log Target Array
description: HAProxy log target array (corresponds to log directives)
type: array
items:
$ref: '#/definitions/log_target'
acl:
$ref: "models/configuration.yaml#/acl"
acls:
title: ACL Lines Array
description: HAProxy ACL lines array (corresponds to acl directives)
type: array
items:
$ref: '#/definitions/acl'
native_stats:
$ref: "models/stats.yaml#/native_stats"
native_stat:
$ref: "models/stats.yaml#/native"
error:
$ref: "models/errors.yaml#/error"
endpoint:
$ref: "models/general.yaml#/endpoint"
endpoints:
title: Endpoints Array
description: Collection of endpoints
type: array
items:
$ref: '#/definitions/endpoint'
process_infos:
$ref: "models/runtime.yaml#/process_infos"
transaction:
$ref: "models/general.yaml#/transaction"
transactions:
title: Transactions array
description: Configuration transactions array
type: array
items:
$ref: "#/definitions/transaction"
info:
$ref: "models/general.yaml#/info"
reload:
$ref: "models/general.yaml#/reload"
reloads:
title: HAProxy Reloads Array
description: HAProxy reloads array
type: array
items:
$ref: "#/definitions/reload"
runtime_server:
$ref: "models/runtime.yaml#/server"
runtime_servers:
title: HAProxy Runtime Servers Array
description: HAProxy runtime servers array
type: array
items:
$ref: "#/definitions/runtime_server"
stick_table:
$ref: "models/runtime.yaml#/table"
stick_tables:
title: Stick Tables Array
description: Array of runtime stick tables
type: array
items:
$ref: "#/definitions/stick_table"
stick_table_entry:
$ref: "models/runtime.yaml#/table_entry"
stick_table_entries:
title: Stick Tables Entries
description: Entries of one runtime stick table
type: array
items:
$ref: "#/definitions/stick_table_entry"
balance:
$ref: "models/configuration.yaml#/balance"
forwardfor:
$ref: "models/configuration.yaml#/forwardfor"
default_server:
$ref: "models/configuration.yaml#/default_server"
httpchk:
$ref: "models/configuration.yaml#/httpchk"
redispatch:
$ref: "models/configuration.yaml#/redispatch"
errorfile:
$ref: "models/configuration.yaml#/errorfile"
cookie:
$ref: "models/configuration.yaml#/cookie"
responses:
BadRequest:
description: Bad request
headers:
Configuration-Version:
description: Configuration file version
type: integer
x-nullable: false
schema:
$ref: '#/definitions/error'
NotFound:
description: The specified resource was not found
headers:
Configuration-Version:
description: Configuration file version
type: integer
x-nullable: false
schema:
$ref: '#/definitions/error'
AlreadyExists:
description: The specified resource already exists
headers:
Configuration-Version:
description: Configuration file version
type: integer
x-nullable: false
schema:
$ref: '#/definitions/error'
DefaultError:
description: General Error
headers:
Configuration-Version:
description: Configuration file version
type: integer
x-nullable: false
schema:
$ref: '#/definitions/error'
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.
type: string
required: false
x-nullable: false
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.
type: integer
required: false
x-nullable: false
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.
type: boolean
required: false
default: false
securityDefinitions:
basic_auth:
type: basic
basePath: /v2
schemes:
- http
consumes:
- application/json
produces:
- application/json
tags:
- name: Discovery
description: API autodiscover endpoints
- name: Information
- name: Specification
- 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 commited. If you call a configuration change without the transaction_id,
transaction mechanism is implicitly called with one operation in transaction.
- name: Reloads
description: |
Checking reload success. To avoid constant reloading we reload in intervals that are configurable when
with reload-delay option. When a change to configuration is made and force_reload url query string
parameter is false we issue a request for reload, and return the reload ID in response header. You can
then use reloads endpoints to check the status of that reload ID. If force_reload is true, we override all
of this and reload immediately.
- name: Sites
description: |
Managing sites (simple configuration mode). Sites are considered as one frontend with multiple backends
connected to it via default_backend or use-backend directives.
- name: Stats
description: Stats container
- name: Global
description: Managing global configuration (advanced mode)
- name: Defaults
description: Managing defaults configuration (advanced mode)
- name: Frontend
description: Managing frontend configuration (advanced mode)
- name: Backend
description: Managing backend configurations (advanced mode)
- name: Bind
description: Managing frontend bind configurations (advanced mode)
- name: Server
description: Managing backend server configurations (advanced mode)
- name: Frontend options
description: Various frontend options (advanced mode)
- name: Backend options
description: Various backend options (advanced mode)
- name: Configuration
description: Raw HAProxy configuration management (advanced mode)
- name: HAProxy configuration management
description: Managing advanced haproxy configuration (advanced mode)
- name: TCPRequestRule
- name: HTTPRequestRule
- name: HTTPResponseRule
- name: BackendSwitchingRule
- name: ServerSwitchingRule
- name: TCPResponseRule
- name: Filter
- name: StickRule
- name: LogTarget
- name: ACL
security:
- basic_auth: []
paths:
/:
$ref: "paths/general.yaml#/root"
/specification:
$ref: "paths/general.yaml#/specification"
/info:
$ref: "paths/general.yaml#/info"
/services:
$ref: "paths/general.yaml#/services"
/services/haproxy:
$ref: "paths/general.yaml#/haproxy"
/services/haproxy/sites:
$ref: "paths/simple.yaml#/sites"
/services/haproxy/sites/{name}:
$ref: "paths/simple.yaml#/sites_one"
/services/haproxy/stats:
$ref: "paths/general.yaml#/stats"
/services/haproxy/stats/native:
$ref: "paths/stats.yaml#/native"
/services/haproxy/transactions:
$ref: "paths/general.yaml#/transactions"
/services/haproxy/transactions/{id}:
$ref: "paths/general.yaml#/transactions_one"
/services/haproxy/reloads:
$ref: "paths/general.yaml#/reloads"
/services/haproxy/reloads/{id}:
$ref: "paths/general.yaml#/reloads_one"
/services/haproxy/configuration:
$ref: "paths/general.yaml#/configuration"
/services/haproxy/configuration/global:
$ref: "paths/configuration.yaml#/global"
/services/haproxy/configuration/defaults:
$ref: "paths/configuration.yaml#/defaults"
/services/haproxy/configuration/frontends:
$ref: "paths/configuration.yaml#/frontends"
/services/haproxy/configuration/frontends/{name}:
$ref: "paths/configuration.yaml#/frontends_one"
/services/haproxy/configuration/backends:
$ref: "paths/configuration.yaml#/backends"
/services/haproxy/configuration/backends/{name}:
$ref: "paths/configuration.yaml#/backends_one"
/services/haproxy/configuration/binds:
$ref: "paths/configuration.yaml#/binds"
/services/haproxy/configuration/binds/{name}:
$ref: "paths/configuration.yaml#/binds_one"
/services/haproxy/configuration/servers:
$ref: "paths/configuration.yaml#/servers"
/services/haproxy/configuration/servers/{name}:
$ref: "paths/configuration.yaml#/servers_one"
/services/haproxy/configuration/http_request_rules:
$ref: "paths/configuration.yaml#/http_request_rules"
/services/haproxy/configuration/http_request_rules/{id}:
$ref: "paths/configuration.yaml#/http_request_rules_one"
/services/haproxy/configuration/http_response_rules:
$ref: "paths/configuration.yaml#/http_response_rules"
/services/haproxy/configuration/http_response_rules/{id}:
$ref: "paths/configuration.yaml#/http_response_rules_one"
/services/haproxy/configuration/tcp_request_rules:
$ref: "paths/configuration.yaml#/tcp_request_rules"
/services/haproxy/configuration/tcp_request_rules/{id}:
$ref: "paths/configuration.yaml#/tcp_request_rules_one"
/services/haproxy/configuration/tcp_response_rules:
$ref: "paths/configuration.yaml#/tcp_response_rules"
/services/haproxy/configuration/tcp_response_rules/{id}:
$ref: "paths/configuration.yaml#/tcp_response_rules_one"
/services/haproxy/configuration/backend_switching_rules:
$ref: "paths/configuration.yaml#/backend_switching_rules"
/services/haproxy/configuration/backend_switching_rules/{id}:
$ref: "paths/configuration.yaml#/backend_switching_rules_one"
/services/haproxy/configuration/server_switching_rules:
$ref: "paths/configuration.yaml#/server_switching_rules"
/services/haproxy/configuration/server_switching_rules/{id}:
$ref: "paths/configuration.yaml#/server_switching_rules_one"
/services/haproxy/configuration/filters:
$ref: "paths/configuration.yaml#/filters"
/services/haproxy/configuration/filters/{id}:
$ref: "paths/configuration.yaml#/filters_one"
/services/haproxy/configuration/stick_rules:
$ref: "paths/configuration.yaml#/stick_rules"
/services/haproxy/configuration/stick_rules/{id}:
$ref: "paths/configuration.yaml#/stick_rules_one"
/services/haproxy/configuration/log_targets:
$ref: "paths/configuration.yaml#/log_targets"
/services/haproxy/configuration/log_targets/{id}:
$ref: "paths/configuration.yaml#/log_targets_one"
/services/haproxy/configuration/acls:
$ref: "paths/configuration.yaml#/acls"
/services/haproxy/configuration/acls/{id}:
$ref: "paths/configuration.yaml#/acls_one"
/services/haproxy/configuration/raw:
$ref: "paths/configuration.yaml#/configuration"
/services/haproxy/runtime:
$ref: "paths/general.yaml#/runtime"
/services/haproxy/runtime/info:
$ref: "paths/runtime.yaml#/process_info"
/services/haproxy/runtime/servers:
$ref: "paths/runtime.yaml#/servers"
/services/haproxy/runtime/servers/{name}:
$ref: "paths/runtime.yaml#/servers_one"
/services/haproxy/runtime/stick_tables:
$ref: "paths/runtime.yaml#/stick_tables"
/services/haproxy/runtime/stick_tables/{name}:
$ref: "paths/runtime.yaml#/stick_tables_one"
/services/haproxy/runtime/stick_table_entries:
$ref: "paths/runtime.yaml#/stick_table_entries"