All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| login | GET /api/v2/auth/login | Login |
| logout | GET /api/v2/auth/logout | Logout |
object login(next=next)
Login
Redirect to the login URL depending on the AuthManager configured.
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"
)
# 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.LoginApi(api_client)
next = 'next_example' # str | (optional)
try:
# Login
api_response = api_instance.login(next=next)
print("The response of LoginApi->login:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling LoginApi->login: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| next | str | [optional] |
object
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 307 | Temporary Redirect | - |
| 400 | Bad Request | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object logout()
Logout
Logout the user.
- 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.LoginApi(api_client)
try:
# Logout
api_response = api_instance.logout()
print("The response of LoginApi->logout:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling LoginApi->logout: %s\n" % e)This endpoint does not need any parameter.
object
OAuth2PasswordBearer, HTTPBearer
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 307 | Temporary Redirect | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]