https://innobyte-backend2.onrender.com/api
- Endpoint:
project/create-project
- Method:
POST
- Description: Create a new project.
- Request:
- Body:
{ "name": "string", "description": "string", "fields": ["string"] }
- Body:
- Response:
- Status Code: 200 OK
- Body:
{ "message": "project created successfully" }
- Endpoint:
/project/delete-project/:projectID
- Method:
DELETE
- Description: Delete a specific project.
- Parameters:
projectID
: ID of the project.
- Response:
- Status Code: 200 OK
- Body:
{ "message": "project deleted successfully" }
- Endpoint:
/projects/get-project/:projectID
- Method:
GET
- Description: Get details of a specific project.
- Parameters:
projectID
: ID of the project.
- Response:
- Status Code: 200 OK
- Body:
{ "name": "string", "description": "string", "fields": ["string"], "owner": "string" }
- Endpoint:
/project/get-projects
- Method:
GET
- Description: Get a list of projects for the authenticated user.
- Response:
- Status Code: 200 OK
- Body: Array of Project objects
- Endpoint:
/projects/toggle-apply
- Method:
POST
- Description: Apply or unapply for a project.
- Request:
- Body:
{ "projectID": "string", "motivation": "string" }
- Body:
- Response:
- Status Code: 200 OK
- Body:
{ "message": "applied successfully" }
- Endpoint:
project/apply-decision/:applyID
- Method:
PUT
- Description: Accept or reject an apply for a project.
- Parameters:
applyID
: ID of the apply.
- Request:
- Body:
{ "decision": "string" // 'accepted' or 'rejected' }
- Body:
- Response:
- Status Code: 200 OK
- Body:
{ "message": "this apply has been accepted" // or "rejected" }
- Endpoint:
task/create-task
- Method:
POST
- Description: Create a new task.
- Request:
- Body:
{ "name": "string", "projectID": "string", "description": "string", "endsin": "string (date)" }
- Body:
- Response:
- Status Code: 200 OK
- Body:
{ "message": "task created successfully" }
- Endpoint:
task/delete-task/:taskID
- Method:
DELETE
- Description: Delete a specific task.
- Parameters:
taskID
: ID of the task.
- Response:
- Status Code: 200 OK
- Body:
{ "message": "task deleted." }
- Endpoint:
task/add-submission/:taskID
- Method:
POST
- Description: Add a submission to a task.
- Parameters:
taskID
: ID of the task.
- Request:
- Body:
{ "submittion": "string", }
- Body:
- Response:
- Status Code: 201 Created
- Body:
{ "message": "your submission has been successfully uploaded" }
- Endpoint:
task/evaluate-submission/:submittionID
- Method:
PUT
- Description: Evaluate a submission (accept or reject).
- Parameters:
submittionID
: ID of the submission.
- Request:
- Body:
{ "decision": "string (accepted or rejected)", "feedback": "string" }
- Body:
- Response:
- Status Code: 200 OK
- Body:
{ "message": "this submission has been accepted" // or "rejected" }
- Endpoint:
task/get-submission/:submittionID
- Method:
GET
- Description: Get details of a specific submission.
- Parameters:
submittionID
: ID of the submission.
- Response:
- Status Code: 200 OK
- Body:
{ // Submission details }
- Endpoint:
user/signup
- Method:
POST
- Description: Register a new user.
- Request:
- Body:
{ "email": "string", "fullname": "string", "password": "string", "job": "string" }
- Body:
- Response:
- Status Code: 201 Created
- Body:
{ "message": "signup successfuly" }
- Endpoint:
user/signin
- Method:
POST
- Description: Sign in an existing user.
- Request:
- Body:
{ "email": "string", "password": "string" }
- Body:
- Response:
- Status Code: 200 OK
- Body:
{ "message": "signin successfuly" }
- Endpoint:
user/signout
- Method:
GET
- Description: Sign out the currently authenticated user.
- Response:
- Status Code: 200 OK
- Body:
{ "message": "successfuly logged out" }
- Endpoint:
user/getuser
- Method:
GET
- Description: Get details of the currently authenticated user.
- Response:
- Status Code: 200 OK
- Body:
{ "user": { // User details (excluding password) } }
- Note: Requires authentication. The user's password is not included in the response.
- Endpoint:
message/insert-message/:projectID
- Method:
GET
- Description: Get messages for a specific project room.
- Parameters:
projectID
: ID of the project.
- Response:
- Status Code: 200 OK
- Body: Array of message objects
[ { "project": "string", "sender": { // Sender details }, "content": "string", "createdAt": "string (timestamp)" }, // Additional messages... ]
- Endpoint:
/message/:roomID
- Method:
POST
- Description: Insert a new message into a project room.
- Request:
- Body:
{ "message": "string", "projectID": "string" }
- Body:
- Response:
- Status Code: 201 Created
- Body:
{ "message": "message sent" }
- Endpoint:
/message/:messageID/delete
- Method:
DELETE
- Description: Delete a specific message.
- Parameters:
messageID
: ID of the message.
- Response:
- Status Code: 200 OK
- Body:
{ "message": "message deleted" }
- Note: Only the sender of the message can delete it.
-
400 Bad Request:
- Invalid request format.
- Missing required fields.
- Project already exists.
- Invalid decision in applyDecision.
-
403 Forbidden:
- User does not have access to change apply status.
-
404 Not Found:
- Project or apply not found.
-
500 Internal Server Error:
- Server-side error.
- The API requires authentication using user sessions or tokens. Include the authentication token in the headers of each request.
- Requests are limited to 1000 per hour per IP address.
- Responses are in JSON format.