Pular para conteúdo

pldpro_sdk.api_client.VolumesApi

All URIs are relative to http://localhost:8086

Method HTTP request Description
create_volume POST /api/v1/volumes Cria um novo volume
delete_volume DELETE /api/v1/volumes/{uuid} Remove um volume pelo UUID
get_all_volumes GET /api/v1/volumes Lista todos os volumes
get_volume_by_uuid GET /api/v1/volumes/{uuid} Busca um volume pelo UUID

create_volume

VolumeResponse create_volume(volume_request)

Cria um novo volume

Registra um novo volume no sistema.

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.volume_request import VolumeRequest
from pldpro_sdk.api_client.models.volume_response import VolumeResponse
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.VolumesApi(api_client)
    volume_request = {"nome":"dados_ampere","path":"/dados/pldpro/volumes/volume_a","uuidNode":"550e8400-e29b-41d4-a716-446655440000"} # VolumeRequest | 

    try:
        # Cria um novo volume
        api_response = api_instance.create_volume(volume_request)
        print("The response of VolumesApi->create_volume:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VolumesApi->create_volume: %s\n" % e)

Parameters

Name Type Description Notes
volume_request VolumeRequest

Return type

VolumeResponse

Authorization

1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Volume criado com sucesso. -
400 Erro ao criar volume -

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

delete_volume

delete_volume(uuid)

Remove um volume pelo UUID

Exclui um volume específico identificado pelo UUID.

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.VolumesApi(api_client)
    uuid = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Identificador único do volume

    try:
        # Remove um volume pelo UUID
        api_instance.delete_volume(uuid)
    except Exception as e:
        print("Exception when calling VolumesApi->delete_volume: %s\n" % e)

Parameters

Name Type Description Notes
uuid UUID Identificador único do volume

Return type

void (empty response body)

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
204 Volume removido com sucesso. Nenhum conteúdo retornado. -
400 Erro ao remover volume -
404 Volume não encontrado -

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

get_all_volumes

List[VolumeResponse] get_all_volumes()

Lista todos os volumes

Retorna a lista completa de volumes cadastrados no sistema.

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.volume_response import VolumeResponse
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.VolumesApi(api_client)

    try:
        # Lista todos os volumes
        api_response = api_instance.get_all_volumes()
        print("The response of VolumesApi->get_all_volumes:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VolumesApi->get_all_volumes: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[VolumeResponse]

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 volumes retornada com sucesso. -
400 Erro ao listar volumes -

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

get_volume_by_uuid

VolumeResponse get_volume_by_uuid(uuid)

Busca um volume pelo UUID

Retorna os detalhes de um volume específico identificado por seu UUID.

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.volume_response import VolumeResponse
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.VolumesApi(api_client)
    uuid = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Identificador único do volume

    try:
        # Busca um volume pelo UUID
        api_response = api_instance.get_volume_by_uuid(uuid)
        print("The response of VolumesApi->get_volume_by_uuid:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling VolumesApi->get_volume_by_uuid: %s\n" % e)

Parameters

Name Type Description Notes
uuid UUID Identificador único do volume

Return type

VolumeResponse

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 Volume encontrado com sucesso. -
400 Erro ao buscar volume -
404 Volume não encontrado -

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