cURL
curl --request GET \ --url https://api.example.com/api/files
{ "files": [ { "id": {}, "name": "<string>", "location": "<string>", "user_id": {}, "size": {}, "public": true, "created_at": {}, "updated_at": {} } ], "error": "<string>" }
Retrieve all files belonging to the authenticated user
Authorization: Bearer YOUR_JWT_TOKEN
{username}/{filename}
{ "error": "User not authenticated" }
{ "error": "Failed to retrieve files" }
curl -X GET https://api.defdrive.com/api/files \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
{ "files": [ { "id": 42, "name": "document.pdf", "location": "johndoe/document.pdf", "user_id": 15, "size": 2048576, "public": false, "created_at": "2026-03-04T10:30:00Z", "updated_at": "2026-03-04T10:30:00Z" }, { "id": 43, "name": "image.png", "location": "johndoe/image.png", "user_id": 15, "size": 524288, "public": true, "created_at": "2026-03-03T14:20:00Z", "updated_at": "2026-03-03T15:45:00Z" }, { "id": 44, "name": "backup.zip", "location": "johndoe/backup.zip", "user_id": 15, "size": 10485760, "public": false, "created_at": "2026-03-01T09:15:00Z", "updated_at": "2026-03-01T09:15:00Z" } ] }