pldpro_sdk.api_client.VolumesApi
All URIs are relative to /v1
| Method | HTTP request | Description |
|---|---|---|
| create_volume | POST /volumes | Cria um novo volume |
| delete_volume | DELETE /volumes/{uuid} | Remove um volume pelo UUID |
| get_all_volumes | GET /volumes | Lista todos os volumes |
| get_volume_by_uuid | GET /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 (TenantIdAuth):
- Api Key Authentication (ApiKeyAuth):
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 /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.VolumesApi(api_client)
volume_request = pldpro_sdk.api_client.VolumeRequest() # 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
Authorization
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 (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.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
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 (TenantIdAuth):
- Api Key Authentication (ApiKeyAuth):
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 /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.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
Authorization
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 (TenantIdAuth):
- Api Key Authentication (ApiKeyAuth):
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 /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.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
Authorization
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]