Welcome to the boeken.uk API documentation. This page provides details on how to use the API for uploading and downloading files.
All API requests require Basic Authentication. Use your username and password to authenticate.
Username: your_username Password: your_password
To upload a file, send a POST
request to the following endpoint:
POST /api/upload
Include the file in the request body as form data.
Example using curl:
curl -X POST -u username:password -F "file=@/path/to/your/file.txt" https://boeken.uk/api/upload
To download a file, send a GET
request to the following endpoint:
GET /api/download/<filename>
Replace <filename>
with the name of the file you want to download.
Example using curl:
curl -X GET -u username:password https://boeken.uk/api/download/filename.txt --output downloaded_file.txt
Successful API responses are returned in JSON
format. For example:
{ "message": "File uploaded successfully.", "filename": "file.txt", "key": "550e8400-e29b-41d4-a716-446655440000" }
If an error occurs, the API will return an appropriate HTTP status code and a message. For example:
{ "error": "Invalid username or password." }
To ensure fair usage, the API enforces rate limits. If you exceed the limit, you will receive a 429 Too Many Requests
response.
If you encounter any issues or have questions, please contact us at [email protected].