All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| clear_task_state_store | DELETE /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/state-store | Clear Task State Store |
| delete_task_state_store | DELETE /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/state-store/{key} | Delete Task State Store |
| get_task_state_store | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/state-store/{key} | Get Task State Store |
| list_task_state_store | GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/state-store | List Task State Store |
| patch_task_state_store | PATCH /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/state-store/{key} | Patch Task State Store |
| set_task_state_store | PUT /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/state-store/{key} | Set Task State Store |
clear_task_state_store(dag_id, dag_run_id, task_id, map_index=map_index, all_map_indices=all_map_indices)
Clear Task State Store
Delete all task state store keys for a task instance.
When all_map_indices=true, state store is cleared for every map index of the task and the map_index parameter is ignored.
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.TaskStateStoreApi(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) all_map_indices = False # bool | (optional) (default to False) try: # Clear Task State Store api_instance.clear_task_state_store(dag_id, dag_run_id, task_id, map_index=map_index, all_map_indices=all_map_indices) except Exception as e: print("Exception when calling TaskStateStoreApi->clear_task_state_store: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str | ||
| dag_run_id | str | ||
| task_id | str | ||
| map_index | int | [optional] [default to -1] | |
| all_map_indices | bool | [optional] [default to False] |
void (empty response body)
OAuth2PasswordBearer, HTTPBearer
| 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]
delete_task_state_store(dag_id, dag_run_id, task_id, key, map_index=map_index)
Delete Task State Store
Delete a single task state store key. No-op if the key does not exist.
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.TaskStateStoreApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | key = 'key_example' # str | map_index = -1 # int | (optional) (default to -1) try: # Delete Task State Store api_instance.delete_task_state_store(dag_id, dag_run_id, task_id, key, map_index=map_index) except Exception as e: print("Exception when calling TaskStateStoreApi->delete_task_state_store: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str | ||
| dag_run_id | str | ||
| task_id | str | ||
| key | str | ||
| map_index | int | [optional] [default to -1] |
void (empty response body)
OAuth2PasswordBearer, HTTPBearer
| 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]
TaskStateStoreResponse get_task_state_store(dag_id, dag_run_id, task_id, key, map_index=map_index)
Get Task State Store
Get a single task state store entry.
import airflow_client.client from airflow_client.client.models.task_state_store_response import TaskStateStoreResponse 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.TaskStateStoreApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | key = 'key_example' # str | map_index = -1 # int | (optional) (default to -1) try: # Get Task State Store api_response = api_instance.get_task_state_store(dag_id, dag_run_id, task_id, key, map_index=map_index) print("The response of TaskStateStoreApi->get_task_state_store:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskStateStoreApi->get_task_state_store: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str | ||
| dag_run_id | str | ||
| task_id | str | ||
| key | str | ||
| map_index | int | [optional] [default to -1] |
OAuth2PasswordBearer, HTTPBearer
| 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]
TaskStateStoreCollectionResponse list_task_state_store(dag_id, dag_run_id, task_id, map_index=map_index, limit=limit, offset=offset)
List Task State Store
List all task state store entries for a task instance.
import airflow_client.client from airflow_client.client.models.task_state_store_collection_response import TaskStateStoreCollectionResponse 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.TaskStateStoreApi(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) limit = 50 # int | (optional) (default to 50) offset = 0 # int | (optional) (default to 0) try: # List Task State Store api_response = api_instance.list_task_state_store(dag_id, dag_run_id, task_id, map_index=map_index, limit=limit, offset=offset) print("The response of TaskStateStoreApi->list_task_state_store:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskStateStoreApi->list_task_state_store: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str | ||
| dag_run_id | str | ||
| task_id | str | ||
| map_index | int | [optional] [default to -1] | |
| limit | int | [optional] [default to 50] | |
| offset | int | [optional] [default to 0] |
TaskStateStoreCollectionResponse
OAuth2PasswordBearer, HTTPBearer
| 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]
object patch_task_state_store(dag_id, dag_run_id, task_id, key, task_state_store_patch_body, map_index=map_index)
Patch Task State Store
Update the value of an existing task state store key.
import airflow_client.client from airflow_client.client.models.task_state_store_patch_body import TaskStateStorePatchBody 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.TaskStateStoreApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | key = 'key_example' # str | task_state_store_patch_body = airflow_client.client.TaskStateStorePatchBody() # TaskStateStorePatchBody | map_index = -1 # int | (optional) (default to -1) try: # Patch Task State Store api_response = api_instance.patch_task_state_store(dag_id, dag_run_id, task_id, key, task_state_store_patch_body, map_index=map_index) print("The response of TaskStateStoreApi->patch_task_state_store:\n") pprint(api_response) except Exception as e: print("Exception when calling TaskStateStoreApi->patch_task_state_store: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str | ||
| dag_run_id | str | ||
| task_id | str | ||
| key | str | ||
| task_state_store_patch_body | TaskStateStorePatchBody | ||
| map_index | int | [optional] [default to -1] |
object
OAuth2PasswordBearer, HTTPBearer
| 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]
set_task_state_store(dag_id, dag_run_id, task_id, key, task_state_store_body, map_index=map_index)
Set Task State Store
Set a task state store value. Creates or overwrites the key.
import airflow_client.client from airflow_client.client.models.task_state_store_body import TaskStateStoreBody 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.TaskStateStoreApi(api_client) dag_id = 'dag_id_example' # str | dag_run_id = 'dag_run_id_example' # str | task_id = 'task_id_example' # str | key = 'key_example' # str | task_state_store_body = airflow_client.client.TaskStateStoreBody() # TaskStateStoreBody | map_index = -1 # int | (optional) (default to -1) try: # Set Task State Store api_instance.set_task_state_store(dag_id, dag_run_id, task_id, key, task_state_store_body, map_index=map_index) except Exception as e: print("Exception when calling TaskStateStoreApi->set_task_state_store: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| dag_id | str | ||
| dag_run_id | str | ||
| task_id | str | ||
| key | str | ||
| task_state_store_body | TaskStateStoreBody | ||
| map_index | int | [optional] [default to -1] |
void (empty response body)
OAuth2PasswordBearer, HTTPBearer
| 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]