airflow_client.client.BackfillApi

All URIs are relative to http://localhost

MethodHTTP requestDescription
cancel_backfillPUT /api/v2/backfills/{backfill_id}/cancelCancel Backfill
create_backfillPOST /api/v2/backfillsCreate Backfill
create_backfill_dry_runPOST /api/v2/backfills/dry_runCreate Backfill Dry Run
get_backfillGET /api/v2/backfills/{backfill_id}Get Backfill
list_backfillsGET /api/v2/backfillsList Backfills
pause_backfillPUT /api/v2/backfills/{backfill_id}/pausePause Backfill
unpause_backfillPUT /api/v2/backfills/{backfill_id}/unpauseUnpause Backfill

cancel_backfill

BackfillResponse cancel_backfill(backfill_id)

Cancel Backfill

Example

  • OAuth Authentication (OAuth2PasswordBearer):
  • Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.backfill_response import BackfillResponse
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.BackfillApi(api_client)
    backfill_id = 56 # int | 

    try:
        # Cancel Backfill
        api_response = api_instance.cancel_backfill(backfill_id)
        print("The response of BackfillApi->cancel_backfill:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BackfillApi->cancel_backfill: %s\n" % e)

Parameters

NameTypeDescriptionNotes
backfill_idint

Return type

BackfillResponse

Authorization

OAuth2PasswordBearer, HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
401Unauthorized-
403Forbidden-
404Not Found-
409Conflict-
422Validation Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_backfill

BackfillResponse create_backfill(backfill_post_body)

Create Backfill

Example

  • OAuth Authentication (OAuth2PasswordBearer):
  • Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.backfill_post_body import BackfillPostBody
from airflow_client.client.models.backfill_response import BackfillResponse
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.BackfillApi(api_client)
    backfill_post_body = airflow_client.client.BackfillPostBody() # BackfillPostBody | 

    try:
        # Create Backfill
        api_response = api_instance.create_backfill(backfill_post_body)
        print("The response of BackfillApi->create_backfill:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BackfillApi->create_backfill: %s\n" % e)

Parameters

NameTypeDescriptionNotes
backfill_post_bodyBackfillPostBody

Return type

BackfillResponse

Authorization

OAuth2PasswordBearer, HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
401Unauthorized-
403Forbidden-
404Not Found-
409Conflict-
422Validation Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_backfill_dry_run

DryRunBackfillCollectionResponse create_backfill_dry_run(backfill_post_body)

Create Backfill Dry Run

Example

  • OAuth Authentication (OAuth2PasswordBearer):
  • Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.backfill_post_body import BackfillPostBody
from airflow_client.client.models.dry_run_backfill_collection_response import DryRunBackfillCollectionResponse
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.BackfillApi(api_client)
    backfill_post_body = airflow_client.client.BackfillPostBody() # BackfillPostBody | 

    try:
        # Create Backfill Dry Run
        api_response = api_instance.create_backfill_dry_run(backfill_post_body)
        print("The response of BackfillApi->create_backfill_dry_run:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BackfillApi->create_backfill_dry_run: %s\n" % e)

Parameters

NameTypeDescriptionNotes
backfill_post_bodyBackfillPostBody

Return type

DryRunBackfillCollectionResponse

Authorization

OAuth2PasswordBearer, HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
401Unauthorized-
403Forbidden-
404Not Found-
409Conflict-
422Validation Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_backfill

BackfillResponse get_backfill(backfill_id)

Get Backfill

Example

  • OAuth Authentication (OAuth2PasswordBearer):
  • Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.backfill_response import BackfillResponse
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.BackfillApi(api_client)
    backfill_id = 56 # int | 

    try:
        # Get Backfill
        api_response = api_instance.get_backfill(backfill_id)
        print("The response of BackfillApi->get_backfill:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BackfillApi->get_backfill: %s\n" % e)

Parameters

NameTypeDescriptionNotes
backfill_idint

Return type

BackfillResponse

Authorization

OAuth2PasswordBearer, HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
401Unauthorized-
403Forbidden-
404Not Found-
422Validation Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_backfills

BackfillCollectionResponse list_backfills(dag_id, limit=limit, offset=offset, order_by=order_by)

List Backfills

Example

  • OAuth Authentication (OAuth2PasswordBearer):
  • Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.backfill_collection_response import BackfillCollectionResponse
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.BackfillApi(api_client)
    dag_id = 'dag_id_example' # str | 
    limit = 50 # int |  (optional) (default to 50)
    offset = 0 # int |  (optional) (default to 0)
    order_by = [id] # List[str] |  (optional) (default to [id])

    try:
        # List Backfills
        api_response = api_instance.list_backfills(dag_id, limit=limit, offset=offset, order_by=order_by)
        print("The response of BackfillApi->list_backfills:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BackfillApi->list_backfills: %s\n" % e)

Parameters

NameTypeDescriptionNotes
dag_idstr
limitint[optional] [default to 50]
offsetint[optional] [default to 0]
order_byList[str][optional] [default to [id]]

Return type

BackfillCollectionResponse

Authorization

OAuth2PasswordBearer, HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
401Unauthorized-
403Forbidden-
422Validation Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

pause_backfill

BackfillResponse pause_backfill(backfill_id)

Pause Backfill

Example

  • OAuth Authentication (OAuth2PasswordBearer):
  • Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.backfill_response import BackfillResponse
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.BackfillApi(api_client)
    backfill_id = 56 # int | 

    try:
        # Pause Backfill
        api_response = api_instance.pause_backfill(backfill_id)
        print("The response of BackfillApi->pause_backfill:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BackfillApi->pause_backfill: %s\n" % e)

Parameters

NameTypeDescriptionNotes
backfill_idint

Return type

BackfillResponse

Authorization

OAuth2PasswordBearer, HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
401Unauthorized-
403Forbidden-
404Not Found-
409Conflict-
422Validation Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

unpause_backfill

BackfillResponse unpause_backfill(backfill_id)

Unpause Backfill

Example

  • OAuth Authentication (OAuth2PasswordBearer):
  • Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.backfill_response import BackfillResponse
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.BackfillApi(api_client)
    backfill_id = 56 # int | 

    try:
        # Unpause Backfill
        api_response = api_instance.unpause_backfill(backfill_id)
        print("The response of BackfillApi->unpause_backfill:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling BackfillApi->unpause_backfill: %s\n" % e)

Parameters

NameTypeDescriptionNotes
backfill_idint

Return type

BackfillResponse

Authorization

OAuth2PasswordBearer, HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
401Unauthorized-
403Forbidden-
404Not Found-
409Conflict-
422Validation Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]