186 lines
6.3 KiB
YAML

# Shared API Endpoints
paths:
/shared/projects/sectionCells/{projectId}/{sectionId}/{date}:
get:
operationId: getSectionCellsByDate
summary: Get project section cells modified on a specific date
tags:
- Shared API
security:
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
description: Retrieves section cells belonging to a specific section of a project, filtered by the last modification date. Requires user to have access to the project.
parameters:
- in: path
name: projectId
required: true
schema: { type: integer }
description: ID of the project.
- in: path
name: sectionId
required: true
schema: { type: integer }
description: ID of the Lean Canvas section.
- in: path
name: date
required: true
schema: { type: string, format: date } # Expect YYYY-MM-DD
description: The modification date to filter by (YYYY-MM-DD HH:mm).
responses:
"200":
description: OK - List of section cells matching the criteria.
content:
application/json:
schema:
type: array
items:
$ref: "./main.yaml#/components/schemas/sectionCell"
"400":
description: Bad Request - Invalid parameter format.
"401":
description: Unauthorized.
/shared/projects/entrepreneurs/{projectId}:
get:
operationId: getProjectEntrepreneurs
summary: Get entrepreneurs associated with a project
tags:
- Shared API
security:
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
description: Retrieves a list of entrepreneur users associated with the specified project. Requires access to the project.
parameters:
- in: path
name: projectId
required: true
schema: { type: integer }
description: ID of the project.
responses:
"200":
description: OK - List of entrepreneurs.
content:
application/json:
schema:
type: array
items:
$ref: "./main.yaml#/components/schemas/user-entrepreneur"
"401":
description: Unauthorized.
"403":
description: Forbidden - User does not have access to this project.
"404":
description: Not Found - Project not found.
/shared/projects/admin/{projectId}: # Path updated
get:
operationId: getProjectAdmin
summary: Get admin associated with a project
tags:
- Shared API
security:
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
description: Retrieves a list of admin users associated with the specified project. Requires access to the project.
parameters:
- in: path
name: projectId
required: true
schema: { type: integer }
description: ID of the project.
responses:
"200":
description: OK - admin.
content:
application/json:
schema:
$ref: "./main.yaml#/components/schemas/user-admin"
"401":
description: Unauthorized.
"403":
description: Forbidden - User does not have access to this project.
"404":
description: Not Found - Project not found.
/shared/projects/appointments/{projectId}:
get:
operationId: getProjectAppointments
summary: Get appointments related to a project
tags:
- Shared API
security:
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
description: Retrieves a list of appointments associated with the specified project. Requires access to the project.
parameters:
- in: path
name: projectId
required: true
schema: { type: integer }
description: ID of the project.
responses:
"200":
description: OK - List of appointments.
content:
application/json:
schema:
type: array
items:
$ref: "./main.yaml#/components/schemas/appointment"
"401":
description: Unauthorized.
/shared/appointments/report/{appointmentId}: # Path updated
get:
operationId: getAppointmentReport # Shared endpoint implies read-only access might be possible
summary: Get the report for an appointment
tags:
- Shared API
security:
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
description: Retrieves the report associated with a specific appointment. Requires user to have access to the appointment/project.
parameters:
- in: path
name: appointmentId
required: true
schema: { type: integer }
description: ID of the appointment.
responses:
"200":
description: OK - Report PDF returned.
content:
application/pdf:
schema:
schema:
type: string
format: binary
"401":
description: Unauthorized.
/shared/appointments/request:
post:
operationId: requestAppointment
summary: Request a new appointment
tags:
- Shared API
security:
- MyINPulse: [MyINPulse-entrepreneur, MyINPulse-admin]
description: Allows a user (entrepreneur or admin) to request a new appointment, potentially with another user or regarding a project. Details in the body. The request might need confirmation or create a pending appointment.
requestBody:
required: true
description: Details of the appointment request.
content:
application/json:
schema:
$ref: "./main.yaml#/components/schemas/appointment" # Assuming request uses same model structure
# Potentially add projectId or targetUserId here
responses:
"202": # Accepted seems appropriate for a request
description: Accepted - Appointment request submitted.
"400":
description: Bad Request - Invalid appointment details.
"401":
description: Unauthorized.