Skip to content

API: File hosting

List of all uploaded files

Request

GET /api/v1/files HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Upload a file

This will overwrite previously existing file with same filename

Request

1
2
3
4
5
POST /api/v1/files HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
Content-Type: multipart/form-data; boundary=boundary

{FILE BEING UPLOADED IN MULTIPART}

Example

POST /api/v1/files HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
Content-Type: multipart/form-data; boundary=boundary

--boundary
Content-Disposition: form-data; name="file"; filename="some/directory/input.txt"

Hello world!

--boundary

Download file

Request

GET /api/v1/files/{UPLOADED_FILE_PATH} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Example

GET /api/v1/files/some/directory/input.txt HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Delete file

Request

DELETE /api/v1/files/{UPLOADED_FILE_PATH} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Example

DELETE /api/v1/files/some/directory/input.txt HTTP/1.1
Authorization: Bearer {JWT_TOKEN}