blob: 12bc074413f15318a6cfa51a311feee404ee7a16 [file] [log] [blame] [view]
# airflow_client.client.LoginApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**login**](LoginApi.md#login) | **GET** /api/v2/auth/login | Login
[**logout**](LoginApi.md#logout) | **GET** /api/v2/auth/logout | Logout
[**refresh**](LoginApi.md#refresh) | **GET** /api/v2/auth/refresh | Refresh
# **login**
> object login(next=next)
Login
Redirect to the login URL depending on the AuthManager configured.
### Example
```python
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)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**next** | **str**| | [optional]
### Return type
**object**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**307** | Temporary Redirect | - |
**422** | Validation Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **logout**
> object logout(next=next)
Logout
Logout the user.
### Example
```python
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:
# Logout
api_response = api_instance.logout(next=next)
print("The response of LoginApi->logout:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling LoginApi->logout: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**next** | **str**| | [optional]
### Return type
**object**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**307** | Temporary Redirect | - |
**422** | Validation Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **refresh**
> object refresh(next=next)
Refresh
Refresh the authentication token.
### Example
```python
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:
# Refresh
api_response = api_instance.refresh(next=next)
print("The response of LoginApi->refresh:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling LoginApi->refresh: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**next** | **str**| | [optional]
### Return type
**object**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successful Response | - |
**307** | Temporary Redirect | - |
**422** | Validation Error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)