Altera a capacidade de armazenamento do projeto.
PATCH /project/:id/storage/size
{
"status": "success",
"message": "storage size updated with success"
}
Retorna informações sobre o uso atual do armazenamento do projeto.
GET /project/:id/storage/usage
{
"status": "success",
"message": "get volume usage with success",
"data": {
"used": "5Gi",
"capacity": "10Gi",
"replica_count": 1
}
}
curl -X PATCH "https://api.zenifra.com/v1/project/507f1f77bcf86cd799439011/storage/size" \
-H "x-api-key: sua-api-key" \
-H "x-organization-id: sua-organization-id" \
-H "Content-Type: application/json" \
-d '{"size": 20}'
curl -X GET "https://api.zenifra.com/v1/project/507f1f77bcf86cd799439011/storage/usage" \
-H "x-api-key: sua-api-key" \
-H "x-organization-id: sua-organization-id"
import requests
API_KEY = "sua-api-key"
ORGANIZATION_ID = "sua-organization-id"
PROJECT_ID = "507f1f77bcf86cd799439011"
headers = {"x-api-key": API_KEY, "x-organization-id": ORGANIZATION_ID}
# Atualizar tamanho do armazenamento
requests.patch(
f"https://api.zenifra.com/v1/project/{PROJECT_ID}/storage/size",
headers=headers,
json={"size": 20}
)
# Obter uso de armazenamento
usage = requests.get(
f"https://api.zenifra.com/v1/project/{PROJECT_ID}/storage/usage",
headers=headers
).json()
print(usage)