airflow_client.client.EventLogApi

All URIs are relative to http://localhost

MethodHTTP requestDescription
get_event_logGET /api/v2/eventLogs/{event_log_id}Get Event Log
get_event_logsGET /api/v2/eventLogsGet Event Logs

get_event_log

EventLogResponse get_event_log(event_log_id)

Get Event Log

Example

  • OAuth Authentication (OAuth2PasswordBearer):
  • Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.event_log_response import EventLogResponse
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.EventLogApi(api_client)
    event_log_id = 56 # int | 

    try:
        # Get Event Log
        api_response = api_instance.get_event_log(event_log_id)
        print("The response of EventLogApi->get_event_log:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EventLogApi->get_event_log: %s\n" % e)

Parameters

NameTypeDescriptionNotes
event_log_idint

Return type

EventLogResponse

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]

get_event_logs

EventLogCollectionResponse get_event_logs(limit=limit, offset=offset, order_by=order_by, dag_id=dag_id, task_id=task_id, run_id=run_id, map_index=map_index, try_number=try_number, owner=owner, event=event, excluded_events=excluded_events, included_events=included_events, before=before, after=after, dag_id_pattern=dag_id_pattern, task_id_pattern=task_id_pattern, run_id_pattern=run_id_pattern, owner_pattern=owner_pattern, event_pattern=event_pattern)

Get Event Logs

Get all Event Logs.

Example

  • OAuth Authentication (OAuth2PasswordBearer):
  • Bearer Authentication (HTTPBearer):
import airflow_client.client
from airflow_client.client.models.event_log_collection_response import EventLogCollectionResponse
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.EventLogApi(api_client)
    limit = 50 # int |  (optional) (default to 50)
    offset = 0 # int |  (optional) (default to 0)
    order_by = [id] # List[str] |  (optional) (default to [id])
    dag_id = 'dag_id_example' # str |  (optional)
    task_id = 'task_id_example' # str |  (optional)
    run_id = 'run_id_example' # str |  (optional)
    map_index = 56 # int |  (optional)
    try_number = 56 # int |  (optional)
    owner = 'owner_example' # str |  (optional)
    event = 'event_example' # str |  (optional)
    excluded_events = ['excluded_events_example'] # List[str] |  (optional)
    included_events = ['included_events_example'] # List[str] |  (optional)
    before = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    after = '2013-10-20T19:20:30+01:00' # datetime |  (optional)
    dag_id_pattern = 'dag_id_pattern_example' # str | SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported. (optional)
    task_id_pattern = 'task_id_pattern_example' # str | SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported. (optional)
    run_id_pattern = 'run_id_pattern_example' # str | SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported. (optional)
    owner_pattern = 'owner_pattern_example' # str | SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported. (optional)
    event_pattern = 'event_pattern_example' # str | SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported. (optional)

    try:
        # Get Event Logs
        api_response = api_instance.get_event_logs(limit=limit, offset=offset, order_by=order_by, dag_id=dag_id, task_id=task_id, run_id=run_id, map_index=map_index, try_number=try_number, owner=owner, event=event, excluded_events=excluded_events, included_events=included_events, before=before, after=after, dag_id_pattern=dag_id_pattern, task_id_pattern=task_id_pattern, run_id_pattern=run_id_pattern, owner_pattern=owner_pattern, event_pattern=event_pattern)
        print("The response of EventLogApi->get_event_logs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EventLogApi->get_event_logs: %s\n" % e)

Parameters

NameTypeDescriptionNotes
limitint[optional] [default to 50]
offsetint[optional] [default to 0]
order_byList[str][optional] [default to [id]]
dag_idstr[optional]
task_idstr[optional]
run_idstr[optional]
map_indexint[optional]
try_numberint[optional]
ownerstr[optional]
eventstr[optional]
excluded_eventsList[str][optional]
included_eventsList[str][optional]
beforedatetime[optional]
afterdatetime[optional]
dag_id_patternstrSQL LIKE expression — use `%` / `` wildcards (e.g. `%customer%`). Regular expressions are not supported.[optional]
task_id_patternstrSQL LIKE expression — use `%` / `` wildcards (e.g. `%customer%`). Regular expressions are not supported.[optional]
run_id_patternstrSQL LIKE expression — use `%` / `` wildcards (e.g. `%customer%`). Regular expressions are not supported.[optional]
owner_patternstrSQL LIKE expression — use `%` / `` wildcards (e.g. `%customer%`). Regular expressions are not supported.[optional]
event_patternstrSQL LIKE expression — use `%` / `` wildcards (e.g. `%customer%`). Regular expressions are not supported.[optional]

Return type

EventLogCollectionResponse

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]