All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| delete_dag | DELETE /api/v2/dags/{dag_id} | Delete Dag |
| favorite_dag | POST /api/v2/dags/{dag_id}/favorite | Favorite Dag |
| get_dag | GET /api/v2/dags/{dag_id} | Get Dag |
| get_dag_details | GET /api/v2/dags/{dag_id}/details | Get Dag Details |
| get_dag_tags | GET /api/v2/dagTags | Get Dag Tags |
| get_dags | GET /api/v2/dags | Get Dags |
| patch_dag | PATCH /api/v2/dags/{dag_id} | Patch Dag |
| patch_dags | PATCH /api/v2/dags | Patch Dags |
| unfavorite_dag | POST /api/v2/dags/{dag_id}/unfavorite | Unfavorite Dag |
object delete_dag(dag_id)
Delete Dag
Delete the specific DAG.
- OAuth Authentication (OAuth2PasswordBearer):
- Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = airflow_client.client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure Bearer authorization: HTTPBearer
configuration = airflow_client.client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with airflow_client.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = airflow_client.client.DAGApi(api_client)
dag_id = 'dag_id_example' # str |
try:
# Delete Dag
api_response = api_instance.delete_dag(dag_id)
print("The response of DAGApi->delete_dag:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DAGApi->delete_dag: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str |
object
OAuth2PasswordBearer, HTTPBearer
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
favorite_dag(dag_id)
Favorite Dag
Mark the DAG as favorite.
- OAuth Authentication (OAuth2PasswordBearer):
- Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = airflow_client.client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure Bearer authorization: HTTPBearer
configuration = airflow_client.client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with airflow_client.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = airflow_client.client.DAGApi(api_client)
dag_id = 'dag_id_example' # str |
try:
# Favorite Dag
api_instance.favorite_dag(dag_id)
except Exception as e:
print("Exception when calling DAGApi->favorite_dag: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str |
void (empty response body)
OAuth2PasswordBearer, HTTPBearer
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Successful Response | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DAGResponse get_dag(dag_id)
Get Dag
Get basic information about a DAG.
- OAuth Authentication (OAuth2PasswordBearer):
- Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.dag_response import DAGResponse
from airflow_client.client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = airflow_client.client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure Bearer authorization: HTTPBearer
configuration = airflow_client.client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with airflow_client.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = airflow_client.client.DAGApi(api_client)
dag_id = 'dag_id_example' # str |
try:
# Get Dag
api_response = api_instance.get_dag(dag_id)
print("The response of DAGApi->get_dag:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DAGApi->get_dag: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str |
OAuth2PasswordBearer, HTTPBearer
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Unprocessable Entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DAGDetailsResponse get_dag_details(dag_id)
Get Dag Details
Get details of DAG.
- OAuth Authentication (OAuth2PasswordBearer):
- Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.dag_details_response import DAGDetailsResponse
from airflow_client.client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = airflow_client.client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure Bearer authorization: HTTPBearer
configuration = airflow_client.client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with airflow_client.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = airflow_client.client.DAGApi(api_client)
dag_id = 'dag_id_example' # str |
try:
# Get Dag Details
api_response = api_instance.get_dag_details(dag_id)
print("The response of DAGApi->get_dag_details:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DAGApi->get_dag_details: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str |
OAuth2PasswordBearer, HTTPBearer
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DAGTagCollectionResponse get_dag_tags(limit=limit, offset=offset, order_by=order_by, tag_name_pattern=tag_name_pattern)
Get Dag Tags
Get all DAG tags.
- OAuth Authentication (OAuth2PasswordBearer):
- Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.dag_tag_collection_response import DAGTagCollectionResponse
from airflow_client.client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = airflow_client.client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure Bearer authorization: HTTPBearer
configuration = airflow_client.client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with airflow_client.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = airflow_client.client.DAGApi(api_client)
limit = 50 # int | (optional) (default to 50)
offset = 0 # int | (optional) (default to 0)
order_by = ["name"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `name` (optional) (default to ["name"])
tag_name_pattern = 'tag_name_pattern_example' # str | SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported. (optional)
try:
# Get Dag Tags
api_response = api_instance.get_dag_tags(limit=limit, offset=offset, order_by=order_by, tag_name_pattern=tag_name_pattern)
print("The response of DAGApi->get_dag_tags:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DAGApi->get_dag_tags: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int | [optional] [default to 50] | |
| offset | int | [optional] [default to 0] | |
| order_by | List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `name` | [optional] [default to ["name"]] |
| tag_name_pattern | str | SQL LIKE expression — use `%` / `` wildcards (e.g. `%customer%`). Regular expressions are not supported. | [optional] |
OAuth2PasswordBearer, HTTPBearer
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DAGCollectionResponse get_dags(limit=limit, offset=offset, tags=tags, tags_match_mode=tags_match_mode, owners=owners, dag_id_pattern=dag_id_pattern, dag_display_name_pattern=dag_display_name_pattern, exclude_stale=exclude_stale, paused=paused, has_import_errors=has_import_errors, last_dag_run_state=last_dag_run_state, bundle_name=bundle_name, bundle_version=bundle_version, has_asset_schedule=has_asset_schedule, asset_dependency=asset_dependency, dag_run_start_date_gte=dag_run_start_date_gte, dag_run_start_date_gt=dag_run_start_date_gt, dag_run_start_date_lte=dag_run_start_date_lte, dag_run_start_date_lt=dag_run_start_date_lt, dag_run_end_date_gte=dag_run_end_date_gte, dag_run_end_date_gt=dag_run_end_date_gt, dag_run_end_date_lte=dag_run_end_date_lte, dag_run_end_date_lt=dag_run_end_date_lt, dag_run_state=dag_run_state, order_by=order_by, is_favorite=is_favorite)
Get Dags
Get all DAGs.
- OAuth Authentication (OAuth2PasswordBearer):
- Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.dag_collection_response import DAGCollectionResponse
from airflow_client.client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = airflow_client.client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure Bearer authorization: HTTPBearer
configuration = airflow_client.client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with airflow_client.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = airflow_client.client.DAGApi(api_client)
limit = 50 # int | (optional) (default to 50)
offset = 0 # int | (optional) (default to 0)
tags = ['tags_example'] # List[str] | (optional)
tags_match_mode = 'tags_match_mode_example' # str | (optional)
owners = ['owners_example'] # List[str] | (optional)
dag_id_pattern = 'dag_id_pattern_example' # str | SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported. (optional)
dag_display_name_pattern = 'dag_display_name_pattern_example' # str | SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported. (optional)
exclude_stale = True # bool | (optional) (default to True)
paused = True # bool | (optional)
has_import_errors = True # bool | Filter Dags by having import errors. Only Dags that have been successfully loaded before will be returned. (optional)
last_dag_run_state = airflow_client.client.DagRunState() # DagRunState | (optional)
bundle_name = 'bundle_name_example' # str | (optional)
bundle_version = 'bundle_version_example' # str | (optional)
has_asset_schedule = True # bool | Filter Dags with asset-based scheduling (optional)
asset_dependency = 'asset_dependency_example' # str | Filter Dags by asset dependency (name or URI) (optional)
dag_run_start_date_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional)
dag_run_start_date_gt = '2013-10-20T19:20:30+01:00' # datetime | (optional)
dag_run_start_date_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional)
dag_run_start_date_lt = '2013-10-20T19:20:30+01:00' # datetime | (optional)
dag_run_end_date_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional)
dag_run_end_date_gt = '2013-10-20T19:20:30+01:00' # datetime | (optional)
dag_run_end_date_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional)
dag_run_end_date_lt = '2013-10-20T19:20:30+01:00' # datetime | (optional)
dag_run_state = ['dag_run_state_example'] # List[str] | (optional)
order_by = ["dag_id"] # List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, state, start_date, last_run_state, last_run_start_date` (optional) (default to ["dag_id"])
is_favorite = True # bool | (optional)
try:
# Get Dags
api_response = api_instance.get_dags(limit=limit, offset=offset, tags=tags, tags_match_mode=tags_match_mode, owners=owners, dag_id_pattern=dag_id_pattern, dag_display_name_pattern=dag_display_name_pattern, exclude_stale=exclude_stale, paused=paused, has_import_errors=has_import_errors, last_dag_run_state=last_dag_run_state, bundle_name=bundle_name, bundle_version=bundle_version, has_asset_schedule=has_asset_schedule, asset_dependency=asset_dependency, dag_run_start_date_gte=dag_run_start_date_gte, dag_run_start_date_gt=dag_run_start_date_gt, dag_run_start_date_lte=dag_run_start_date_lte, dag_run_start_date_lt=dag_run_start_date_lt, dag_run_end_date_gte=dag_run_end_date_gte, dag_run_end_date_gt=dag_run_end_date_gt, dag_run_end_date_lte=dag_run_end_date_lte, dag_run_end_date_lt=dag_run_end_date_lt, dag_run_state=dag_run_state, order_by=order_by, is_favorite=is_favorite)
print("The response of DAGApi->get_dags:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DAGApi->get_dags: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int | [optional] [default to 50] | |
| offset | int | [optional] [default to 0] | |
| tags | List[str] | [optional] | |
| tags_match_mode | str | [optional] | |
| owners | List[str] | [optional] | |
| dag_id_pattern | str | SQL LIKE expression — use `%` / `` wildcards (e.g. `%customer%`). Regular expressions are not supported. | [optional] |
| dag_display_name_pattern | str | SQL LIKE expression — use `%` / `` wildcards (e.g. `%customer%`). Regular expressions are not supported. | [optional] |
| exclude_stale | bool | [optional] [default to True] | |
| paused | bool | [optional] | |
| has_import_errors | bool | Filter Dags by having import errors. Only Dags that have been successfully loaded before will be returned. | [optional] |
| last_dag_run_state | DagRunState | [optional] | |
| bundle_name | str | [optional] | |
| bundle_version | str | [optional] | |
| has_asset_schedule | bool | Filter Dags with asset-based scheduling | [optional] |
| asset_dependency | str | Filter Dags by asset dependency (name or URI) | [optional] |
| dag_run_start_date_gte | datetime | [optional] | |
| dag_run_start_date_gt | datetime | [optional] | |
| dag_run_start_date_lte | datetime | [optional] | |
| dag_run_start_date_lt | datetime | [optional] | |
| dag_run_end_date_gte | datetime | [optional] | |
| dag_run_end_date_gt | datetime | [optional] | |
| dag_run_end_date_lte | datetime | [optional] | |
| dag_run_end_date_lt | datetime | [optional] | |
| dag_run_state | List[str] | [optional] | |
| order_by | List[str] | Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `dag_id, dag_display_name, next_dagrun, state, start_date, last_run_state, last_run_start_date` | [optional] [default to ["dag_id"]] |
| is_favorite | bool | [optional] |
OAuth2PasswordBearer, HTTPBearer
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DAGResponse patch_dag(dag_id, dag_patch_body, update_mask=update_mask)
Patch Dag
Patch the specific DAG.
- OAuth Authentication (OAuth2PasswordBearer):
- Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.dag_patch_body import DAGPatchBody
from airflow_client.client.models.dag_response import DAGResponse
from airflow_client.client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = airflow_client.client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure Bearer authorization: HTTPBearer
configuration = airflow_client.client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with airflow_client.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = airflow_client.client.DAGApi(api_client)
dag_id = 'dag_id_example' # str |
dag_patch_body = airflow_client.client.DAGPatchBody() # DAGPatchBody |
update_mask = ['update_mask_example'] # List[str] | (optional)
try:
# Patch Dag
api_response = api_instance.patch_dag(dag_id, dag_patch_body, update_mask=update_mask)
print("The response of DAGApi->patch_dag:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DAGApi->patch_dag: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str | ||
| dag_patch_body | DAGPatchBody | ||
| update_mask | List[str] | [optional] |
OAuth2PasswordBearer, HTTPBearer
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DAGCollectionResponse patch_dags(dag_patch_body, update_mask=update_mask, limit=limit, offset=offset, tags=tags, tags_match_mode=tags_match_mode, owners=owners, dag_id_pattern=dag_id_pattern, exclude_stale=exclude_stale, paused=paused)
Patch Dags
Patch multiple DAGs.
- OAuth Authentication (OAuth2PasswordBearer):
- Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.dag_collection_response import DAGCollectionResponse
from airflow_client.client.models.dag_patch_body import DAGPatchBody
from airflow_client.client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = airflow_client.client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure Bearer authorization: HTTPBearer
configuration = airflow_client.client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with airflow_client.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = airflow_client.client.DAGApi(api_client)
dag_patch_body = airflow_client.client.DAGPatchBody() # DAGPatchBody |
update_mask = ['update_mask_example'] # List[str] | (optional)
limit = 50 # int | (optional) (default to 50)
offset = 0 # int | (optional) (default to 0)
tags = ['tags_example'] # List[str] | (optional)
tags_match_mode = 'tags_match_mode_example' # str | (optional)
owners = ['owners_example'] # List[str] | (optional)
dag_id_pattern = 'dag_id_pattern_example' # str | SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported. (optional)
exclude_stale = True # bool | (optional) (default to True)
paused = True # bool | (optional)
try:
# Patch Dags
api_response = api_instance.patch_dags(dag_patch_body, update_mask=update_mask, limit=limit, offset=offset, tags=tags, tags_match_mode=tags_match_mode, owners=owners, dag_id_pattern=dag_id_pattern, exclude_stale=exclude_stale, paused=paused)
print("The response of DAGApi->patch_dags:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DAGApi->patch_dags: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| dag_patch_body | DAGPatchBody | ||
| update_mask | List[str] | [optional] | |
| limit | int | [optional] [default to 50] | |
| offset | int | [optional] [default to 0] | |
| tags | List[str] | [optional] | |
| tags_match_mode | str | [optional] | |
| owners | List[str] | [optional] | |
| dag_id_pattern | str | SQL LIKE expression — use `%` / `` wildcards (e.g. `%customer%`). Regular expressions are not supported. | [optional] |
| exclude_stale | bool | [optional] [default to True] | |
| paused | bool | [optional] |
OAuth2PasswordBearer, HTTPBearer
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
unfavorite_dag(dag_id)
Unfavorite Dag
Unmark the DAG as favorite.
- OAuth Authentication (OAuth2PasswordBearer):
- Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = airflow_client.client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Configure Bearer authorization: HTTPBearer
configuration = airflow_client.client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with airflow_client.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = airflow_client.client.DAGApi(api_client)
dag_id = 'dag_id_example' # str |
try:
# Unfavorite Dag
api_instance.unfavorite_dag(dag_id)
except Exception as e:
print("Exception when calling DAGApi->unfavorite_dag: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str |
void (empty response body)
OAuth2PasswordBearer, HTTPBearer
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Successful Response | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]