Documentation Index Fetch the complete documentation index at: https://docs.labtrace.io/llms.txt
Use this file to discover all available pages before exploring further.
Projects
Projects are the main organizational units in LabTrace. They contain files, have members with different roles, and can be configured with time restrictions and access controls.
Project Management
Create Project
POST /projects Create a new project
Request Body
{
"name" : "Research Project 2024" ,
"leader" : "John Doe" ,
"area" : "Biomedical Research" ,
"organisation" : "Research Institute" ,
"location" : "New York" ,
"tags" : [ "research" , "data" , "analysis" ],
"maxNumberOfMembers" : "10" ,
"organisationScope" : "Public" ,
"leaderScope" : "Full Access" ,
"startDate" : "2024-01-01T00:00:00Z" ,
"endDate" : "2024-12-31T23:59:59Z" ,
"members" : [ "user-uuid-1" , "user-uuid-2" ]
}
Response
{
"responseMessage" : "Project created successfully"
}
Example
curl -X POST https://api.labtrace.io/projects \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Research Project 2024",
"leader": "John Doe",
"area": "Biomedical Research",
"organisation": "Research Institute",
"location": "New York",
"tags": ["research", "data"],
"maxNumberOfMembers": "10",
"startDate": "2024-01-01T00:00:00Z",
"endDate": "2024-12-31T23:59:59Z",
"members": []
}'
Get All Projects
GET /projects Get all projects accessible to the authenticated user
Response
{
"records" : [
{
"id" : "project-uuid" ,
"name" : "Research Project 2024" ,
"area" : "Biomedical Research" ,
"organisation" : "Research Institute" ,
"location" : "New York" ,
"tags" : [ "research" , "data" ],
"leaderId" : "user-uuid" ,
"leaderFirstName" : "John" ,
"leaderLastName" : "Doe" ,
"maxNumberOfMembers" : 10 ,
"organisationScope" : 1 ,
"leaderScope" : 1 ,
"startDate" : "2024-01-01T00:00:00Z" ,
"endDate" : "2024-12-31T23:59:59Z" ,
"members" : {
"records" : [
{
"id" : "user-uuid" ,
"name" : "John" ,
"lastName" : "Doe" ,
"email" : "john.doe@example.com" ,
"status" : "Active"
}
],
"start" : 0 ,
"limit" : 50 ,
"totalRecords" : 1
}
}
],
"start" : 0 ,
"limit" : 50 ,
"totalRecords" : 1
}
Get Project by ID
GET /projects/{projectId} Get detailed information about a specific project
Parameters
projectId (path): Project ID
Response
{
"id" : "project-uuid" ,
"name" : "Research Project 2024" ,
"area" : "Biomedical Research" ,
"organisation" : "Research Institute" ,
"location" : "New York" ,
"tags" : [ "research" , "data" ],
"leaderId" : "user-uuid" ,
"leaderFirstName" : "John" ,
"leaderLastName" : "Doe" ,
"maxNumberOfMembers" : 10 ,
"organisationScope" : 1 ,
"leaderScope" : 1 ,
"startDate" : "2024-01-01T00:00:00Z" ,
"endDate" : "2024-12-31T23:59:59Z" ,
"members" : {
"records" : [
{
"id" : "user-uuid" ,
"name" : "John" ,
"lastName" : "Doe" ,
"email" : "john.doe@example.com" ,
"status" : "Active"
}
],
"start" : 0 ,
"limit" : 50 ,
"totalRecords" : 1
}
}
Update Project
PATCH /projects/{projectId} Update project information
Parameters
projectId (path): Project ID
Request Body
{
"name" : "Updated Research Project" ,
"area" : "Medical Research" ,
"organisation" : "New Research Institute" ,
"location" : "Boston" ,
"tags" : [ "research" , "medical" , "data" ],
"maxNumberOfMembers" : 15 ,
"organisationScope" : "Private" ,
"leaderScope" : "Limited Access" ,
"startDate" : "2024-02-01T00:00:00Z" ,
"endDate" : "2024-11-30T23:59:59Z"
}
Response
{
"responseMessage" : "Project updated successfully"
}
Project Members
Add Project Member
POST /projects/{projectId}/members/{userId} Add a user to a project
Parameters
projectId (path): Project ID
userId (path): User ID to add to the project
Response
{
"responseMessage" : "Member has been successfully added."
}
Remove Project Member
DELETE /projects/{projectId}/members/{userId} Remove a user from a project
Parameters
projectId (path): Project ID
userId (path): User ID to remove from the project
Response
{
"responseMessage" : "Member has been successfully removed."
}
Activate Project Member
POST /projects/{projectId}/members/{userId}/activate Activate a project member (accept invitation)
Parameters
projectId (path): Project ID
userId (path): User ID to activate
Response
{
"responseMessage" : "Member has been successfully activated."
}
Get On-Hold Project Members
GET /projects/{projectId}/members/on-hold Get all members who have pending invitations
Parameters
projectId (path): Project ID
Response
{
"records" : [
{
"id" : "user-uuid" ,
"name" : "Jane" ,
"lastname" : "Smith" ,
"email" : "jane.smith@example.com" ,
"status" : "On-hold"
}
],
"start" : 0 ,
"limit" : 50 ,
"totalRecords" : 1
}
Project Validation
Check Project Creation Permission
GET /users/{userId}/can-create-project Check if a user can create a new project
Parameters
Response
{
"info" : {
"statusCode" : 200 ,
"responseMessage" : "User can create project"
}
}
Check Member Invitation Permission
GET /users/{userId}/can-invite-member Check if a user can invite members to projects
Parameters
Response
{
"info" : {
"statusCode" : 200 ,
"responseMessage" : "User can invite members"
}
}
Member Status
Projects support the following member statuses:
Active : Member has full access to the project
On-hold : Member has a pending invitation
Project Scopes
Projects can be configured with different scope levels:
Organisation Scope : Controls visibility within the organization
Leader Scope : Controls project leader permissions
Error Responses
400 Bad Request
{
"error" : {
"statusCode" : 400 ,
"message" : "Invalid request parameters"
}
}
401 Unauthorized
{
"error" : {
"statusCode" : 401 ,
"message" : "Authentication required"
}
}
403 Forbidden
{
"error" : {
"statusCode" : 403 ,
"message" : "Insufficient permissions"
}
}
404 Not Found
{
"error" : {
"statusCode" : 404 ,
"message" : "Project not found"
}
}