Pular para conteúdo

pldpro_sdk.api_client.DataApi

All URIs are relative to /v1

Method HTTP request Description
execute_data_strategy POST /data/{data_type}/select/{item_name}/to/{caso_uuid}/strategy/{strategy_name} Aplicar uma estratégia de dados a um caso
get_available_data_items GET /data/{data_type}/available Listar itens disponíveis para um tipo de dado
get_available_data_items_by_volume GET /data/{auth_node_uuid}/{data_type}/available Listar itens disponíveis para um tipo de dado em um volume
get_available_data_types GET /data Listar tipos de dados disponíveis
get_available_types_by_volume GET /data/{auth_node_uuid} Listar tipos de dados disponíveis em um volume
list_data_strategies GET /data/strategies Listar estratégias de carregamento de dados
list_volume_data_strategies GET /data/volume/strategies Listar estratégias de volume

execute_data_strategy

execute_data_strategy(data_type, item_name, caso_uuid, strategy_name)

Aplicar uma estratégia de dados a um caso

Aplica a estratégia de dados informada a um caso específico, utilizando: - o tipo de dados (data_type), - o item dentro desse tipo (item_name), - o identificador do caso (caso_uuid), - e o nome da estratégia (strategy_name). Em caso de sucesso, nenhum conteúdo é retornado.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
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 /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# 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: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = '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'

# 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.DataApi(api_client)
    data_type = 'newave' # str | Tipo de dados no repositório.
    item_name = 'nw202512_resultado_ccee' # str | Nome do item dentro do tipo de dados.
    caso_uuid = UUID('123e4567-e89b-12d3-a456-426614174000') # UUID | UUID do caso PLDPro que receberá os dados.
    strategy_name = 'PARTIDA_SEMANAL_DATA_STRATEGY' # str | Nome lógico da estratégia de dados a ser aplicada.

    try:
        # Aplicar uma estratégia de dados a um caso
        api_instance.execute_data_strategy(data_type, item_name, caso_uuid, strategy_name)
    except Exception as e:
        print("Exception when calling DataApi->execute_data_strategy: %s\n" % e)

Parameters

Name Type Description Notes
data_type str Tipo de dados no repositório.
item_name str Nome do item dentro do tipo de dados.
caso_uuid UUID UUID do caso PLDPro que receberá os dados.
strategy_name str Nome lógico da estratégia de dados a ser aplicada.

Return type

void (empty response body)

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Estratégia aplicada com sucesso (nenhum conteúdo retornado). -
400 Parâmetros inválidos ou estratégia/tipo/item não encontrados. -
500 Erro interno ao aplicar a estratégia de dados. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_available_data_items

List[str] get_available_data_items(data_type)

Listar itens disponíveis para um tipo de dado

Retorna a lista de itens disponíveis para o tipo de dado informado. Cada item corresponde a um subdiretório dentro do tipo de dados selecionado.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
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 /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# 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: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = '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'

# 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.DataApi(api_client)
    data_type = 'newave' # str | Nome do tipo de dados (diretório de primeiro nível).

    try:
        # Listar itens disponíveis para um tipo de dado
        api_response = api_instance.get_available_data_items(data_type)
        print("The response of DataApi->get_available_data_items:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DataApi->get_available_data_items: %s\n" % e)

Parameters

Name Type Description Notes
data_type str Nome do tipo de dados (diretório de primeiro nível).

Return type

List[str]

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Itens recuperados com sucesso. -
400 Tipo de dado informado não existe. -
500 Erro ao montar o repositório de dados. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_available_data_items_by_volume

List[str] get_available_data_items_by_volume(auth_node_uuid, data_type)

Listar itens disponíveis para um tipo de dado em um volume

Retorna a lista de itens disponíveis para o tipo de dado informado, considerando o volume associado ao AuthNode especificado.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
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 /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# 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: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = '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'

