All URIs are relative to https://dane.sat4envi.imgw.pl
Method | HTTP request | Description |
---|---|---|
token | POST /api/v1/token | Get authorization token |
TokenResponse token(login_request)
Get authorization token
- Bearer (JWT) Authentication (bearer-token):
import time
import py4envi_py4envi_openapi_client
from py4envi_py4envi_openapi_client.api import auth_api
from py4envi_py4envi_openapi_client.model.token_response import TokenResponse
from py4envi_py4envi_openapi_client.model.login_request import LoginRequest
from pprint import pprint
# Defining the host is optional and defaults to https://dane.sat4envi.imgw.pl
# See configuration.py for a list of all supported configuration parameters.
configuration = py4envi_py4envi_openapi_client.Configuration(
host = "https://dane.sat4envi.imgw.pl"
)
# 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.
# Configure Bearer authorization (JWT): bearer-token
configuration = py4envi_py4envi_openapi_client.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with py4envi_py4envi_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = auth_api.AuthApi(api_client)
login_request = LoginRequest(
email="email_example",
password="password_example",
) # LoginRequest |
# example passing only required values which don't have defaults set
try:
# Get authorization token
api_response = api_instance.token(login_request)
pprint(api_response)
except py4envi_py4envi_openapi_client.ApiException as e:
print("Exception when calling AuthApi->token: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
login_request | LoginRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
403 | Forbidden: Account disabled (not activated) | - |
400 | Incorrect request | - |
401 | Unauthenticated: Incorrect credentials or account doesn't exist | - |
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]