Navegar pastas e arquivos no storage
Browse Storage
Navega pela estrutura de pastas e arquivos no storage do cliente.
Endpoint
GET /storage-explorer/storage/browse
Permissões Requeridas
STORAGE_EXPLORER.READ
Query Parameters
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
path | string | Não | Caminho da pasta (padrão: root "/") |
Exemplo de Requisição
curl -X GET "https://maestro.dadosfera.ai/storage-explorer/storage/browse?path=/raw/sales" \
-H "Authorization: <JWT_TOKEN>"Exemplo de Resposta
Success (200 OK):
{
"current_path": "/raw/sales",
"parent_path": "/raw",
"items": [
{
"name": "2024",
"type": "folder",
"path": "/raw/sales/2024",
"created_at": "2024-01-01T00:00:00Z",
"modified_at": "2024-01-15T10:30:00Z",
"item_count": 12
},
{
"name": "archive",
"type": "folder",
"path": "/raw/sales/archive",
"created_at": "2023-12-01T00:00:00Z",
"modified_at": "2024-01-10T14:20:00Z",
"item_count": 156
},
{
"name": "orders_2024_01.csv",
"type": "file",
"path": "/raw/sales/orders_2024_01.csv",
"size_bytes": 524288,
"created_at": "2024-01-15T10:30:00Z",
"modified_at": "2024-01-15T10:30:00Z",
"file_format": "csv",
"dataset_id": "ds_x1y2z3"
},
{
"name": "products_jan.xlsx",
"type": "file",
"path": "/raw/sales/products_jan.xlsx",
"size_bytes": 153600,
"created_at": "2024-01-15T10:30:00Z",
"modified_at": "2024-01-15T10:30:00Z",
"file_format": "excel",
"dataset_id": "ds_a2b3c4"
},
{
"name": "events.json",
"type": "file",
"path": "/raw/sales/events.json",
"size_bytes": 256000,
"created_at": "2024-01-15T10:30:00Z",
"modified_at": "2024-01-15T10:30:00Z",
"file_format": "json",
"dataset_id": "ds_b3c4d5"
}
],
"total_items": 5,
"total_folders": 2,
"total_files": 3,
"total_size_bytes": 933888
}Response Fields
| Campo | Tipo | Descrição |
|---|---|---|
current_path | string | Caminho atual |
parent_path | string | Caminho do diretório pai |
items | array | Lista de pastas e arquivos |
items[].type | string | Tipo do item (folder, file) |
items[].path | string | Caminho completo |
items[].size_bytes | integer | Tamanho em bytes (apenas arquivos) |
items[].file_format | string | Formato do arquivo |
items[].dataset_id | string | ID do dataset (se existir) |
total_items | integer | Total de itens |
Navegação
Para navegar para subpastas, use o path retornado:
# Navegar para pasta 2024
curl -X GET "https://maestro.dadosfera.ai/storage-explorer/storage/browse?path=/raw/sales/2024" \
-H "Authorization: <JWT_TOKEN>"Códigos de Status
| Código | Descrição |
|---|---|
200 | Conteúdo retornado com sucesso |
401 | Não autenticado |
403 | Sem permissão STORAGE_EXPLORER.READ |
404 | Caminho não encontrado |
