File Management

Operations for uploading and managing project files

Upload files to a project

post

Uploads one or more files to be associated with a project for research purposes

Authorizations
Body
projectIdstring · uuidRequired

ID of the project to upload files to

filesstring · binary[]Required

Files to upload

Responses
200
Files uploaded successfully
application/json
post
POST /api/uploadProjectFiles HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: multipart/form-data
Accept: */*
Content-Length: 71

{
  "projectId": "123e4567-e89b-12d3-a456-426614174000",
  "files": [
    "binary"
  ]
}
{
  "message": "Files uploaded successfully",
  "files": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "file_name": "text",
      "file_size": 1,
      "file_type": "text"
    }
  ]
}

Get files associated with a project

get

Retrieves a list of all files uploaded to a specific project

Authorizations
Query parameters
projectIdstring · uuidRequired

ID of the project to get files for

Responses
200
Project files retrieved successfully
application/json
get
GET /api/getProjectFiles?projectId=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "project_id": "123e4567-e89b-12d3-a456-426614174000",
    "file_name": "research_paper.pdf",
    "file_size": 1048576,
    "file_type": "application/pdf",
    "storage_path": "text",
    "created_at": "2025-07-17T11:10:41.492Z",
    "updated_at": "2025-07-17T11:10:41.492Z"
  }
]

Delete a project file

delete

Removes a file from a project and deletes it from storage

Authorizations
Query parameters
fileIdstring · uuidRequired

ID of the file to delete

Responses
200
File deleted successfully
application/json
delete
DELETE /api/deleteProjectFile?fileId=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
{
  "message": "File deleted successfully"
}