Pular para conteúdo

pldpro_sdk.api_client.ExecucoesApi

All URIs are relative to /v1

Method HTTP request Description
get_caso_execution_console_logs GET /casos/{uuid}/execution/logs/console Obtém a saída de console da execução do caso
get_caso_execution_logs GET /casos/{uuid}/execution/logs Obtém o log da execução do caso
get_caso_execution_status GET /casos/{uuid}/execution/status Consulta o status atual de uma execução
list_executions_by_auth_node GET /nodes/auth/{uuid}/execution Lista o status das execuções associadas a um AuthNode
start_caso_execution POST /casos/{uuid}/execution Inicia a execução de um caso
stop_caso_execution DELETE /casos/{uuid}/execution Interrompe a execução de um caso

get_caso_execution_console_logs

str get_caso_execution_console_logs(uuid)

Obtém a saída de console da execução do caso

Retorna o conteúdo textual da saída de console (stdout) gerada pela execução associada ao caso identificado pelo UUID.

Caso a saída ainda não exista, é retornada uma string vazia.

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.ExecucoesApi(api_client)
    uuid = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Identificador único do caso cuja saída de console será consultada.

    try:
        # Obtém a saída de console da execução do caso
        api_response = api_instance.get_caso_execution_console_logs(uuid)
        print("The response of ExecucoesApi->get_caso_execution_console_logs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ExecucoesApi->get_caso_execution_console_logs: %s\n" % e)

Parameters

Name Type Description Notes
uuid UUID Identificador único do caso cuja saída de console será consultada.

Return type

str

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json

HTTP response details

Status code Description Response headers
200 Saída de console retornada com sucesso. -
400 Erro ao obter a saída de console da execução. -
404 Caso não encontrado ou saída de console inexistente. -

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

get_caso_execution_logs

str get_caso_execution_logs(uuid)

Obtém o log da execução do caso

Retorna o conteúdo textual do log gerado durante a execução associada ao caso identificado pelo UUID informado.

Caso o log ainda não exista, é retornada uma string vazia.

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.ExecucoesApi(api_client)
    uuid = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Identificador único do caso cuja execução será consultada.

    try:
        # Obtém o log da execução do caso
        api_response = api_instance.get_caso_execution_logs(uuid)
        print("The response of ExecucoesApi->get_caso_execution_logs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ExecucoesApi->get_caso_execution_logs: %s\n" % e)

Parameters

Name Type Description Notes
uuid UUID Identificador único do caso cuja execução será consultada.

Return type

str

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json

HTTP response details

Status code Description Response headers
200 Log retornado com sucesso. -
400 Erro ao obter o log da execução. -
404 Caso não encontrado ou log inexistente. -

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

get_caso_execution_status

ExecucaoResponse get_caso_execution_status(uuid)

Consulta o status atual de uma execução

Retorna as informações completas da execução associada ao UUID informado, incluindo status, modo de execução, timestamps e dados do caso (incluindo o AuthNode associado).

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.execucao_response import ExecucaoResponse
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.ExecucoesApi(api_client)
    uuid = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Identificador único da execução.

    try:
        # Consulta o status atual de uma execução
        api_response = api_instance.get_caso_execution_status(uuid)
        print("The response of ExecucoesApi->get_caso_execution_status:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ExecucoesApi->get_caso_execution_status: %s\n" % e)

Parameters

Name Type Description Notes
uuid UUID Identificador único da execução.

Return type

ExecucaoResponse

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Status da execução retornado com sucesso. -
400 Erro ao consultar o status da execução. -
404 Execução não encontrada ou ainda não iniciada. -

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

list_executions_by_auth_node

List[StatusExecucao] list_executions_by_auth_node(uuid)

Lista o status das execuções associadas a um AuthNode

Retorna a lista de execuções vinculadas aos casos associados ao AuthNode identificado pelo UUID informado.

Cada item contém o identificador do caso, informações de caminho e o status atual da execução.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.status_execucao import StatusExecucao
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.ExecucoesApi(api_client)
    uuid = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Identificador único do AuthNode cujas execuções serão listadas.

    try:
        # Lista o status das execuções associadas a um AuthNode
        api_response = api_instance.list_executions_by_auth_node(uuid)
        print("The response of ExecucoesApi->list_executions_by_auth_node:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ExecucoesApi->list_executions_by_auth_node: %s\n" % e)

Parameters

Name Type Description Notes
uuid UUID Identificador único do AuthNode cujas execuções serão listadas.

Return type

List[StatusExecucao]

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Lista de execuções associadas ao AuthNode. -
404 AuthNode não encontrado para o UUID informado. -
400 Erro ao consultar as execuções do AuthNode. -

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

start_caso_execution

ExecucaoResponse start_caso_execution(uuid, execucao_start_request=execucao_start_request)

Inicia a execução de um caso

Inicia a execução do caso identificado pelo UUID informado.

  • Quando o node estiver configurado no modo NATIVE, o campo version é opcional.
  • Quando o node estiver configurado no modo CONTAINER, o campo version é obrigatório.
  • O campo tipoEntrada controla qual arquivo de entrada o PLDPro utilizará: DEFAULT (entrada.txt) ou CONVERSOR (entrada_conversor.txt).
  • O campo optionsExecutaModelo permite informar opções adicionais para a execução do modelo, como o tipo de execução e parâmetros de infraestrutura.

Example

  • Api Key Authentication (TenantIdAuth):
  • Api Key Authentication (ApiKeyAuth):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.execucao_response import ExecucaoResponse
from pldpro_sdk.api_client.models.execucao_start_request import ExecucaoStartRequest
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.ExecucoesApi(api_client)
    uuid = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Identificador único do caso a ser executado.
    execucao_start_request = pldpro_sdk.api_client.ExecucaoStartRequest() # ExecucaoStartRequest | Parâmetros opcionais de execução. (optional)

    try:
        # Inicia a execução de um caso
        api_response = api_instance.start_caso_execution(uuid, execucao_start_request=execucao_start_request)
        print("The response of ExecucoesApi->start_caso_execution:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ExecucoesApi->start_caso_execution: %s\n" % e)

Parameters

Name Type Description Notes
uuid UUID Identificador único do caso a ser executado.
execucao_start_request ExecucaoStartRequest Parâmetros opcionais de execução. [optional]

Return type

ExecucaoResponse

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Execução iniciada com sucesso. -
400 Erro ao iniciar a execução do caso. -
404 Caso não encontrado. -

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

stop_caso_execution

stop_caso_execution(uuid)

Interrompe a execução de um caso

Interrompe a execução em andamento do caso identificado pelo UUID.

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.ExecucoesApi(api_client)
    uuid = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Identificador único da execução cuja deve ser interrompida.

    try:
        # Interrompe a execução de um caso
        api_instance.stop_caso_execution(uuid)
    except Exception as e:
        print("Exception when calling ExecucoesApi->stop_caso_execution: %s\n" % e)

Parameters

Name Type Description Notes
uuid UUID Identificador único da execução cuja deve ser interrompida.

Return type

void (empty response body)

Authorization

TenantIdAuth, ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json

HTTP response details

Status code Description Response headers
200 Execução interrompida com sucesso. -
400 Erro ao tentar interromper a execução. -
404 Caso não encontrado ou sem execução associada. -

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