pldpro_sdk.api_client.LicencesApi
All URIs are relative to http://localhost:8086
| Method | HTTP request | Description |
|---|---|---|
| check_valid_license | GET /api/v1/licenses/check | Busca a licença do tenant por modelo |
| create_license | POST /api/v1/licenses | Faz upload de um arquivo de licença |
| get_all_licenses_by_tenant | GET /api/v1/licenses | Lista todas as licenças do tenant |
| get_all_valid_licenses_by_tenant | GET /api/v1/licenses/available | Lista as licenças válidas do tenant |
| get_license_by_model | GET /api/v1/licenses/by-model/{modelType} | Busca a licença do tenant por modelo na URL |
check_valid_license
bool check_valid_license(model_type)
Busca a licença do tenant por modelo
Retorna a licença mais recente do tenant para o modelo informado via query string.
Example
- Api Key Authentication (1_tenant):
- Api Key Authentication (4_roles):
- Bearer (JWT) Authentication (security_auth):
- Api Key Authentication (2_user):
- Api Key Authentication (ApiKeyAuth):
- Api Key Authentication (3_user_id):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8086
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
host = "http://localhost:8086"
)
# 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 API key authorization: 1_tenant
configuration.api_key['1_tenant'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['1_tenant'] = 'Bearer'
# Configure API key authorization: 4_roles
configuration.api_key['4_roles'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['4_roles'] = 'Bearer'
# Configure Bearer authorization (JWT): security_auth
configuration = pldpro_sdk.api_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: 2_user
configuration.api_key['2_user'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['2_user'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: 3_user_id
configuration.api_key['3_user_id'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['3_user_id'] = 'Bearer'
# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pldpro_sdk.api_client.LicencesApi(api_client)
model_type = 'DECOMP' # str | Modelo cuja licença deve ser consultada.
try:
# Busca a licença do tenant por modelo
api_response = api_instance.check_valid_license(model_type)
print("The response of LicencesApi->check_valid_license:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling LicencesApi->check_valid_license: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| model_type | str | Modelo cuja licença deve ser consultada. |
Return type
bool
Authorization
1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Resultado da verificação da licença. | - |
| 400 | Erro ao consultar licença | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
create_license
LicenseResponse create_license(multipart_files, license_request)
Faz upload de um arquivo de licença
Envia um arquivo de licença para o tenant informado no header X-Tenant-ID, junto com os metadados obrigatórios da licença no part licenseRequest em JSON.
Example
- Api Key Authentication (1_tenant):
- Api Key Authentication (4_roles):
- Bearer (JWT) Authentication (security_auth):
- Api Key Authentication (2_user):
- Api Key Authentication (ApiKeyAuth):
- Api Key Authentication (3_user_id):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.license_response import LicenseResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8086
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
host = "http://localhost:8086"
)
# 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 API key authorization: 1_tenant
configuration.api_key['1_tenant'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['1_tenant'] = 'Bearer'
# Configure API key authorization: 4_roles
configuration.api_key['4_roles'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['4_roles'] = 'Bearer'
# Configure Bearer authorization (JWT): security_auth
configuration = pldpro_sdk.api_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: 2_user
configuration.api_key['2_user'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['2_user'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: 3_user_id
configuration.api_key['3_user_id'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['3_user_id'] = 'Bearer'
# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pldpro_sdk.api_client.LicencesApi(api_client)
multipart_files = None # bytes |
license_request = 'license_request_example' # str |
try:
# Faz upload de um arquivo de licença
api_response = api_instance.create_license(multipart_files, license_request)
print("The response of LicencesApi->create_license:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling LicencesApi->create_license: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| multipart_files | bytes | ||
| license_request | str |
Return type
Authorization
1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id
HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Licença criada com sucesso. | - |
| 400 | Erro ao criar licença | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_all_licenses_by_tenant
List[LicenseResponse] get_all_licenses_by_tenant()
Lista todas as licenças do tenant
Retorna todas as licenças associadas ao tenant informado no header X-Tenant-ID, sem filtrar por validade.
Example
- Api Key Authentication (1_tenant):
- Api Key Authentication (4_roles):
- Bearer (JWT) Authentication (security_auth):
- Api Key Authentication (2_user):
- Api Key Authentication (ApiKeyAuth):
- Api Key Authentication (3_user_id):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.license_response import LicenseResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8086
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
host = "http://localhost:8086"
)
# 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 API key authorization: 1_tenant
configuration.api_key['1_tenant'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['1_tenant'] = 'Bearer'
# Configure API key authorization: 4_roles
configuration.api_key['4_roles'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['4_roles'] = 'Bearer'
# Configure Bearer authorization (JWT): security_auth
configuration = pldpro_sdk.api_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: 2_user
configuration.api_key['2_user'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['2_user'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: 3_user_id
configuration.api_key['3_user_id'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['3_user_id'] = 'Bearer'
# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pldpro_sdk.api_client.LicencesApi(api_client)
try:
# Lista todas as licenças do tenant
api_response = api_instance.get_all_licenses_by_tenant()
print("The response of LicencesApi->get_all_licenses_by_tenant:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling LicencesApi->get_all_licenses_by_tenant: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
Authorization
1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Lista de licenças retornada com sucesso. | - |
| 400 | Erro ao listar licenças | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_all_valid_licenses_by_tenant
List[LicenseResponse] get_all_valid_licenses_by_tenant()
Lista as licenças válidas do tenant
Retorna somente as licenças válidas associadas ao tenant informado no header X-Tenant-ID.
Example
- Api Key Authentication (1_tenant):
- Api Key Authentication (4_roles):
- Bearer (JWT) Authentication (security_auth):
- Api Key Authentication (2_user):
- Api Key Authentication (ApiKeyAuth):
- Api Key Authentication (3_user_id):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.license_response import LicenseResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8086
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
host = "http://localhost:8086"
)
# 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 API key authorization: 1_tenant
configuration.api_key['1_tenant'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['1_tenant'] = 'Bearer'
# Configure API key authorization: 4_roles
configuration.api_key['4_roles'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['4_roles'] = 'Bearer'
# Configure Bearer authorization (JWT): security_auth
configuration = pldpro_sdk.api_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: 2_user
configuration.api_key['2_user'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['2_user'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: 3_user_id
configuration.api_key['3_user_id'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['3_user_id'] = 'Bearer'
# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pldpro_sdk.api_client.LicencesApi(api_client)
try:
# Lista as licenças válidas do tenant
api_response = api_instance.get_all_valid_licenses_by_tenant()
print("The response of LicencesApi->get_all_valid_licenses_by_tenant:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling LicencesApi->get_all_valid_licenses_by_tenant: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
Authorization
1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Lista de licenças válidas retornada com sucesso. | - |
| 400 | Erro ao listar licenças válidas | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_license_by_model
LicenseResponse get_license_by_model(model_type)
Busca a licença do tenant por modelo na URL
Retorna a licença mais recente do tenant para o modelo informado no path.
Example
- Api Key Authentication (1_tenant):
- Api Key Authentication (4_roles):
- Bearer (JWT) Authentication (security_auth):
- Api Key Authentication (2_user):
- Api Key Authentication (ApiKeyAuth):
- Api Key Authentication (3_user_id):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.license_response import LicenseResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8086
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
host = "http://localhost:8086"
)
# 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 API key authorization: 1_tenant
configuration.api_key['1_tenant'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['1_tenant'] = 'Bearer'
# Configure API key authorization: 4_roles
configuration.api_key['4_roles'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['4_roles'] = 'Bearer'
# Configure Bearer authorization (JWT): security_auth
configuration = pldpro_sdk.api_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: 2_user
configuration.api_key['2_user'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['2_user'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: 3_user_id
configuration.api_key['3_user_id'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['3_user_id'] = 'Bearer'
# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pldpro_sdk.api_client.LicencesApi(api_client)
model_type = 'DECOMP' # str | Modelo cuja licença deve ser consultada.
try:
# Busca a licença do tenant por modelo na URL
api_response = api_instance.get_license_by_model(model_type)
print("The response of LicencesApi->get_license_by_model:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling LicencesApi->get_license_by_model: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| model_type | str | Modelo cuja licença deve ser consultada. |
Return type
Authorization
1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, /
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Licença encontrada com sucesso. | - |
| 400 | Erro ao consultar licença | - |
| 404 | Licença não encontrada para o modelo informado | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]