Skip to main content

GET /files/{id}

Description

Gets files data from a specified folder and returns a JSON array with this data

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

Parameters

The following path parameters are sent in the request line:

  • id (string) - (required) a path to the folder for which files data is requested

Payload

No payload is required.

Response

The server returns a JSON 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: