All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
get_extra_links | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/links | Get Extra Links |
get_log | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/logs/{try_number} | Get Log |
get_mapped_task_instance | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index} | Get Mapped Task Instance |
get_mapped_task_instance_tries | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index}/tries | Get Mapped Task Instance Tries |
get_mapped_task_instance_try_details | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index}/tries/{task_try_number} | Get Mapped Task Instance Try Details |
get_mapped_task_instances | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/listMapped | Get Mapped Task Instances |
get_task_instance | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id} | Get Task Instance |
get_task_instance_dependencies | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/dependencies | Get Task Instance Dependencies |
get_task_instance_dependencies_by_map_index | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index}/dependencies | Get Task Instance Dependencies |
get_task_instance_tries | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/tries | Get Task Instance Tries |
get_task_instance_try_details | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/tries/{task_try_number} | Get Task Instance Try Details |
get_task_instances | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances | Get Task Instances |
get_task_instances_batch | POST /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/list | Get Task Instances Batch |
patch_task_instance | PATCH /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id} | Patch Task Instance |
patch_task_instance_by_map_index | PATCH /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index} | Patch Task Instance |
patch_task_instance_dry_run | PATCH /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/dry_run | Patch Task Instance Dry Run |
patch_task_instance_dry_run_by_map_index | PATCH /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/{map_index}/dry_run | Patch Task Instance Dry Run |
post_clear_task_instances | POST /api/v2/dags/{dag_id}/clearTaskInstances | Post Clear Task Instances |
ExtraLinkCollectionResponse get_extra_links(dag_id, dag_run_id, task_id, map_index=map_index)
Get Extra Links
Get extra links for task instance.
import airflow_client.client from airflow_client.client.models.extra_link_collection_response import ExtraLinkCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = -1 # int | (optional) (default to -1) try: # Get Extra Links api_response = api_instance.get_extra_links(dag_id, dag_run_id, task_id, map_index=map_index) print("The response of TaskInstanceApi->get_extra_links:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_extra_links: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
map_index | int | [optional] [default to -1] |
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskInstancesLogResponse get_log(dag_id, dag_run_id, task_id, try_number, full_content=full_content, map_index=map_index, token=token, accept=accept)
Get Log
Get logs for a specific task instance.
import airflow_client.client from airflow_client.client.models.task_instances_log_response import TaskInstancesLogResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | try_number = 56 # int | full_content = False # bool | (optional) (default to False) map_index = -1 # int | (optional) (default to -1) token = 'token_example' # str | (optional) accept = */* # str | (optional) (default to */*) try: # Get Log api_response = api_instance.get_log(dag_id, dag_run_id, task_id, try_number, full_content=full_content, map_index=map_index, token=token, accept=accept) print("The response of TaskInstanceApi->get_log:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_log: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
try_number | int | ||
full_content | bool | [optional] [default to False] | |
map_index | int | [optional] [default to -1] | |
token | str | [optional] | |
accept | str | [optional] [default to /] |
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskInstanceResponse get_mapped_task_instance(dag_id, dag_run_id, task_id, map_index)
Get Mapped Task Instance
Get task instance.
import airflow_client.client from airflow_client.client.models.task_instance_response import TaskInstanceResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = 56 # int | try: # Get Mapped Task Instance api_response = api_instance.get_mapped_task_instance(dag_id, dag_run_id, task_id, map_index) print("The response of TaskInstanceApi->get_mapped_task_instance:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_mapped_task_instance: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
map_index | int |
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskInstanceHistoryCollectionResponse get_mapped_task_instance_tries(dag_id, dag_run_id, task_id, map_index)
Get Mapped Task Instance Tries
import airflow_client.client from airflow_client.client.models.task_instance_history_collection_response import TaskInstanceHistoryCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = 56 # int | try: # Get Mapped Task Instance Tries api_response = api_instance.get_mapped_task_instance_tries(dag_id, dag_run_id, task_id, map_index) print("The response of TaskInstanceApi->get_mapped_task_instance_tries:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_mapped_task_instance_tries: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
map_index | int |
TaskInstanceHistoryCollectionResponse
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskInstanceHistoryResponse get_mapped_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index)
Get Mapped Task Instance Try Details
import airflow_client.client from airflow_client.client.models.task_instance_history_response import TaskInstanceHistoryResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | task_try_number = 56 # int | map_index = 56 # int | try: # Get Mapped Task Instance Try Details api_response = api_instance.get_mapped_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index) print("The response of TaskInstanceApi->get_mapped_task_instance_try_details:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_mapped_task_instance_try_details: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
task_try_number | int | ||
map_index | int |
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskInstanceCollectionResponse get_mapped_task_instances(dag_id, dag_run_id, task_id, run_after_gte=run_after_gte, run_after_lte=run_after_lte, logical_date_gte=logical_date_gte, logical_date_lte=logical_date_lte, start_date_gte=start_date_gte, start_date_lte=start_date_lte, end_date_gte=end_date_gte, end_date_lte=end_date_lte, updated_at_gte=updated_at_gte, updated_at_lte=updated_at_lte, duration_gte=duration_gte, duration_lte=duration_lte, state=state, pool=pool, queue=queue, executor=executor, version_number=version_number, limit=limit, offset=offset, order_by=order_by)
Get Mapped Task Instances
Get list of mapped task instances.
import airflow_client.client from airflow_client.client.models.task_instance_collection_response import TaskInstanceCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | run_after_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) run_after_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) logical_date_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) logical_date_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) start_date_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) start_date_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) end_date_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) end_date_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) updated_at_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) updated_at_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) duration_gte = 3.4 # float | (optional) duration_lte = 3.4 # float | (optional) state = ['state_example'] # List[str] | (optional) pool = ['pool_example'] # List[str] | (optional) queue = ['queue_example'] # List[str] | (optional) executor = ['executor_example'] # List[str] | (optional) version_number = [56] # List[int] | (optional) limit = 50 # int | (optional) (default to 50) offset = 0 # int | (optional) (default to 0) order_by = 'map_index' # str | (optional) (default to 'map_index') try: # Get Mapped Task Instances api_response = api_instance.get_mapped_task_instances(dag_id, dag_run_id, task_id, run_after_gte=run_after_gte, run_after_lte=run_after_lte, logical_date_gte=logical_date_gte, logical_date_lte=logical_date_lte, start_date_gte=start_date_gte, start_date_lte=start_date_lte, end_date_gte=end_date_gte, end_date_lte=end_date_lte, updated_at_gte=updated_at_gte, updated_at_lte=updated_at_lte, duration_gte=duration_gte, duration_lte=duration_lte, state=state, pool=pool, queue=queue, executor=executor, version_number=version_number, limit=limit, offset=offset, order_by=order_by) print("The response of TaskInstanceApi->get_mapped_task_instances:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_mapped_task_instances: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
run_after_gte | datetime | [optional] | |
run_after_lte | datetime | [optional] | |
logical_date_gte | datetime | [optional] | |
logical_date_lte | datetime | [optional] | |
start_date_gte | datetime | [optional] | |
start_date_lte | datetime | [optional] | |
end_date_gte | datetime | [optional] | |
end_date_lte | datetime | [optional] | |
updated_at_gte | datetime | [optional] | |
updated_at_lte | datetime | [optional] | |
duration_gte | float | [optional] | |
duration_lte | float | [optional] | |
state | List[str] | [optional] | |
pool | List[str] | [optional] | |
queue | List[str] | [optional] | |
executor | List[str] | [optional] | |
version_number | List[int] | [optional] | |
limit | int | [optional] [default to 50] | |
offset | int | [optional] [default to 0] | |
order_by | str | [optional] [default to 'map_index'] |
TaskInstanceCollectionResponse
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskInstanceResponse get_task_instance(dag_id, dag_run_id, task_id)
Get Task Instance
Get task instance.
import airflow_client.client from airflow_client.client.models.task_instance_response import TaskInstanceResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | try: # Get Task Instance api_response = api_instance.get_task_instance(dag_id, dag_run_id, task_id) print("The response of TaskInstanceApi->get_task_instance:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_task_instance: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str |
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskDependencyCollectionResponse get_task_instance_dependencies(dag_id, dag_run_id, task_id, map_index=map_index)
Get Task Instance Dependencies
Get dependencies blocking task from getting scheduled.
import airflow_client.client from airflow_client.client.models.task_dependency_collection_response import TaskDependencyCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = -1 # int | (optional) (default to -1) try: # Get Task Instance Dependencies api_response = api_instance.get_task_instance_dependencies(dag_id, dag_run_id, task_id, map_index=map_index) print("The response of TaskInstanceApi->get_task_instance_dependencies:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_task_instance_dependencies: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
map_index | int | [optional] [default to -1] |
TaskDependencyCollectionResponse
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskDependencyCollectionResponse get_task_instance_dependencies_by_map_index(dag_id, dag_run_id, task_id, map_index)
Get Task Instance Dependencies
Get dependencies blocking task from getting scheduled.
import airflow_client.client from airflow_client.client.models.task_dependency_collection_response import TaskDependencyCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = 56 # int | try: # Get Task Instance Dependencies api_response = api_instance.get_task_instance_dependencies_by_map_index(dag_id, dag_run_id, task_id, map_index) print("The response of TaskInstanceApi->get_task_instance_dependencies_by_map_index:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_task_instance_dependencies_by_map_index: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
map_index | int |
TaskDependencyCollectionResponse
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskInstanceHistoryCollectionResponse get_task_instance_tries(dag_id, dag_run_id, task_id, map_index=map_index)
Get Task Instance Tries
Get list of task instances history.
import airflow_client.client from airflow_client.client.models.task_instance_history_collection_response import TaskInstanceHistoryCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = -1 # int | (optional) (default to -1) try: # Get Task Instance Tries api_response = api_instance.get_task_instance_tries(dag_id, dag_run_id, task_id, map_index=map_index) print("The response of TaskInstanceApi->get_task_instance_tries:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_task_instance_tries: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
map_index | int | [optional] [default to -1] |
TaskInstanceHistoryCollectionResponse
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskInstanceHistoryResponse get_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index=map_index)
Get Task Instance Try Details
Get task instance details by try number.
import airflow_client.client from airflow_client.client.models.task_instance_history_response import TaskInstanceHistoryResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | task_try_number = 56 # int | map_index = -1 # int | (optional) (default to -1) try: # Get Task Instance Try Details api_response = api_instance.get_task_instance_try_details(dag_id, dag_run_id, task_id, task_try_number, map_index=map_index) print("The response of TaskInstanceApi->get_task_instance_try_details:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_task_instance_try_details: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
task_try_number | int | ||
map_index | int | [optional] [default to -1] |
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskInstanceCollectionResponse get_task_instances(dag_id, dag_run_id, task_id=task_id, run_after_gte=run_after_gte, run_after_lte=run_after_lte, logical_date_gte=logical_date_gte, logical_date_lte=logical_date_lte, start_date_gte=start_date_gte, start_date_lte=start_date_lte, end_date_gte=end_date_gte, end_date_lte=end_date_lte, updated_at_gte=updated_at_gte, updated_at_lte=updated_at_lte, duration_gte=duration_gte, duration_lte=duration_lte, task_display_name_pattern=task_display_name_pattern, state=state, pool=pool, queue=queue, executor=executor, version_number=version_number, limit=limit, offset=offset, order_by=order_by)
Get Task Instances
Get list of task instances.
This endpoint allows specifying ~
as the dag_id, dag_run_id to retrieve Task Instances for all DAGs and DAG runs.
import airflow_client.client from airflow_client.client.models.task_instance_collection_response import TaskInstanceCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | (optional) run_after_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) run_after_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) logical_date_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) logical_date_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) start_date_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) start_date_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) end_date_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) end_date_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) updated_at_gte = '2013-10-20T19:20:30+01:00' # datetime | (optional) updated_at_lte = '2013-10-20T19:20:30+01:00' # datetime | (optional) duration_gte = 3.4 # float | (optional) duration_lte = 3.4 # float | (optional) task_display_name_pattern = 'task_display_name_pattern_example' # str | (optional) state = ['state_example'] # List[str] | (optional) pool = ['pool_example'] # List[str] | (optional) queue = ['queue_example'] # List[str] | (optional) executor = ['executor_example'] # List[str] | (optional) version_number = [56] # List[int] | (optional) limit = 50 # int | (optional) (default to 50) offset = 0 # int | (optional) (default to 0) order_by = 'map_index' # str | (optional) (default to 'map_index') try: # Get Task Instances api_response = api_instance.get_task_instances(dag_id, dag_run_id, task_id=task_id, run_after_gte=run_after_gte, run_after_lte=run_after_lte, logical_date_gte=logical_date_gte, logical_date_lte=logical_date_lte, start_date_gte=start_date_gte, start_date_lte=start_date_lte, end_date_gte=end_date_gte, end_date_lte=end_date_lte, updated_at_gte=updated_at_gte, updated_at_lte=updated_at_lte, duration_gte=duration_gte, duration_lte=duration_lte, task_display_name_pattern=task_display_name_pattern, state=state, pool=pool, queue=queue, executor=executor, version_number=version_number, limit=limit, offset=offset, order_by=order_by) print("The response of TaskInstanceApi->get_task_instances:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_task_instances: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | [optional] | |
run_after_gte | datetime | [optional] | |
run_after_lte | datetime | [optional] | |
logical_date_gte | datetime | [optional] | |
logical_date_lte | datetime | [optional] | |
start_date_gte | datetime | [optional] | |
start_date_lte | datetime | [optional] | |
end_date_gte | datetime | [optional] | |
end_date_lte | datetime | [optional] | |
updated_at_gte | datetime | [optional] | |
updated_at_lte | datetime | [optional] | |
duration_gte | float | [optional] | |
duration_lte | float | [optional] | |
task_display_name_pattern | str | [optional] | |
state | List[str] | [optional] | |
pool | List[str] | [optional] | |
queue | List[str] | [optional] | |
executor | List[str] | [optional] | |
version_number | List[int] | [optional] | |
limit | int | [optional] [default to 50] | |
offset | int | [optional] [default to 0] | |
order_by | str | [optional] [default to 'map_index'] |
TaskInstanceCollectionResponse
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskInstanceCollectionResponse get_task_instances_batch(dag_id, dag_run_id, task_instances_batch_body)
Get Task Instances Batch
Get list of task instances.
import airflow_client.client from airflow_client.client.models.task_instance_collection_response import TaskInstanceCollectionResponse from airflow_client.client.models.task_instances_batch_body import TaskInstancesBatchBody 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_instances_batch_body = airflow_client.client.TaskInstancesBatchBody() # TaskInstancesBatchBody | try: # Get Task Instances Batch api_response = api_instance.get_task_instances_batch(dag_id, dag_run_id, task_instances_batch_body) print("The response of TaskInstanceApi->get_task_instances_batch:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->get_task_instances_batch: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_instances_batch_body | TaskInstancesBatchBody |
TaskInstanceCollectionResponse
Status code | Description | Response headers |
---|---|---|
200 | 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]
TaskInstanceCollectionResponse patch_task_instance(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask)
Patch Task Instance
Update a task instance.
import airflow_client.client from airflow_client.client.models.patch_task_instance_body import PatchTaskInstanceBody from airflow_client.client.models.task_instance_collection_response import TaskInstanceCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | patch_task_instance_body = airflow_client.client.PatchTaskInstanceBody() # PatchTaskInstanceBody | map_index = 56 # int | (optional) update_mask = ['update_mask_example'] # List[str] | (optional) try: # Patch Task Instance api_response = api_instance.patch_task_instance(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask) print("The response of TaskInstanceApi->patch_task_instance:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->patch_task_instance: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
patch_task_instance_body | PatchTaskInstanceBody | ||
map_index | int | [optional] | |
update_mask | List[str] | [optional] |
TaskInstanceCollectionResponse
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
400 | Bad Request | - |
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]
TaskInstanceCollectionResponse patch_task_instance_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask)
Patch Task Instance
Update a task instance.
import airflow_client.client from airflow_client.client.models.patch_task_instance_body import PatchTaskInstanceBody from airflow_client.client.models.task_instance_collection_response import TaskInstanceCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = 56 # int | patch_task_instance_body = airflow_client.client.PatchTaskInstanceBody() # PatchTaskInstanceBody | update_mask = ['update_mask_example'] # List[str] | (optional) try: # Patch Task Instance api_response = api_instance.patch_task_instance_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask) print("The response of TaskInstanceApi->patch_task_instance_by_map_index:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->patch_task_instance_by_map_index: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
map_index | int | ||
patch_task_instance_body | PatchTaskInstanceBody | ||
update_mask | List[str] | [optional] |
TaskInstanceCollectionResponse
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
400 | Bad Request | - |
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]
TaskInstanceCollectionResponse patch_task_instance_dry_run(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask)
Patch Task Instance Dry Run
Update a task instance dry_run mode.
import airflow_client.client from airflow_client.client.models.patch_task_instance_body import PatchTaskInstanceBody from airflow_client.client.models.task_instance_collection_response import TaskInstanceCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | patch_task_instance_body = airflow_client.client.PatchTaskInstanceBody() # PatchTaskInstanceBody | map_index = 56 # int | (optional) update_mask = ['update_mask_example'] # List[str] | (optional) try: # Patch Task Instance Dry Run api_response = api_instance.patch_task_instance_dry_run(dag_id, dag_run_id, task_id, patch_task_instance_body, map_index=map_index, update_mask=update_mask) print("The response of TaskInstanceApi->patch_task_instance_dry_run:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->patch_task_instance_dry_run: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
patch_task_instance_body | PatchTaskInstanceBody | ||
map_index | int | [optional] | |
update_mask | List[str] | [optional] |
TaskInstanceCollectionResponse
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]
TaskInstanceCollectionResponse patch_task_instance_dry_run_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask)
Patch Task Instance Dry Run
Update a task instance dry_run mode.
import airflow_client.client from airflow_client.client.models.patch_task_instance_body import PatchTaskInstanceBody from airflow_client.client.models.task_instance_collection_response import TaskInstanceCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | map_index = 56 # int | patch_task_instance_body = airflow_client.client.PatchTaskInstanceBody() # PatchTaskInstanceBody | update_mask = ['update_mask_example'] # List[str] | (optional) try: # Patch Task Instance Dry Run api_response = api_instance.patch_task_instance_dry_run_by_map_index(dag_id, dag_run_id, task_id, map_index, patch_task_instance_body, update_mask=update_mask) print("The response of TaskInstanceApi->patch_task_instance_dry_run_by_map_index:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->patch_task_instance_dry_run_by_map_index: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
dag_run_id | str | ||
task_id | str | ||
map_index | int | ||
patch_task_instance_body | PatchTaskInstanceBody | ||
update_mask | List[str] | [optional] |
TaskInstanceCollectionResponse
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]
TaskInstanceCollectionResponse post_clear_task_instances(dag_id, clear_task_instances_body)
Post Clear Task Instances
Clear task instances.
import airflow_client.client from airflow_client.client.models.clear_task_instances_body import ClearTaskInstancesBody from airflow_client.client.models.task_instance_collection_response import TaskInstanceCollectionResponse 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"] # 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.TaskInstanceApi(api_client) dag_id = 'dag_id_example' # str | clear_task_instances_body = airflow_client.client.ClearTaskInstancesBody() # ClearTaskInstancesBody | try: # Post Clear Task Instances api_response = api_instance.post_clear_task_instances(dag_id, clear_task_instances_body) print("The response of TaskInstanceApi->post_clear_task_instances:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskInstanceApi->post_clear_task_instances: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
dag_id | str | ||
clear_task_instances_body | ClearTaskInstancesBody |
TaskInstanceCollectionResponse
Status code | Description | Response headers |
---|---|---|
200 | 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]