-
Notifications
You must be signed in to change notification settings - Fork 0
/
airflow_2.0.0_api_v1_openapi.yaml
2896 lines (2619 loc) · 84.6 KB
/
airflow_2.0.0_api_v1_openapi.yaml
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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
---
openapi: 3.0.3
info:
title: "Airflow API (Stable)"
description: |
# Overview
To facilitate management, the Apache Airflow supports a range of REST API endpoints across its
objects.
This section provides an overview of the API design, methods, and supported use cases.
Most of the endpoints accept `JSON` as input and return `JSON` responses.
This means that you must usually add the following headers to your request:
```
Content-type: application/json
Accept: application/json
```
## Resources
The term `resource` refers to a single type of object in the Airflow metadata. An API is broken up by its
endpoint's corresponding resource.
The name of a resource is typically plural and expressed in camelCase. Example: `dagRuns`.
Resource names are used as part of endpoint URLs, as well as in API parameters and responses.
## CRUD Operations
The platform supports **C**reate, **R**ead, **U**pdate, and **D**elete operations on most resources.
You can review the standards for these operations and their standard parameters below.
Some endpoints have special behavior as exceptions.
### Create
To create a resource, you typically submit an HTTP `POST` request with the resource's required metadata
in the request body.
The response returns a `201 Created` response code upon success with the resource's metadata, including
its internal `id`, in the response body.
### Read
An HTTP `GET` request can be used to read a resource or to list a number of resources.
A resource's `id` can be submitted in the request parameters to read a specific resource.
The response usually returns a `200 OK` response code upon success, with the resource's metadata in
the response body.
If a `GET` request does not include a specific resource `id`, it is treated as a list request.
The response usually returns a `200 OK` response code upon success, with an object containing a list
of resources' metadata in the response body.
When reading resources, some common query parameters are usually available. e.g.:
```
v1/connections?limit=25&offset=25
```
|Query Parameter|Type|Description|
|---------------|----|-----------|
|limit|integer|Maximum number of objects to fetch. Usually 25 by default|
|offset|integer|Offset after which to start returning objects. For use with limit query parameter.|
### Update
Updating a resource requires the resource `id`, and is typically done using an HTTP `PATCH` request,
with the fields to modify in the request body.
The response usually returns a `200 OK` response code upon success, with information about the modified
resource in the response body.
### Delete
Deleting a resource requires the resource `id` and is typically executing via an HTTP `DELETE` request.
The response usually returns a `204 No Content` response code upon success.
## Conventions
- Resource names are plural and expressed in camelCase.
- Names are consistent between URL parameter name and field name.
- Field names are in snake_case.
```json
{
"name": "string",
"slots": 0,
"occupied_slots": 0,
"used_slots": 0,
"queued_slots": 0,
"open_slots": 0
}
```
### Update Mask
Update mask is available as a query parameter in patch endpoints. It is used to notify the
API which fields you want to update. Using `update_mask` makes it easier to update objects
by helping the server know which fields to update in an object instead of updating all fields.
The update request ignores any fields that aren't specified in the field mask, leaving them with
their current values.
Example:
```
resource = request.get('/resource/my-id').json()
resource['my_field'] = 'new-value'
request.patch('/resource/my-id?update_mask=my_field', data=json.dumps(resource))
```
## Versioning and Endpoint Lifecycle
- API versioning is not synchronized to specific releases of the Apache Airflow.
- APIs are designed to be backward compatible.
- Any changes to the API will first go through a deprecation phase.
# Summary of Changes
| Airflow version | Description |
|-|-|
| v2.0 | Initial releaase |
# Trying the API
You can use a third party client, such as [curl](https://curl.haxx.se/), [HTTPie](https://httpie.org/),
[Postman](https://www.postman.com/) or [the Insomnia rest client](https://insomnia.rest/) to test
the Apache Airflow API.
Note that you will need to pass credentials data.
For e.g., here is how to pause a DAG with [curl](https://curl.haxx.se/), when basic authorization is used:
```bash
curl -X POST 'https://example.com/api/v1/dags/{dag_id}?update_mask=is_paused' \
-H 'Content-Type: application/json' \
--user "username:password" \
-d '{
"is_paused": true
}'
```
Using a graphical tool such as [Postman](https://www.postman.com/) or [Insomnia](https://insomnia.rest/),
it is possible to import the API specifications directly:
1. Download the API specification by clicking the **Download** button at top of this document
2. Import the JSON specification in the graphical tool of your choice.
- In *Postman*, you can click the **import** button at the top
- With *Insomnia*, you can just drag-and-drop the file on the UI
Note that with *Postman*, you can also generate code snippets by selecting a request and clicking on
the **Code** button.
# Authentication
To be able to meet the requirements of many organizations, Airflow supports many authentication methods,
and it is even possible to add your own method.
If you want to check which auth backend is currently set, you can use
`airflow config get-value api auth_backend` command as in the example below.
```bash
$ airflow config get-value api auth_backend
airflow.api.auth.backend.basic_auth
```
The default is to deny all requests.
For details on configuring the authentication, see
[API Authorization](https://airflow.apache.org/docs/stable/security/api.html).
# Errors
We follow the error response format proposed in [RFC 7807](https://tools.ietf.org/html/rfc7807)
also known as Problem Details for HTTP APIs. As with our normal API responses,
your client must be prepared to gracefully handle additional members of the response.
## Unauthenticated
This indicates that the request has not been applied because it lacks valid authentication
credentials for the target resource. Please check that you have valid credentials.
## PermissionDenied
This response means that the server understood the request but refuses to authorize
it because it lacks sufficient rights to the resource. It happens when you do not have the
necessary permission to execute the action you performed. You need to get the appropriate
permissions in other to resolve this error.
## BadRequest
This response means that the server cannot or will not process the request due to something
that is perceived to be a client error (e.g., malformed request syntax, invalid request message
framing, or deceptive request routing). To resolve this, please ensure that your syntax is correct.
## NotFound
This client error response indicates that the server cannot find the requested resource.
## MethodNotAllowed
Indicates that the request method is known by the server but is not supported by the target resource.
## NotAcceptable
The target resource does not have a current representation that would be acceptable to the user
agent, according to the proactive negotiation header fields received in the request, and the
server is unwilling to supply a default representation.
## AlreadyExists
The request could not be completed due to a conflict with the current state of the target
resource, meaning that the resource already exists
## Unknown
This means that the server encountered an unexpected condition that prevented it from
fulfilling the request.
version: '1.0.0'
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
contact:
name: Apache Software Foundation
url: https://airflow.apache.org
email: dev@airflow.apache.org
servers:
- url: /api/v1
description: Apache Airflow Stable API.
paths:
# Database entities
/connections:
get:
summary: List connections
x-openapi-router-controller: airflow.api_connexion.endpoints.connection_endpoint
operationId: get_connections
tags: [Connection]
parameters:
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/PageOffset'
responses:
'200':
description: Success.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/ConnectionCollection'
- $ref: '#/components/schemas/CollectionInfo'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
post:
summary: Create a connection
x-openapi-router-controller: airflow.api_connexion.endpoints.connection_endpoint
operationId: post_connection
tags: [Connection]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Connection'
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/Connection'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
/connections/{connection_id}:
parameters:
- $ref: '#/components/parameters/ConnectionID'
get:
summary: Get a connection
x-openapi-router-controller: airflow.api_connexion.endpoints.connection_endpoint
operationId: get_connection
tags: [Connection]
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/Connection'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
patch:
summary: Update a connection
x-openapi-router-controller: airflow.api_connexion.endpoints.connection_endpoint
operationId: patch_connection
tags: [Connection]
parameters:
- $ref: '#/components/parameters/UpdateMask'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Connection'
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/Connection'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
delete:
summary: Delete a connection
x-openapi-router-controller: airflow.api_connexion.endpoints.connection_endpoint
operationId: delete_connection
tags: [Connection]
responses:
'204':
description: Success.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
/dags:
get:
summary: List DAGs
x-openapi-router-controller: airflow.api_connexion.endpoints.dag_endpoint
operationId: get_dags
tags: [DAG]
parameters:
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/PageOffset'
responses:
'200':
description: Success.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/DAGCollection'
- $ref: '#/components/schemas/CollectionInfo'
'401':
$ref: '#/components/responses/Unauthenticated'
/dags/{dag_id}:
parameters:
- $ref: '#/components/parameters/DAGID'
get:
summary: Get basic information about a DAG
description: >
Presents only information available in database (DAGModel).
If you need detailed information, consider using GET /dags/{dag_id}/detail.
x-openapi-router-controller: airflow.api_connexion.endpoints.dag_endpoint
operationId: get_dag
tags: [DAG]
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/DAG'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
patch:
summary: Update a DAG
x-openapi-router-controller: airflow.api_connexion.endpoints.dag_endpoint
operationId: patch_dag
parameters:
- $ref: '#/components/parameters/UpdateMask'
tags: [DAG]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DAG'
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/DAG'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
/dags/{dag_id}/clearTaskInstances:
parameters:
- $ref: '#/components/parameters/DAGID'
post:
summary: Clear a set of task instances
description: >
Clears a set of task instances associated with the DAG for a specified date range.
x-openapi-router-controller: airflow.api_connexion.endpoints.task_instance_endpoint
operationId: post_clear_task_instances
tags: [DAG]
requestBody:
description: Parameters of action
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ClearTaskInstance'
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskInstanceReferenceCollection'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
/dags/{dag_id}/updateTaskInstancesState:
parameters:
- $ref: '#/components/parameters/DAGID'
post:
summary: Set a state of task instances
description: >
Updates the state for multiple task instances simultaneously.
x-openapi-router-controller: airflow.api_connexion.endpoints.task_instance_endpoint
operationId: post_set_task_instances_state
tags: [DAG]
requestBody:
description: Parameters of action
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateTaskInstancesState'
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskInstanceReferenceCollection'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
/dags/{dag_id}/dagRuns:
parameters:
- $ref: '#/components/parameters/DAGID'
get:
summary: List DAG runs
description: >
This endpoint allows specifying `~` as the dag_id to retrieve DAG runs for all DAGs.
x-openapi-router-controller: airflow.api_connexion.endpoints.dag_run_endpoint
operationId: get_dag_runs
tags: [DAGRun]
parameters:
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/PageOffset'
- $ref: '#/components/parameters/FilterExecutionDateGTE'
- $ref: '#/components/parameters/FilterExecutionDateLTE'
- $ref: '#/components/parameters/FilterStartDateGTE'
- $ref: '#/components/parameters/FilterStartDateLTE'
- $ref: '#/components/parameters/FilterEndDateGTE'
- $ref: '#/components/parameters/FilterEndDateLTE'
responses:
'200':
description: List of DAG runs.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/DAGRunCollection'
- $ref: '#/components/schemas/CollectionInfo'
'401':
$ref: '#/components/responses/Unauthenticated'
post:
summary: Trigger a new DAG run
x-openapi-router-controller: airflow.api_connexion.endpoints.dag_run_endpoint
operationId: post_dag_run
tags: [DAGRun]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DAGRun'
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/DAGRun'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthenticated'
'409':
$ref: '#/components/responses/AlreadyExists'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
/dags/~/dagRuns/list:
post:
summary: List DAG runs (batch)
description: >
This endpoint is a POST to allow filtering across a large number of DAG IDs, where as a GET it
would run in to maximum HTTP request URL length limit.
x-openapi-router-controller: airflow.api_connexion.endpoints.dag_run_endpoint
operationId: get_dag_runs_batch
tags: [DAGRun]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ListDagRunsForm'
responses:
'200':
description: Success.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/DAGRunCollection'
- $ref: '#/components/schemas/CollectionInfo'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
/dags/{dag_id}/dagRuns/{dag_run_id}:
parameters:
- $ref: '#/components/parameters/DAGID'
- $ref: '#/components/parameters/DAGRunID'
get:
summary: Get a DAG run
x-openapi-router-controller: airflow.api_connexion.endpoints.dag_run_endpoint
operationId: get_dag_run
tags: [DAGRun]
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/DAGRun'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
delete:
summary: Delete a DAG run
x-openapi-router-controller: airflow.api_connexion.endpoints.dag_run_endpoint
operationId: delete_dag_run
tags: [DAGRun]
responses:
'204':
description: Success.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
/eventLogs:
get:
summary: List log entries
description:
List log entries from event log.
x-openapi-router-controller: airflow.api_connexion.endpoints.event_log_endpoint
operationId: get_event_logs
tags: [EventLog]
parameters:
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/PageOffset'
responses:
'200':
description: Success.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/EventLogCollection'
- $ref: '#/components/schemas/CollectionInfo'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
/eventLogs/{event_log_id}:
parameters:
- $ref: '#/components/parameters/EventLogID'
get:
summary: Get a log entry
x-openapi-router-controller: airflow.api_connexion.endpoints.event_log_endpoint
operationId: get_event_log
tags: [EventLog]
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/EventLog'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
/importErrors:
get:
summary: List import errors
x-openapi-router-controller: airflow.api_connexion.endpoints.import_error_endpoint
operationId: get_import_errors
tags: [ImportError]
parameters:
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/PageOffset'
responses:
'200':
description: Success.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/ImportErrorCollection'
- $ref: '#/components/schemas/CollectionInfo'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
/importErrors/{import_error_id}:
parameters:
- $ref: '#/components/parameters/ImportErrorID'
get:
summary: Get an import error
x-openapi-router-controller: airflow.api_connexion.endpoints.import_error_endpoint
operationId: get_import_error
tags: [ImportError]
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/ImportError'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
/pools:
get:
summary: List pools
x-openapi-router-controller: airflow.api_connexion.endpoints.pool_endpoint
operationId: get_pools
tags: [Pool]
parameters:
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/PageOffset'
responses:
'200':
description: List of pools.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/PoolCollection'
- $ref: '#/components/schemas/CollectionInfo'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
post:
summary: Create a pool
x-openapi-router-controller: airflow.api_connexion.endpoints.pool_endpoint
operationId: post_pool
tags: [Pool]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Pool'
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/Pool'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
/pools/{pool_name}:
parameters:
- $ref: '#/components/parameters/PoolName'
get:
summary: Get a pool
x-openapi-router-controller: airflow.api_connexion.endpoints.pool_endpoint
operationId: get_pool
tags: [Pool]
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/Pool'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
patch:
summary: Update a pool
x-openapi-router-controller: airflow.api_connexion.endpoints.pool_endpoint
operationId: patch_pool
tags: [Pool]
parameters:
- $ref: '#/components/parameters/UpdateMask'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Pool'
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/Pool'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/AlreadyExists'
delete:
summary: Delete a pool
x-openapi-router-controller: airflow.api_connexion.endpoints.pool_endpoint
operationId: delete_pool
tags: [Pool]
responses:
'204':
description: Success.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances:
parameters:
- $ref: '#/components/parameters/DAGID'
- $ref: '#/components/parameters/DAGRunID'
- $ref: '#/components/parameters/FilterExecutionDateGTE'
- $ref: '#/components/parameters/FilterExecutionDateLTE'
- $ref: '#/components/parameters/FilterStartDateGTE'
- $ref: '#/components/parameters/FilterStartDateLTE'
- $ref: '#/components/parameters/FilterEndDateGTE'
- $ref: '#/components/parameters/FilterEndDateLTE'
- $ref: '#/components/parameters/FilterDurationGTE'
- $ref: '#/components/parameters/FilterDurationLTE'
- $ref: '#/components/parameters/FilterState'
- $ref: '#/components/parameters/FilterPool'
- $ref: '#/components/parameters/FilterQueue'
get:
summary: List task instances
description: >
This endpoint allows specifying `~` as the dag_id, dag_run_id to retrieve DAG runs for all DAGs
and DAG runs.
x-openapi-router-controller: airflow.api_connexion.endpoints.task_instance_endpoint
operationId: get_task_instances
tags: [TaskInstance]
parameters:
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/PageOffset'
responses:
'200':
description: Success.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/TaskInstanceCollection'
- $ref: '#/components/schemas/CollectionInfo'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}:
parameters:
- $ref: '#/components/parameters/DAGID'
- $ref: '#/components/parameters/DAGRunID'
- $ref: '#/components/parameters/TaskID'
get:
summary: Get a task instance
x-openapi-router-controller: airflow.api_connexion.endpoints.task_instance_endpoint
operationId: get_task_instance
tags: [TaskInstance]
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskInstance'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
/dags/~/dagRuns/~/taskInstances/list:
post:
summary: List task instances (batch)
description: >
List task instances from all DAGs and DAG runs.
This endpoint is a POST to allow filtering across a large number of DAG IDs, where as a GET it
would run in to maximum HTTP request URL length limits.
x-openapi-router-controller: airflow.api_connexion.endpoints.task_instance_endpoint
operationId: get_task_instances_batch
tags: [TaskInstance]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ListTaskInstanceForm'
responses:
'200':
description: Success.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/TaskInstanceCollection'
- $ref: '#/components/schemas/CollectionInfo'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
'404':
$ref: '#/components/responses/NotFound'
/variables:
get:
summary: List variables
description: The collection does not contain data. To get data, you must get a single entity.
x-openapi-router-controller: airflow.api_connexion.endpoints.variable_endpoint
operationId: get_variables
tags: [Variable]
parameters:
- $ref: '#/components/parameters/PageLimit'
- $ref: '#/components/parameters/PageOffset'
responses:
'200':
description: Success.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VariableCollection'
- $ref: '#/components/schemas/CollectionInfo'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
post:
summary: Create a variable
x-openapi-router-controller: airflow.api_connexion.endpoints.variable_endpoint
operationId: post_variables
tags: [Variable]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Variable'
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/Variable'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthenticated'
'403':
$ref: '#/components/responses/PermissionDenied'
/variables/{variable_key}:
parameters:
- $ref: '#/components/parameters/VariableKey'
get:
summary: Get a variable
description: Get a variable by key.