Skip to main content

GET /files

Description

Gets files data and returns a JSON array with this data

The route handles the HTTP GET request made to the /files path.

Payload

No payload is required.

Response

The server returns an array with the files data.

Example:

[
{ // the folder object
"count": 17,
"lazy": true,
"date": "2024-04-03 16:24:52",
"value": "Books",
"id": "/Books",
"type": "folder"
},
{ // the file object
"size": 234,
"date": "2024-04-03 16:24:53",
"value": "Info.txt",
"id": "/Info.txt",
"type": "file"
}
]

The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).


Related articles: