Project Controller
The ProjectController
manages the projects and their associated actions. It is located at:
backend_dotnet\Controllers\ProjectController.cs
Routes
Get all projects:
- GET /Project/Get/All
Retrieves all projects.
- Query Parameters:
withHex (bool) – Optional query parameter to include hexadecimal values.
- Response JSON Object:
response (obj) – The service response object containing a list of projects.
Get project by ID:
- GET /Project/Get/{id:int}
Retrieves a project by its ID.
- Parameters:
id (int) – The project ID.
- Response JSON Object:
response (obj) – The service response object containing the project details.
Update project:
- PUT /Project/Update
Updates an existing project.
- Request JSON Object:
project (obj) – The project data to be updated.
- Response JSON Object:
response (obj) – The service response object.
Delete project:
- DELETE /Project/Delete/{id}
Deletes a project by its ID.
- Parameters:
id (int) – The project ID.
- Response JSON Object:
response (obj) – The service response object.
Add project:
- POST /Project/Add
Adds a new project.
- Request JSON Object:
project (obj) – The project data to be added.
- Response JSON Object:
response (obj) – The service response object.
Rate project:
- PUT /Project/Rate/{id:int}/{rating}
Rates a project.
- Parameters:
id (int) – The project ID.
rating (double) – The rating value.
- Response JSON Object:
response (obj) – The service response object.
Get projects by status:
- GET /Project/GetByStatus/{status}
Retrieves projects by their status.
- Parameters:
status (string) – The project status.
- Response JSON Object:
response (obj) – The service response object containing a list of projects.
Change project status:
- PUT /Project/ChangeStatus/{id:int}
Changes the status of a project.
- Parameters:
id (int) – The project ID.
- Response JSON Object:
response (obj) – The service response object.
Update project markdown:
- PUT /Project/UpdateMarkDown/{id:int}/{markdown}
Updates a project’s markdown.
- Parameters:
id (int) – The project ID.
markdown (string) – The updated markdown content.
- Response JSON Object:
response (obj) – The service response object.
Get all permissioned projects:
- GET /Project/GetAllPermissioned/{withHex}
Retrieves all permissioned projects.
- Query Parameters:
withHex (bool) – Optional query parameter to include hexadecimal values.
- Response JSON Object:
response (obj) – The service response object containing a list of projects.
Get all invitations:
- GET /Project/GetAllInvitations
Retrieves all project invitations.
- Response JSON Object:
response (obj) – The service response object containing a list of invitations.
Get top N rated projects:
- GET /Project/GetProjects/{numberOfProjects:int}
Retrieves the top N rated projects.
- Parameters:
numberOfProjects (int) – The number of projects to retrieve.
- Response JSON Object:
response (obj) – The service response object containing a list of projects.
Get all project file hashes:
- GET /Project/GetAllHashes/{areOnlyAuctionsStarted}
Retrieves all project file hashes.
- Query Parameters:
areOnlyAuctionsStarted (bool) – Optional query parameter to filter projects with auctions started.
- Response JSON Object:
response (obj) – The service response object containing a list of project file hashes.
Reply to project preview:
- PUT /Project/ViewerReply/{id:int}/{reply}
Submits a reply to a project preview.
- Parameters:
id (int) – The project ID.
reply (bool) – The viewer’s reply (true or false).
- Response JSON Object:
response (obj) – The service response object.