π₯²Incubated Project API
How to use the Incubated project API
Project API Documentation
Introduction
This document describes the API routes for managing project data. The API supports creating, modifying, deleting, and retrieving project information. Authentication is required for creating, modifying, and deleting projects, while retrieving project information is accessible without authentication.
Base URL
The base URL for all endpoints is: https://paal-ecosystem-backend.onrender.com
Routes
Create a New Project
URL:
/project/newMethod:
POSTAuthentication Required: Yes
Request Parameters:
name: Name of the project (required)about: Description of the project (required)growth: Growth metrics of the project (optional)file: Image file representing the project (optional)
Request Example:
{ "name": "Project Alpha", "about": "This project focuses on AI development.", "growth": 20 }Response:
Success:
{ "status": true, "id": "generated-project-id" }Failure:
Missing parameters:
{ "status": false, "error": "Missing parameters" }File too large:
{ "status": false, "error": "File too large", "MAX_SIZE": 1048576 }Wrong file type:
{ "status": false, "error": "Wrong file type", "expecting": "image", "sent": "file/type" }Internal server error:
{ "status": false, "error": "Internal server error" }
Modify Project Data
URL:
/project/saveMethod:
POSTAuthentication Required: Yes
Request Parameters:
projectId: ID of the project to be modified (required)name: New name of the project (optional)about: New description of the project (optional)growth: Updated growth metrics (optional)file: New image file representing the project (optional)
Request Example:
Response:
Success:
Failure:
Missing parameters:
{ "status": false, "error": "Missing parameters", "params": "projectId" }No modifiable fields:
{ "status": false, "error": "No modifiable fields" }Project does not exist:
{ "status": false, "error": "Project does not exist" }File too large:
{ "status": false, "error": "File too large", "MAX_SIZE": 1048576 }Internal server error:
{ "status": false, "error": "Internal server error" }
Delete Project Data
URL:
/project/deleteMethod:
POSTAuthentication Required: Yes
Request Parameters:
projectId: ID of the project to be deleted (required)
Request Example:
Response:
Success:
{ "status": true }Failure:
Missing parameters:
{ "status": false, "error": "Missing parameters", "expecting": "projectId" }Project does not exist:
{ "status": false, "error": "Project does not exist" }
Retrieve Project Data
URL:
/projectMethod:
GETAuthentication Required: No
Request Parameters:
projectId: ID of the project to be retrieved (required)
Request Example:
Response:
Success:
Failure:
Missing parameters:
{ "status": false, "error": "Missing parameters", "expecting": "projectId" }Project does not exist:
{ "status": false, "error": "Project does not exist" }
Retrieve All Projects
URL:
/project/allMethod:
GETAuthentication Required: No
Request Parameters
sort: Optional. Sort order of the results. Can beasc(ascending) ordesc(descending). Default isasc.num: Required. Number of projects to retrieve. Can beallto retrieve all projects or a specific number.
Request Example
Example Request Using cURL
Response
Success Response
Status:
200 OKBody:
Failure Response
Status:
400 Bad RequestBody (Missing
numparameter):
Search Projects
URL:
/project/searchMethod:
GETAuthentication Required: No
Request Parameters
sort(optional): Sort order of the results. Can beasc(ascending) ordesc(descending). Default isasc.num(optional): Number of projects to retrieve. Can beallto retrieve all projects or a specific number.key(required): The field to search within the projects.value(required): The value to search for in the specified field.
Request Example
Example Request Using cURL
Response
The response will include an array of project data objects matching the search criteria, or an empty array if no projects match the search.
Each project data object contains the following fields:
projectId: ID of the project.name: Name of the project.about: Description or details about the project.file: URL or path to project file.growth: Growth indicator of the project.date: Date of the project.roi: Return on investment value.data: Additional data related to the project.
Example Response
Error Responses
If required parameters (
keyandvalue) are missing:If no projects match the search criteria:
Last updated