# 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.DataApi(api_client)
    auth_node_uuid = UUID('123e4567-e89b-12d3-a456-426614174000') # UUID | UUID do AuthNode cujo volume será consultado.
    data_type = 'newave' # str | Nome do tipo de dados dentro do volume.

    try:
        # Listar itens disponíveis para um tipo de dado em um volume
        api_response = api_instance.get_available_data_items_by_volume(auth_node_uuid, data_type)
        print("The response of DataApi->get_available_data_items_by_volume:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DataApi->get_available_data_items_by_volume: %s\n" % e)

Parameters

Name Type Description Notes
auth_node_uuid UUID UUID do AuthNode cujo volume será consultado.
data_type str Nome do tipo de dados dentro do volume.

Return type

List[str]

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Itens recuperados com sucesso. -
400 AuthNode inválido, sem volume associado ou tipo de dado inexistente. -
500 Erro ao consultar os itens disponíveis no volume. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_available_data_types

List[str] get_available_data_types()

Listar tipos de dados disponíveis

Retorna a lista de tipos de dados disponíveis no repositório de dados da API. Cada item corresponde a um diretório de primeiro nível no repositório de dados (por exemplo: "newave", "partida-semanal", etc.).

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
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 /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# 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: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = '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'

# 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.DataApi(api_client)

    try:
        # Listar tipos de dados disponíveis
        api_response = api_instance.get_available_data_types()
        print("The response of DataApi->get_available_data_types:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DataApi->get_available_data_types: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[str]

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Tipos de dados recuperados com sucesso. -
500 Erro ao montar o repositório de dados. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_available_types_by_volume

List[str] get_available_types_by_volume(auth_node_uuid)

Listar tipos de dados disponíveis em um volume

Retorna a lista de tipos de dados disponíveis no volume associado ao AuthNode informado. O volume consultado é o primeiro volume vinculado ao node associado a esse AuthNode.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
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 /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# 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: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = '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'

# 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.DataApi(api_client)
    auth_node_uuid = UUID('123e4567-e89b-12d3-a456-426614174000') # UUID | UUID do AuthNode cujo volume será consultado.

    try:
        # Listar tipos de dados disponíveis em um volume
        api_response = api_instance.get_available_types_by_volume(auth_node_uuid)
        print("The response of DataApi->get_available_types_by_volume:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DataApi->get_available_types_by_volume: %s\n" % e)

Parameters

Name Type Description Notes
auth_node_uuid UUID UUID do AuthNode cujo volume será consultado.

Return type

List[str]

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Tipos de dados recuperados com sucesso. -
400 AuthNode inválido ou sem volume associado. -
500 Erro ao consultar os dados disponíveis no volume. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_data_strategies

List[DataStrategyInfo] list_data_strategies()

Listar estratégias de carregamento de dados

Retorna a lista de estratégias de carregamento/posicionamento de dados disponíveis, com o nome lógico da estratégia e sua descrição. Essas estratégias podem ser usadas para aplicar dados de um repositório a um caso específico.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.data_strategy_info import DataStrategyInfo
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# 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: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = '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'

# 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.DataApi(api_client)

    try:
        # Listar estratégias de carregamento de dados
        api_response = api_instance.list_data_strategies()
        print("The response of DataApi->list_data_strategies:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DataApi->list_data_strategies: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[DataStrategyInfo]

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Estratégias recuperadas com sucesso. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_volume_data_strategies

List[DataStrategyInfo] list_volume_data_strategies()

Listar estratégias de volume

Retorna a lista de estratégias de dados específicas para operações com volumes. Essas estratégias correspondem ao subconjunto de estratégias disponíveis para dados cujo identificador está associado a volume.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.data_strategy_info import DataStrategyInfo
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /v1
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
    host = "/v1"
)

# 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: TenantIdAuth
configuration.api_key['TenantIdAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TenantIdAuth'] = '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'

# 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.DataApi(api_client)

    try:
        # Listar estratégias de volume
        api_response = api_instance.list_volume_data_strategies()
        print("The response of DataApi->list_volume_data_strategies:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DataApi->list_volume_data_strategies: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[DataStrategyInfo]

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Estratégias de volume recuperadas com sucesso. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]