All URIs are relative to https://api.quetz.al/api/v1
Method | HTTP request | Description |
---|---|---|
auth_get_token | POST /auth/token | Login. |
auth_logout | POST /auth/logout | Logout. |
Token auth_get_token()
Login.
Authenticate with simple HTTP authentication and obtain a bearer token. This bearer token can be used on the other endpoints of the API.
- Basic Authentication (basic):
from __future__ import print_function
import time
import quetzal.openapi_client
from quetzal.openapi_client.rest import ApiException
from pprint import pprint
configuration = quetzal.openapi_client.Configuration()
# Configure HTTP basic authorization: basic
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = quetzal.openapi_client.AuthenticationApi(quetzal.openapi_client.ApiClient(configuration))
try:
# Login.
api_response = api_instance.auth_get_token()
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthenticationApi->auth_get_token: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json, application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
auth_logout()
Logout.
Logout by invalidating the existing token.
- Bearer Authentication (bearer):
from __future__ import print_function
import time
import quetzal.openapi_client
from quetzal.openapi_client.rest import ApiException
from pprint import pprint
configuration = quetzal.openapi_client.Configuration()
# Configure Bearer authorization: bearer
configuration.access_token = 'YOUR_BEARER_TOKEN'
# create an instance of the API class
api_instance = quetzal.openapi_client.AuthenticationApi(quetzal.openapi_client.ApiClient(configuration))
try:
# Logout.
api_instance.auth_logout()
except ApiException as e:
print("Exception when calling AuthenticationApi->auth_logout: %s\n" % e)
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: application/problem+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]