All API endpoints require authentication using a bearer token. To authenticate,
include the token in the Authorization
header of your requests.
Bearer 6a29aaeec90a5a24abc879d0bb26f2ce656bf2...
Returns a 204 No Content
response if the provided token is valid.
A bucket is a top-level directory that contains objects.
Returns a list of all buckets.
Creates a new bucket with the specified name.
Deletes the bucket with the specified name.
An object is a file or directory within a bucket.
Returns a list of all objects in the specified bucket. You can optionally
provide a path
query parameter to list objects within a subdirectory.
Returns the contents of the specified object. If the object is a file, the
contents are returned as a stream. If the object is a directory, a 404 Not Found
response is returned.
Deletes the specified object.
Creates or updates the specified object. The request body should contain the contents of the object. If the object already exists, it will be overwritten.
Creates a shareable link for an object.
Downloads the file associated with the specified shareable link.
The API returns the following error codes:
400 Bad Request
: The request is invalid.401 Unauthorized
: The provided token is invalid or missing.403 Forbidden
: The requested operation is not allowed.404 Not Found
: The requested resource does not exist.409 Conflict
: The requested operation conflicts with an existing resource.500 Internal Server Error
: An unexpected error occurred on the server.
To run the API locally, run the following command:
npm start
The API will listen on port 12543
by default.
To run with CORS enabled for a domain, run:
npm start -- --cors http://example.com
This project is licensed under the MIT License. See the LICENSE
file for
details.