List Endpoint
Introduction
The GET /list endpoint allows you to list all files you have uploaded to the server. This guide provides detailed instructions on how to use the list endpoint, including required headers, response format, and example requests.
Endpoint
GET /list
Request Headers
x-auth-name: Your customer name.x-auth-password: Your customer password.
Response
200 OK: Returns a list of filenames if the request is successful.400 Bad Request: If authentication fails or no files are found.
Example Requests
Using curl
Listing Files
curl -X GET http://yourserver.com/list \
-H "x-auth-name: yourname" \
-H "x-auth-password: yourpassword"
Example Response
Successful Response
If files are found, the API will return a list of filenames in JSON format.
["file1.txt", "file2.txt", "image.png"]
Error Response
If the request is malformed or authentication fails, the API will return an error message with a 400 Bad Request status.
Example Error Response
If no files are found:
{
"statusCode": 400,
"error": "Bad Request",
"message": "No files uploaded yet"
}