Übersicht
Die Storage API dient zur Verwaltung des Dateispeichers in Fess. Sie können Dateien hochladen, herunterladen und löschen.
Basis-URL
/api/admin/storage
Endpunktliste
| Methode | Pfad | Beschreibung |
|---|---|---|
| GET | / | Speicherinhalt auflisten |
| GET | /{path} | Datei herunterladen |
| POST | / | Datei hochladen |
| DELETE | /{path} | Datei löschen |
Speicherinhalt auflisten
Request
GET /api/admin/storage
Parameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
path | String | Nein | Verzeichnispfad |
Response
{
"response": {
"status": 0,
"items": [
{
"name": "documents",
"type": "directory",
"size": 0
},
{
"name": "backup.zip",
"type": "file",
"size": 1048576,
"lastModified": "2025-01-29T10:00:00Z"
}
]
}
}
Datei hochladen
Request
POST /api/admin/storage
Content-Type: multipart/form-data
Response
{
"response": {
"status": 0,
"message": "File uploaded successfully",
"path": "/documents/uploaded-file.txt"
}
}
Verwendungsbeispiele
Speicherinhalt auflisten
curl -X GET "http://localhost:8080/api/admin/storage?path=/documents" \
-H "Authorization: Bearer YOUR_TOKEN"
Datei hochladen
curl -X POST "http://localhost:8080/api/admin/storage" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file=@myfile.txt" \
-F "path=/documents"
Datei löschen
curl -X DELETE "http://localhost:8080/api/admin/storage/documents/myfile.txt" \
-H "Authorization: Bearer YOUR_TOKEN"
Referenzinformationen
Admin API Übersicht - Admin API Übersicht
Speicher - Speicher Verwaltungsanleitung