112 lines
4.5 KiB
YAML
112 lines
4.5 KiB
YAML
# Entrepreneur API Endpoints
|
|
paths:
|
|
/entrepreneur/projects/request:
|
|
post:
|
|
operationId: requestProjectCreation
|
|
summary: Request creation and validation of a new project
|
|
tags:
|
|
- Entrepreneurs API
|
|
description: |-
|
|
Submits a request for a new project. The project details are provided in the request body.
|
|
The requesting entrepreneur (identified by the token) will be associated to it.
|
|
The project is created with a 'pending' status, awaiting admin approval.
|
|
security:
|
|
- MyINPulse: [MyINPulse-entrepreneur]
|
|
requestBody:
|
|
required: true
|
|
description: Project details for the request. `status`, `creationDate` are required by the model when being sent but is ignored by the server;
|
|
primarily expects a valid `projectId`, `name`, `logo`.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "./main.yaml#/components/schemas/project"
|
|
responses:
|
|
"202":
|
|
description: Accepted - Project creation request received and is pending validation.
|
|
"400":
|
|
description: Bad Request - Invalid input (e.g., missing name).
|
|
"401":
|
|
description: Unauthorized.
|
|
|
|
/entrepreneur/sectionCells: # Base path
|
|
post:
|
|
operationId: addSectionCell
|
|
summary: Add a cell to a Lean Canvas section
|
|
description: Adds a new cell (like a sticky note) with the provided content to a specific section of the entrepreneur's project's Lean Canvas. Assumes project context is known based on user's token.
|
|
`idSectionCell` and `modificationDate` are server-generated so they're values in the request are ignored by the server.
|
|
tags:
|
|
- Entrepreneurs API
|
|
security:
|
|
- MyINPulse: [MyINPulse-entrepreneur]
|
|
requestBody:
|
|
required: true
|
|
description: Section cell details. `idSectionCell` and `modificationDate` will be ignored if sent.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "./main.yaml#/components/schemas/sectionCell"
|
|
responses:
|
|
"201":
|
|
description: Created - Section cell added successfully. Returns the created cell.
|
|
"400":
|
|
description: Bad Request - Invalid input (e.g., missing content or sectionId).
|
|
"401":
|
|
description: Unauthorized.
|
|
|
|
/entrepreneur/sectionCells/{sectionCellId}:
|
|
put:
|
|
operationId: modifySectionCell
|
|
summary: Modify data in a Lean Canvas section cell
|
|
description: Updates the content of an existing Lean Canvas section cell specified by `sectionCellId`. The server "updates" (it keeps a record of the previous version to keep a history of all the sectionCells and creates a new ones with the specified modifications) the `modificationDate`.
|
|
tags:
|
|
- Entrepreneurs API
|
|
security:
|
|
- MyINPulse: [MyINPulse-entrepreneur]
|
|
parameters:
|
|
- in: path
|
|
name: sectionCellId
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
description: The ID of the section cell to modify.
|
|
example: 508
|
|
requestBody:
|
|
required: true
|
|
description: Updated section cell details. `sectionCellId` "the path parameter" is the only id that's consideredn the `sectionCellId` id in the request body is ignored. `modificationDate` should be updated by the server.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "./main.yaml#/components/schemas/sectionCell"
|
|
responses:
|
|
"200":
|
|
description: OK - Section cell updated successfully. Returns the updated cell.
|
|
"404":
|
|
description: Bad Request - Invalid input or ID mismatch.
|
|
"401":
|
|
description: Unauthorized.
|
|
|
|
delete:
|
|
operationId: removeSectionCell
|
|
summary: Remove a Lean Canvas section cell
|
|
description: Deletes the Lean Canvas section cell specified by `sectionCellId`.
|
|
tags:
|
|
- Entrepreneurs API
|
|
security:
|
|
- MyINPulse: [MyINPulse-entrepreneur]
|
|
parameters:
|
|
- in: path
|
|
name: sectionCellId
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
description: The ID of the section cell to remove.
|
|
example: 509
|
|
responses:
|
|
"204":
|
|
description: No Content - Section cell removed successfully.
|
|
"400":
|
|
description: Bad Request - Invalid ID format.
|
|
"404":
|
|
description: Bad Request - sectionCell not found.
|
|
"401":
|
|
description: Unauthorized. |