openapi: 3.0.0 info: title: Compliance Management API description: API documentation for Verifywise AI compliance management application version: 1.0.0 servers: - url: http://localhost:3000/api description: Local development server paths: /assessments: get: summary: Returns a list of all the assessments tags: [assessments] security: - JWTAuth: [] responses: "200": description: list of all assessments content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/Assessment" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: summary: On creating assessments and posting it tags: [assessments] security: - JWTAuth: [] requestBody: description: body of the new assessment content: application/json: schema: type: object properties: id: type: integer example: 1 projectId: type: integer example: 1 required: true responses: "201": description: new created assessment tracker content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/Assessment" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /assessments/{id}: get: tags: [assessments] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the assessment responses: "200": description: assessment content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/Assessment" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [assessments] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the assessment requestBody: description: body of the new assessment content: application/json: schema: type: object properties: id: type: integer example: 1 projectId: type: integer example: 1 required: true responses: "202": description: assessment content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/Assessment" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [assessments] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the assessment to delete responses: "202": description: assessment content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /assessments/getAnswers/{id}: get: tags: [assessments] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the assessment responses: "200": description: assessment content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/Assessment" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /assessments/project/byid/{id}: get: tags: [assessments] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project responses: "200": description: assessment by project id content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/Assessment" "404": description: assessment not found content: application/json: type: object properties: message: type: string example: not found "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /controls: get: tags: [controls] security: - JWTAuth: [] responses: "200": description: list of all controls content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/Control" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: tags: [controls] security: - JWTAuth: [] requestBody: description: body of the new control content: application/json: schema: type: object properties: projectId: type: integer example: 1 status: type: string example: "In Progress" approver: type: string example: "John Doe" riskReview: type: string example: "Acceptable risk" owner: type: string example: "Bob Johnson" reviewer: type: string example: "Alice Williams" dueDate: type: string format: date-time example: "2024-09-20T00:00:00.000Z" implementationDetails: type: string example: "Implement new feature" controlGroup: type: integer example: 1 required: true responses: "201": description: new created control content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/Control" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /controls/{id}: get: tags: [controls] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the control responses: "200": description: control content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/Control" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [controls] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the control requestBody: description: body of the new control content: application/json: schema: type: object properties: projectId: type: integer example: 1 status: type: string example: "In Progress" approver: type: string example: "John Doe" riskReview: type: string example: "Acceptable risk" owner: type: string example: "Bob Johnson" reviewer: type: string example: "Alice Williams" dueDate: type: string format: date-time example: "2024-09-20T00:00:00.000Z" implementationDetails: type: string example: "Implement new feature" controlGroup: type: integer example: 1 required: true responses: "202": description: control content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/Control" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [controls] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the control to delete responses: "202": description: control content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /projects: get: tags: [projects] security: - JWTAuth: [] responses: "200": description: list of all projects content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/Project" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: tags: [projects] security: - JWTAuth: [] requestBody: description: body of the new project content: application/json: schema: type: object properties: id: type: number example: 1 project_title: type: string example: "AI Compliance Checker" owner: type: integer example: 1 users: type: example: start_date: type: string format: date-time example: "2023-01-15T00:00:00.000Z" ai_risk_classification: anyOf: - type: string enum: - "high risk" - "limited risk" - "minimal risk" example: "high risk" type_of_high_risk_role: anyOf: - type: string enum: - "deployer" - "provider" - "distributor" - "importer" - "product manufacturer" - "authorized representative" example: "deployer" goal: type: string example: "To ensure compliance with AI governance standards" last_updated_by: type: integer example: 1 required: true responses: "201": description: new created project content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/Project" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /projects/{id}: get: tags: [projects] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project responses: "200": description: project content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/Project" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [projects] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project requestBody: description: body of the new project content: application/json: schema: type: object properties: id: type: number example: 1 project_title: type: string example: "AI Compliance Checker" owner: type: integer example: 1 users: type: example: start_date: type: string format: date-time example: "2023-01-15T00:00:00.000Z" ai_risk_classification: anyOf: - type: string enum: - "high risk" - "limited risk" - "minimal risk" example: "high risk" type_of_high_risk_role: anyOf: - type: string enum: - "deployer" - "provider" - "distributor" - "importer" - "product manufacturer" - "authorized representative" example: "deployer" goal: type: string example: "To ensure compliance with AI governance standards" last_updated: type: string format: date-time example: "2024-10-30T00:00:00.000Z" last_updated_by: type: integer example: 1 required: true responses: "202": description: project content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/Project" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [projects] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project to delete responses: "202": description: project content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /projects/calculateProjectRisks/{id}: get: tags: [projects] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project responses: "200": description: project content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: type: object properties: risk_level_autocalculated: type: string example: "High risk" count: type: string example: "1" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /projects/calculateVendorRisks/{id}: get: tags: [projects] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project responses: "200": description: project content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: type: object properties: risk_level: type: string example: "High risk" count: type: string example: "1" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /projectRisks: get: tags: [projectRisks] security: - JWTAuth: [] responses: "200": description: list of all project risks content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/ProjectRisk" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: tags: [projectRisks] security: - JWTAuth: [] requestBody: description: body of the new project risk content: application/json: schema: type: object properties: id: type: integer example: 1 project_id: type: integer example: 1 risk_name: type: string example: "Data Privacy Compliance" risk_owner: type: string example: "Alice" ai_lifecycle_phase: type: string example: "Deployment" risk_description: type: string example: "Risk of non-compliance with data privacy regulations." risk_category: type: string example: "Regulatory" impact: type: string example: "High" assessment_mapping: type: string example: "GDPR Compliance Check" controls_mapping: type: string example: "Data Access Controls" likelihood: type: string example: "Moderate" severity: type: string example: "High" risk_level_autocalculated: anyOf: - type: string enum: - "No risk" - "Low risk" - "Medium risk" - "High risk" - "Very high risk" example: "No risk" review_notes: type: string example: "Need for regular audits." mitigation_status: type: string example: "In Progress" current_risk_level: type: string example: "Medium" deadline: type: string format: date-time example: "2024-12-31T00:00:00.000Z" mitigation_plan: type: string example: "Implement data anonymization." implementation_strategy: type: string example: "Anonymize user data in production environments." mitigation_evidence_document: type: string example: "Data_Anonymization_Plan.pdf" likelihood_mitigation: type: string example: "Reduced" risk_severity: type: string example: "Moderate" final_risk_level: type: string example: "Low" risk_approval: type: string example: "Pending" approval_status: type: string example: "Under Review" date_of_assessment: type: string format: date-time example: "2024-11-01T00:00:00.000Z" required: true responses: "201": description: new created project risk content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/ProjectRisk" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /projectRisks/{id}: get: tags: [projectRisks] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project risk responses: "200": description: project risk content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/ProjectRisk" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [projectRisks] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project risk requestBody: description: body of the new project risk content: application/json: schema: type: object properties: id: type: integer example: 1 project_id: type: integer example: 1 risk_name: type: string example: "Data Privacy Compliance" risk_owner: type: string example: "Alice" ai_lifecycle_phase: type: string example: "Deployment" risk_description: type: string example: "Risk of non-compliance with data privacy regulations." risk_category: type: string example: "Regulatory" impact: type: string example: "High" assessment_mapping: type: string example: "GDPR Compliance Check" controls_mapping: type: string example: "Data Access Controls" likelihood: type: string example: "Moderate" severity: type: string example: "High" risk_level_autocalculated: anyOf: - type: string enum: - "No risk" - "Low risk" - "Medium risk" - "High risk" - "Very high risk" example: "No risk" review_notes: type: string example: "Need for regular audits." mitigation_status: type: string example: "In Progress" current_risk_level: type: string example: "Medium" deadline: type: string format: date-time example: "2024-12-31T00:00:00.000Z" mitigation_plan: type: string example: "Implement data anonymization." implementation_strategy: type: string example: "Anonymize user data in production environments." mitigation_evidence_document: type: string example: "Data_Anonymization_Plan.pdf" likelihood_mitigation: type: string example: "Reduced" risk_severity: type: string example: "Moderate" final_risk_level: type: string example: "Low" risk_approval: type: string example: "Pending" approval_status: type: string example: "Under Review" date_of_assessment: type: string format: date-time example: "2024-11-01T00:00:00.000Z" required: true responses: "202": description: project risk content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/ProjectRisk" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [projectRisks] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project risk to delete responses: "202": description: project risk content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /projectScopes: get: tags: [projectScopes] security: - JWTAuth: [] responses: "200": description: list of all project scopes content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/ProjectScope" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: tags: [projectScopes] security: - JWTAuth: [] requestBody: description: body of the new project scope content: application/json: schema: type: object properties: id: type: integer example: 1 assessmentId: type: integer example: 1 describeAiEnvironment: type: string example: "This project involves the development of a new AI-powered virtual assistant." isNewAiTechnology: type: boolean example: true usesPersonalData: type: boolean example: true projectScopeDocuments: type: string example: "project-scope-v1.pdf" technologyType: type: string example: "Natural Language Processing" hasOngoingMonitoring: type: boolean example: true unintendedOutcomes: type: string example: "Potential bias in the assistant's responses." technologyDocumentation: type: string example: "technology-documentation.docx" required: true responses: "201": description: new created project scope content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/ProjectScope" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /projectScopes/{id}: get: tags: [projectScopes] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project scope responses: "200": description: project scope content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/ProjectScope" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [projectScopes] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project scope requestBody: description: body of the new project scope content: application/json: schema: type: object properties: id: type: integer example: 1 assessmentId: type: integer example: 1 describeAiEnvironment: type: string example: "This project involves the development of a new AI-powered virtual assistant." isNewAiTechnology: type: boolean example: true usesPersonalData: type: boolean example: true projectScopeDocuments: type: string example: "project-scope-v1.pdf" technologyType: type: string example: "Natural Language Processing" hasOngoingMonitoring: type: boolean example: true unintendedOutcomes: type: string example: "Potential bias in the assistant's responses." technologyDocumentation: type: string example: "technology-documentation.docx" required: true responses: "202": description: project scope content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/ProjectScope" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [projectScopes] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the project scope to delete responses: "202": description: project scope content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /questions: get: tags: [questions] security: - JWTAuth: [] responses: "200": description: list of all questions content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/Question" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: tags: [questions] security: - JWTAuth: [] requestBody: description: body of the new question content: application/json: schema: type: object properties: id: type: number example: 1 subtopicId: type: number example: 1 questionText: type: string example: "What is the purpose of this feature?" answerType: type: string example: "Multiple Choice" evidenceFileRequired: type: boolean example: false hint: type: string example: "As a deployer, you are responsible for any additional changes made to the high-risk AI system and must fulfill additional requirements based on the data used and the specific use case you are deploying." isRequired: type: boolean example: true priorityLevel: anyOf: - type: string enum: - "high priority" - "medium priority" - "low priority" example: "high priority" evidenceFiles: type: array items: type: object properties: id: type: number filename: type: string required: true responses: "201": description: new created question content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/Question" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /questions/{id}: get: tags: [questions] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the question responses: "200": description: question content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/Question" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [questions] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the question requestBody: description: body of the new question content: application/json: schema: type: object properties: id: type: number example: 1 subtopicId: type: number example: 1 questionText: type: string example: "What is the purpose of this feature?" answerType: type: string example: "Multiple Choice" evidenceFileRequired: type: boolean example: false hint: type: string example: "As a deployer, you are responsible for any additional changes made to the high-risk AI system and must fulfill additional requirements based on the data used and the specific use case you are deploying." isRequired: type: boolean example: true priorityLevel: anyOf: - type: string enum: - "high priority" - "medium priority" - "low priority" example: "high priority" evidenceFiles: type: array items: type: object properties: id: type: number filename: type: string required: true responses: "202": description: question content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/Question" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [questions] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the question to delete responses: "202": description: question content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /subcontrols: get: tags: [subcontrols] security: - JWTAuth: [] responses: "200": description: list of all sub controls content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/SubControl" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: tags: [subcontrols] security: - JWTAuth: [] requestBody: description: body of the new sub control content: application/json: schema: type: object properties: controlId: type: number example: 1 status: anyOf: - type: string enum: - "Waiting" - "In progress" - "Done" example: "In Progress" approver: type: string example: "John Doe" riskReview: anyOf: - type: string enum: - "Acceptable risk" - "Residual risk" - "Unacceptable risk" example: "Acceptable risk" owner: type: string example: "Bob Johnson" reviewer: type: string example: "Alice Williams" dueDate: type: Date example: "2023-12-31T00:00:00.000Z" implementationDetails: type: string example: "Implement new feature" evidence: type: string example: "evidence1.pdf" attachment: type: string example: "attachment1.docx" feedback: type: string example: "Great work so far." required: true responses: "201": description: new created sub control content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/SubControl" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /subcontrols/{id}: get: tags: [subcontrols] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the sub control responses: "200": description: sub control content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/SubControl" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [subcontrols] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the sub control requestBody: description: body of the new sub control content: application/json: schema: type: object properties: controlId: type: number example: 1 status: anyOf: - type: string enum: - "Waiting" - "In progress" - "Done" example: "In Progress" approver: type: string example: "John Doe" riskReview: anyOf: - type: string enum: - "Acceptable risk" - "Residual risk" - "Unacceptable risk" example: "Acceptable risk" owner: type: string example: "Bob Johnson" reviewer: type: string example: "Alice Williams" dueDate: type: Date example: "2023-12-31T00:00:00.000Z" implementationDetails: type: string example: "Implement new feature" evidence: type: string example: "evidence1.pdf" attachment: type: string example: "attachment1.docx" feedback: type: string example: "Great work so far." required: true responses: "202": description: sub control content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/SubControl" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [subcontrols] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the sub control to delete responses: "202": description: sub control content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /subtopics: get: tags: [subtopics] security: - JWTAuth: [] responses: "200": description: list of all sub topics content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/SubTopic" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: tags: [subtopics] security: - JWTAuth: [] requestBody: description: body of the new sub topic content: application/json: schema: type: object properties: topicId: type: integer example: 1 name: type: string example: "Subtopic A" required: true responses: "201": description: new created sub topic content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/SubTopic" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /subtopics/{id}: get: tags: [subtopics] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the sub topic responses: "200": description: sub topic content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/SubTopic" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [subtopics] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the sub topic requestBody: description: body of the new sub topic content: application/json: schema: type: object properties: topicId: type: integer example: 1 name: type: string example: "Subtopic A" required: true responses: "202": description: sub topic content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/SubTopic" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [subtopics] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the sub topic to delete responses: "202": description: sub topic content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /topics: get: tags: [topics] security: - JWTAuth: [] responses: "200": description: list of all topics content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/Topic" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: tags: [topics] security: - JWTAuth: [] requestBody: description: body of the new topic content: application/json: schema: type: object properties: assessmentId: type: integer example: 1 title: type: string example: "Project A" required: true responses: "201": description: new created topic content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/Topic" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /topics/{id}: get: tags: [topics] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the topic responses: "200": description: topic content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/Topic" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [topics] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the topic requestBody: description: body of the new topic content: application/json: schema: type: object properties: assessmentId: type: integer example: 1 title: type: string example: "Project A" required: true responses: "202": description: topic content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/Topic" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [topics] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the topic to delete responses: "202": description: topic content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /vendors: get: tags: [vendors] security: - JWTAuth: [] responses: "200": description: list of all vendors content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/Vendor" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: tags: [vendors] security: - JWTAuth: [] requestBody: description: body of the new vendor content: application/json: schema: type: object properties: projectId: type: integer example: 1 vendorName: type: string example: "Vendor A" assignee: type: string example: "John Doe" vendorProvides: type: string example: "Consulting Services" website: type: string example: "www.vendora.com" vendorContactPerson: type: string example: "Jane Smith" reviewResult: type: string example: "Positive" reviewStatus: type: string example: "Completed" reviewer: type: string example: "Bob Johnson" reviewDate: type: string format: date-time example: "2023-05-15T00:00:00.000Z" riskDescription: type: string example: "Limited experience with new technology" impactDescription: type: string example: "Potential delays in project timeline" impact: type: integer example: 3 probability: type: number example: 0.4 actionOwner: type: string example: "Alice Williams" actionPlan: type: string example: "Provide additional training" riskSeverity: type: integer example: 2 riskLevel: anyOf: - type: string enum: - "Very high risk" - "High risk" - "Medium risk" - "Low risk" - "Very low risk" example: "Low risk" likelihood: type: number example: 0.5 required: true responses: "201": description: new created vendor content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/Vendor" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /vendors/{id}: get: tags: [vendors] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the vendor responses: "200": description: vendor content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/Vendor" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [vendors] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the vendor requestBody: description: body of the new vendor content: application/json: schema: type: object properties: projectId: type: integer example: 1 vendorName: type: string example: "Vendor A" assignee: type: string example: "John Doe" vendorProvides: type: string example: "Consulting Services" website: type: string example: "www.vendora.com" vendorContactPerson: type: string example: "Jane Smith" reviewResult: type: string example: "Positive" reviewStatus: type: string example: "Completed" reviewer: type: string example: "Bob Johnson" riskStatus: anyOf: - type: string enum: - "Active" - "Under review" - "Not active" example: "Not active" reviewDate: type: string format: date-time example: "2023-05-15T00:00:00.000Z" riskDescription: type: string example: "Limited experience with new technology" impactDescription: type: string example: "Potential delays in project timeline" impact: type: integer example: 3 probability: type: number example: 0.4 actionOwner: type: string example: "Alice Williams" actionPlan: type: string example: "Provide additional training" riskSeverity: type: integer example: 2 riskLevel: anyOf: - type: string enum: - "Very high risk" - "High risk" - "Medium risk" - "Low risk" - "Very low risk" example: "Low risk" likelihood: type: number example: 0.5 required: true responses: "202": description: vendor content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/Vendor" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [vendors] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the vendor to delete responses: "202": description: vendor content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /vendorRisks: get: tags: [vendorRisks] security: - JWTAuth: [] responses: "200": description: list of all vendor risks content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/VendorRisk" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: tags: [vendorRisks] security: - JWTAuth: [] requestBody: description: body of the new vendor risk content: application/json: schema: type: object properties: project_id: type: integer example: 1 vendor_name: type: string example: "Tech Solutions Inc." risk_name: type: string example: "Data Security" owner: type: string example: "Alice" risk_level: anyOf: - type: string enum: - "No risk" - "Low risk" - "Medium risk" - "High risk" - "Very high risk" example: "High Risk" review_date: type: string format: date-time example: "2024-10-20T00:00:00.000Z" required: true responses: "201": description: new created vendor risk content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/VendorRisk" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /vendorRisks/{id}: get: tags: [vendorRisks] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the vendor risk responses: "200": description: vendor risk content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/VendorRisk" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [vendorRisks] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the vendor risk requestBody: description: body of the new vendor risk content: application/json: schema: type: object properties: project_id: type: integer example: 1 vendor_name: type: string example: "Tech Solutions Inc." risk_name: type: string example: "Data Security" owner: type: string example: "Alice" risk_level: anyOf: - type: string enum: - "No risk" - "Low risk" - "Medium risk" - "High risk" - "Very high risk" example: "High Risk" review_date: type: string format: date-time example: "2024-10-20T00:00:00.000Z" required: true responses: "202": description: vendor risk content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/VendorRisk" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [vendorRisks] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the vendor risk to delete responses: "202": description: vendor risk content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /users: get: tags: [users] security: - JWTAuth: [] responses: "200": description: list of all users content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/User" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /users/{id}: get: tags: [users] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the user responses: "200": description: user content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/User" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [users] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the user requestBody: description: body of the new user content: application/json: schema: type: object properties: name: type: string example: "Alice Smith" email: type: string example: "alice.smith@example.com" password_hash: type: string example: "$2b$10$c7Mtd3kRpMjr6VexlxuAleT8Sy3SwPcT.YLCazH5QWBgnATDo5N6O" role: type: integer example: 1 created_at: type: string format: date-time example: "2024-01-01T00:00:00.000Z" last_login: type: string format: date-time example: "2024-10-01T00:00:00.000Z" required: true responses: "202": description: user content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/User" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [users] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the user to delete responses: "202": description: user content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /users/register: post: tags: [users] requestBody: description: body of the new user content: application/json: schema: type: object properties: name: type: string example: "Alice" surname: type: string example: "Smith" email: type: string example: "alice.smith@example.com" password: type: string example: "Alice@123" role: type: integer example: 1 created_at: type: string format: date-time example: "2024-01-01T00:00:00.000Z" last_login: type: string format: date-time example: "2024-10-01T00:00:00.000Z" required: true responses: "201": description: new created user content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/User" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /users/by-email/{email}: get: tags: [users] security: - JWTAuth: [] parameters: - in: path name: email schema: type: string required: true description: email of the user responses: "200": description: user content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/User" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /users/login: post: tags: [users] requestBody: description: email and password for the user content: application/json: schema: type: object properties: email: type: string example: "alice.smith@example.com" password: type: string example: "Alice@123" required: true responses: "202": description: newly generated token content: application/json: type: object properties: message: type: string example: created data: type: object properties: token: type: string example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NCwiZW1haWwiOiJkYXZpZC53aWxzb25AZXhhbXBsZS5jb20iLCJleHBpcmUiOjE3MzEwNzkwNTU3OTIsImlhdCI6MTczMTA3NTQ1NX0.hp7H0bZC-ALaPEcIoAkhRtFpKjwndb6QL5ZH-9phjlw" "406": description: not acceptable error content: application/json: type: object properties: message: type: string example: "Not Acceptable" error: type: object "404": description: not found error content: application/json: type: object properties: message: type: string example: "Not Found" error: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /users/reset-password: post: tags: [users] requestBody: description: email and password for the user content: application/json: schema: type: object properties: email: type: string example: "alice.smith@example.com" newPassword: type: string example: "AliceNew@123" required: true responses: "202": description: user object after updating password content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/User" "406": description: not acceptable error content: application/json: type: object properties: message: type: string example: "Not Acceptable" error: type: object "404": description: not found error content: application/json: type: object properties: message: type: string example: "Not Found" error: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /users/{id}/calculate-progress: get: tags: [users] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the user responses: "200": description: user content: application/json: type: object properties: controls: type: object properties: projects: type: array items: type: object properties: projectId: type: integer example: 1 totalSubControls: type: integer example: 12 doneSubControls: type: integer example: 1 totalSubControls: type: integer example: 12 doneSubControls: type: integer example: 1 percentageComplete: type: number format: float example: 8.33 assessments: type: object properties: projects: type: array items: type: object properties: projectId: type: integer example: 1 totalAssessments: type: integer example: 34 doneAssessments: type: integer example: 0 totalAssessments: type: integer example: 34 doneAssessments: type: integer example: 0 percentageComplete: type: number format: float example: 0 "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /roles: get: tags: [roles] security: - JWTAuth: [] responses: "200": description: list of all roles content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/Role" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: tags: [roles] security: - JWTAuth: [] requestBody: description: body of the new role content: application/json: schema: type: object properties: name: type: string example: "Admin" description: type: string example: "Administrator with full access to the system." required: true responses: "201": description: new created role tracker content: application/json: type: object properties: message: type: string example: created data: type: object $ref: "#/components/schemas/Role" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object "503": description: internal server error content: application/json: type: object properties: message: type: string example: service unavailable error: type: object /roles/{id}: get: tags: [roles] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the role responses: "200": description: role content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/Role" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object put: tags: [roles] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the role requestBody: description: body of the new role content: application/json: schema: type: object properties: name: type: string example: "Admin" description: type: string example: "Administrator with full access to the system." required: true responses: "202": description: role content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/Role" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [roles] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the role to delete responses: "202": description: role content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /training: get: summary: Returns all the training modules tags: [training] security: - JWTAuth: [] responses: "200": description: list all the training modules content: application/json: schema: type: object properties: message: type: string example: ok data: type: object items: $ref: "#/components/schemas/TrainingModule" "204": description: no content to display content: application/json: type: object properties: message: type: string example: no content data: type: object items: $ref: "#/components/schemas/TrainingModule" "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object post: summary: Creates new training register tags: [training] security: - JWTAuth: [] requestBody: description: Training module data content: application/json: schema: $ref: "#/components/schemas/TrainingModule" required: true responses: "201": description: create new training register content: application/json: schema: type: object properties: message: type: string example: Training successfully created data: $ref: "#/components/schemas/TrainingModule" "500": description: Error creating new training (internal server error) content: application/json: schema: type: object properties: message: type: string example: internal server error error: type: object /training/training-id/{id}: get: description: Get training module by id tags: [training] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the role responses: "200": decription: get one training data depending on the id content: application/json: schema: type: object properties: message: type: string example: ok data: $ref: "#/components/schemas/TrainingModule" "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /training/{id}: patch: tags: [training] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: update the training data of one particular instance requestBody: description: body of the training module content: application/json: schema: $ref: "#/components/schemas/TrainingModule" responses: "202": description: training data content: application/json: schema: type: object properties: message: type: string example: accepted data: $ref: "#/components/schemas/TrainingModule" "400": description: Need to add all the fields content: application/json: schema: type: string message: type: string example: "All fields are required to get updated" "404": description: no content to display content: application/json: schema: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object delete: tags: [training] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: id of the training to delete responses: "202": description: training data content: application/json: schema: type: object properties: message: type: string example: accepted data: type: boolean example: true "404": description: no content to display content: application/json: type: object properties: message: type: string example: not found data: type: object "500": description: internal server error content: application/json: type: object properties: message: type: string example: internal server error error: type: object /files: get: tags: [files] security: - JWTAuth: [] responses: "200": description: list of user file metadata content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/FileMetadata" "204": description: no content to display "500": description: internal server error post: tags: [files] security: - JWTAuth: [] requestBody: content: multipart/form-data: schema: type: object properties: files: type: array items: type: string format: binary responses: "201": description: files uploaded successfully "500": description: internal server error /files/by-projid/{id}: get: tags: [files] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: project id responses: "200": description: file metadata by project id content: application/json: schema: type: array items: $ref: "#/components/schemas/FileMetadata" "404": description: files not found "500": description: internal server error /files/{id}: get: tags: [files] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: file id responses: "200": description: file content content: application/octet-stream: schema: type: string format: binary "404": description: file not found "500": description: internal server error /organizations: post: tags: [organizations] requestBody: description: Organization data content: application/json: schema: $ref: "#/components/schemas/Organization" required: true responses: "201": description: organization created successfully content: application/json: schema: type: object properties: message: type: string example: created data: $ref: "#/components/schemas/Organization" "500": description: internal server error /organizations/exists: get: tags: [organizations] responses: "200": description: organizations exist check content: application/json: schema: type: object properties: exists: type: boolean example: true /organizations/{id}: get: tags: [organizations] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: organization id responses: "200": description: organization content: application/json: schema: $ref: "#/components/schemas/Organization" "404": description: organization not found "500": description: internal server error /frameworks: get: tags: [frameworks] security: - JWTAuth: [] responses: "200": description: list of all frameworks content: application/json: schema: type: object properties: message: type: string example: ok data: type: array items: $ref: "#/components/schemas/Framework" "204": description: no content to display "500": description: internal server error /frameworks/{id}: get: tags: [frameworks] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: framework id responses: "200": description: framework content: application/json: schema: $ref: "#/components/schemas/Framework" "404": description: framework not found "500": description: internal server error /frameworks/toProject: post: tags: [frameworks] security: - JWTAuth: [] requestBody: description: Add framework to project content: application/json: schema: type: object properties: frameworkId: type: integer example: 1 projectId: type: integer example: 1 required: true responses: "201": description: framework added to project "500": description: internal server error /frameworks/fromProject: delete: tags: [frameworks] security: - JWTAuth: [] requestBody: description: Remove framework from project content: application/json: schema: type: object properties: frameworkId: type: integer example: 1 projectId: type: integer example: 1 required: true responses: "202": description: framework removed from project "404": description: framework or project not found "500": description: internal server error /autoDrivers: post: tags: [autoDrivers] security: - JWTAuth: [] requestBody: description: Auto driver data content: application/json: schema: type: object required: true responses: "201": description: auto driver created "500": description: internal server error delete: tags: [autoDrivers] security: - JWTAuth: [] responses: "202": description: auto driver deleted "500": description: internal server error /controlCategory: get: tags: [controlCategory] security: - JWTAuth: [] responses: "200": description: list of all control categories content: application/json: schema: type: array items: $ref: "#/components/schemas/ControlCategories" "204": description: no content to display "500": description: internal server error post: tags: [controlCategory] security: - JWTAuth: [] requestBody: description: Control category data content: application/json: schema: $ref: "#/components/schemas/ControlCategories" required: true responses: "201": description: control category created "500": description: internal server error /controlCategory/{id}: get: tags: [controlCategory] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: control category id responses: "200": description: control category content: application/json: schema: $ref: "#/components/schemas/ControlCategories" "404": description: control category not found "500": description: internal server error put: tags: [controlCategory] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: control category id requestBody: description: Control category data content: application/json: schema: $ref: "#/components/schemas/ControlCategories" required: true responses: "202": description: control category updated "404": description: control category not found "500": description: internal server error delete: tags: [controlCategory] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: control category id responses: "202": description: control category deleted "404": description: control category not found "500": description: internal server error /eu-ai-act/controlCategories: get: tags: [eu-ai-act] security: - JWTAuth: [] responses: "200": description: list of all control categories content: application/json: schema: type: array items: $ref: "#/components/schemas/ControlCategories" "500": description: internal server error /eu-ai-act/controls/byControlCategoryId/{id}: get: tags: [eu-ai-act] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: control category id responses: "200": description: controls by control category id content: application/json: schema: type: array items: $ref: "#/components/schemas/Control" "500": description: internal server error /eu-ai-act/topics: get: tags: [eu-ai-act] security: - JWTAuth: [] responses: "200": description: list of all topics content: application/json: schema: type: array items: $ref: "#/components/schemas/Topic" "500": description: internal server error /eu-ai-act/assessments/byProjectId/{id}: get: tags: [eu-ai-act] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: project id responses: "200": description: assessments by project id content: application/json: schema: type: array items: $ref: "#/components/schemas/Assessment" "500": description: internal server error delete: tags: [eu-ai-act] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: project id responses: "202": description: assessments deleted "500": description: internal server error /eu-ai-act/compliances/byProjectId/{id}: get: tags: [eu-ai-act] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: project id responses: "200": description: compliances by project id content: application/json: schema: type: object "500": description: internal server error delete: tags: [eu-ai-act] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: project id responses: "202": description: compliances deleted "500": description: internal server error /eu-ai-act/compliances/progress/{id}: get: tags: [eu-ai-act] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: project id responses: "200": description: project compliance progress content: application/json: schema: type: object "500": description: internal server error /eu-ai-act/assessments/progress/{id}: get: tags: [eu-ai-act] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: project id responses: "200": description: project assessment progress content: application/json: schema: type: object "500": description: internal server error /eu-ai-act/all/compliances/progress: get: tags: [eu-ai-act] security: - JWTAuth: [] responses: "200": description: all projects compliance progress content: application/json: schema: type: object "500": description: internal server error /eu-ai-act/all/assessments/progress: get: tags: [eu-ai-act] security: - JWTAuth: [] responses: "200": description: all projects assessment progress content: application/json: schema: type: object "500": description: internal server error /eu-ai-act/topicById: get: tags: [eu-ai-act] security: - JWTAuth: [] parameters: - in: query name: id schema: type: integer required: true description: topic id responses: "200": description: topic by id content: application/json: schema: $ref: "#/components/schemas/Topic" "500": description: internal server error /eu-ai-act/controlById: get: tags: [eu-ai-act] security: - JWTAuth: [] parameters: - in: query name: id schema: type: integer required: true description: control id responses: "200": description: control by id content: application/json: schema: $ref: "#/components/schemas/Control" "500": description: internal server error /eu-ai-act/saveControls/{id}: patch: tags: [eu-ai-act] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: control id requestBody: content: multipart/form-data: schema: type: object responses: "202": description: controls saved "500": description: internal server error /eu-ai-act/saveAnswer/{id}: patch: tags: [eu-ai-act] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: question id requestBody: description: Answer data content: application/json: schema: type: object required: true responses: "202": description: answer saved "500": description: internal server error /iso-42001: get: tags: [iso-42001] security: - JWTAuth: [] responses: "200": description: ISO 42001 data content: application/json: schema: type: object "500": description: internal server error /reporting: get: tags: [reporting] security: - JWTAuth: [] responses: "200": description: reporting data content: application/json: schema: type: object "500": description: internal server error /mail: post: tags: [mail] security: - JWTAuth: [] requestBody: description: Email data content: application/json: schema: type: object properties: to: type: string example: "user@example.com" subject: type: string example: "Subject" body: type: string example: "Email body" required: true responses: "200": description: email sent successfully "500": description: internal server error /bias_and_fairness: get: tags: [bias_and_fairness] security: - JWTAuth: [] responses: "200": description: bias and fairness data (proxied) content: application/json: schema: type: object "500": description: internal server error post: tags: [bias_and_fairness] security: - JWTAuth: [] requestBody: description: Bias and fairness data content: application/json: schema: type: object required: true responses: "201": description: bias and fairness data created "500": description: internal server error /aiTrustCentre/overview: get: tags: [aiTrustCentre] security: - JWTAuth: [] responses: "200": description: AI Trust Centre overview content: application/json: schema: $ref: "#/components/schemas/AITrustCentreOverview" "500": description: internal server error put: tags: [aiTrustCentre] security: - JWTAuth: [] requestBody: description: AI Trust Centre overview data content: application/json: schema: $ref: "#/components/schemas/AITrustCentreOverview" required: true responses: "202": description: AI Trust Centre overview updated "500": description: internal server error /aiTrustCentre/resources: get: tags: [aiTrustCentre] security: - JWTAuth: [] responses: "200": description: AI Trust Centre resources content: application/json: schema: type: array items: $ref: "#/components/schemas/AITrustCentreResource" "500": description: internal server error post: tags: [aiTrustCentre] security: - JWTAuth: [] requestBody: content: multipart/form-data: schema: type: object properties: file: type: string format: binary responses: "201": description: AI Trust Centre resource created "500": description: internal server error /aiTrustCentre/resources/{id}: put: tags: [aiTrustCentre] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: resource id requestBody: content: multipart/form-data: schema: type: object properties: file: type: string format: binary responses: "202": description: AI Trust Centre resource updated "404": description: resource not found "500": description: internal server error delete: tags: [aiTrustCentre] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: resource id responses: "202": description: AI Trust Centre resource deleted "404": description: resource not found "500": description: internal server error /aiTrustCentre/subprocessors: get: tags: [aiTrustCentre] security: - JWTAuth: [] responses: "200": description: AI Trust Centre subprocessors content: application/json: schema: type: array items: $ref: "#/components/schemas/AITrustCentreSubprocessor" "500": description: internal server error post: tags: [aiTrustCentre] security: - JWTAuth: [] requestBody: description: Subprocessor data content: application/json: schema: $ref: "#/components/schemas/AITrustCentreSubprocessor" required: true responses: "201": description: AI Trust Centre subprocessor created "500": description: internal server error /aiTrustCentre/subprocessors/{id}: put: tags: [aiTrustCentre] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: subprocessor id requestBody: description: Subprocessor data content: application/json: schema: $ref: "#/components/schemas/AITrustCentreSubprocessor" required: true responses: "202": description: AI Trust Centre subprocessor updated "404": description: subprocessor not found "500": description: internal server error delete: tags: [aiTrustCentre] security: - JWTAuth: [] parameters: - in: path name: id schema: type: integer required: true description: subprocessor id responses: "202": description: AI Trust Centre subprocessor deleted "404": description: subprocessor not found "500": description: internal server error /aiTrustCentre/logo: post: tags: [aiTrustCentre] security: - JWTAuth: [] requestBody: content: multipart/form-data: schema: type: object properties: logo: type: string format: binary responses: "201": description: company logo uploaded "500": description: internal server error delete: tags: [aiTrustCentre] security: - JWTAuth: [] responses: "202": description: company logo deleted "500": description: internal server error /aiTrustCentre/{hash}: get: tags: [aiTrustCentre] parameters: - in: path name: hash schema: type: string required: true description: public hash responses: "200": description: AI Trust Centre public page content: application/json: schema: $ref: "#/components/schemas/AITrustCentrePublic" "404": description: page not found "500": description: internal server error /aiTrustCentre/{hash}/logo: get: tags: [aiTrustCentre] parameters: - in: path name: hash schema: type: string required: true description: public hash responses: "200": description: company logo content: image/*: schema: type: string format: binary "404": description: logo not found "500": description: internal server error /aiTrustCentre/{hash}/resources/{id}: get: tags: [aiTrustCentre] parameters: - in: path name: hash schema: type: string required: true description: public hash - in: path name: id schema: type: integer required: true description: resource id responses: "200": description: AI Trust Centre public resource content: application/json: schema: $ref: "#/components/schemas/AITrustCentreResource" "404": description: resource not found "500": description: internal server error /logger/events: get: tags: [logger] security: - JWTAuth: [] responses: "200": description: system events content: application/json: schema: type: array items: type: object "500": description: internal server error /logger/logs: get: tags: [logger] security: - JWTAuth: [] responses: "200": description: system logs content: application/json: schema: type: array items: type: object "500": description: internal server error components: securitySchemes: JWTAuth: type: http scheme: bearer bearerFormat: JWT value: "Bearer " schemas: Assessment: type: object properties: id: type: integer example: 1 project_id: type: integer example: 1 is_demo: type: boolean example: false created_at: type: string format: date-time example: "2024-01-01T00:00:00.000Z" Role: type: object properties: id: type: integer example: 1 name: type: string example: "Admin" description: type: string example: "Administrator with full access to the system." Control: type: object properties: id: type: integer example: 1 title: type: string example: "Regulatory Training and Response Procedures" description: type: string example: "Train personnel on regulatory requirements and procedures for responding to authority requests." orderNo: type: integer example: 1 status: type: string example: "In Progress" approver: type: string example: "John Doe" riskReview: type: string example: "Acceptable risk" owner: type: string example: "Bob Johnson" reviewer: type: string example: "Alice Williams" dueDate: type: string format: date-time example: "2024-09-20T00:00:00.000Z" implementationDetails: type: string example: "Implement new feature" controlCategoryId: type: string example: 1 Project: type: object properties: id: type: number example: 1 project_title: type: string example: "AI Compliance Checker" owner: type: integer example: 1 members: type: array items: type: string example: "1" example: start_date: type: string format: date-time example: "2023-01-15T00:00:00.000Z" ai_risk_classification: anyOf: - type: string enum: - "high risk" - "limited risk" - "minimal risk" example: "high risk" type_of_high_risk_role: anyOf: - type: string enum: - "deployer" - "provider" - "distributor" - "importer" - "product manufacturer" - "authorized representative" example: "deployer" goal: type: string example: "To ensure compliance with AI governance standards" last_updated: type: string format: date-time example: "2024-10-30T00:00:00.000Z" last_updated_by: type: integer example: 1 # assessment_id: # type: integer # example: 1 ProjectRisk: type: object properties: id: type: integer example: 1 project_id: type: integer example: 1 risk_name: type: string example: "Data Privacy Compliance" risk_owner: type: string example: "Alice" ai_lifecycle_phase: type: string example: "Deployment" risk_description: type: string example: "Risk of non-compliance with data privacy regulations." risk_category: type: string example: "Regulatory" impact: type: string example: "High" assessment_mapping: type: string example: "GDPR Compliance Check" controls_mapping: type: string example: "Data Access Controls" likelihood: type: string example: "Moderate" severity: type: string example: "High" risk_level_autocalculated: anyOf: - type: string enum: - "No risk" - "Low risk" - "Medium risk" - "High risk" - "Very high risk" example: "No risk" review_notes: type: string example: "Need for regular audits." mitigation_status: type: string example: "In Progress" current_risk_level: type: string example: "Medium" deadline: type: string format: date-time example: "2024-12-31T00:00:00.000Z" mitigation_plan: type: string example: "Implement data anonymization." implementation_strategy: type: string example: "Anonymize user data in production environments." mitigation_evidence_document: type: string example: "Data_Anonymization_Plan.pdf" likelihood_mitigation: type: string example: "Reduced" risk_severity: type: string example: "Moderate" final_risk_level: type: string example: "Low" risk_approval: type: string example: "Pending" approval_status: type: string example: "Under Review" date_of_assessment: type: string format: date-time example: "2024-11-01T00:00:00.000Z" ProjectScope: type: object properties: id: type: integer example: 1 assessmentId: type: integer example: 1 describeAiEnvironment: type: string example: "This project involves the development of a new AI-powered virtual assistant." isNewAiTechnology: type: boolean example: true usesPersonalData: type: boolean example: true projectScopeDocuments: type: string example: "project-scope-v1.pdf" technologyType: type: string example: "Natural Language Processing" hasOngoingMonitoring: type: boolean example: true unintendedOutcomes: type: string example: "Potential bias in the assistant's responses." technologyDocumentation: type: string example: "technology-documentation.docx" Question: type: object properties: id: type: number example: 1 subtopicId: type: number example: 1 questionText: type: string example: "What is the purpose of this feature?" answerType: type: string example: "Multiple Choice" evidenceFileRequired: type: boolean example: false hint: type: string example: "As a deployer, you are responsible for any additional changes made to the high-risk AI system and must fulfill additional requirements based on the data used and the specific use case you are deploying." isRequired: type: boolean example: true priorityLevel: anyOf: - type: string enum: - "high priority" - "medium priority" - "low priority" example: "high priority" evidenceFiles: type: array items: type: object properties: id: type: number filename: type: string SubControl: type: object properties: id: type: number example: 1 controlId: type: number example: 1 title: type: string example: "" description: type: string example: "" orderNo: type: integer example: 1 status: anyOf: - type: string enum: - "Waiting" - "In progress" - "Done" example: "In Progress" approver: type: string example: "John Doe" riskReview: anyOf: - type: string enum: - "Acceptable risk" - "Residual risk" - "Unacceptable risk" example: "Acceptable risk" owner: type: string example: "Bob Johnson" reviewer: type: string example: "Alice Williams" dueDate: type: Date example: "2023-12-31T00:00:00.000Z" implementationDetails: type: string example: "Implement new feature" evidenceDescription: type: string example: "evidence1.pdf" # attachment: # type: string # example: "attachment1.docx" feedbackDescription: type: string example: "Great work so far." SubTopic: type: object properties: id: type: integer example: 1 topicId: type: integer example: 1 name: type: string example: "Subtopic A" Topic: type: object properties: id: type: integer example: 1 assessmentId: type: integer example: 1 title: type: string example: "Project A" User: type: object properties: id: type: integer example: 1 name: type: string example: "Alice" surname: type: string example: "Smith" email: type: string example: "alice.smith@example.com" password_hash: type: string example: "$2b$10$c7Mtd3kRpMjr6VexlxuAleT8Sy3SwPcT.YLCazH5QWBgnATDo5N6O" role: type: integer example: 1 created_at: type: string format: date-time example: "2024-01-01T00:00:00.000Z" last_login: type: string format: date-time example: "2024-10-01T00:00:00.000Z" Vendor: type: object properties: id: type: integer example: 1 projectId: type: integer example: 1 vendorName: type: string example: "Vendor A" assignee: type: string example: "John Doe" vendorProvides: type: string example: "Consulting Services" website: type: string example: "www.vendora.com" vendorContactPerson: type: string example: "Jane Smith" reviewResult: type: string example: "Positive" reviewStatus: type: string example: "Completed" reviewer: type: string example: "Bob Johnson" riskStatus: anyOf: - type: string enum: - "Active" - "Under review" - "Not active" example: "Not active" reviewDate: type: string format: date-time example: "2023-05-15T00:00:00.000Z" riskDescription: type: string example: "Limited experience with new technology" impactDescription: type: string example: "Potential delays in project timeline" impact: type: integer example: 3 probability: type: number example: 0.4 actionOwner: type: string example: "Alice Williams" actionPlan: type: string example: "Provide additional training" riskSeverity: type: integer example: 2 riskLevel: anyOf: - type: string enum: - "Very high risk" - "High risk" - "Medium risk" - "Low risk" - "Very low risk" example: "Low risk" likelihood: type: number example: 0.5 VendorRisk: type: object properties: id: type: integer example: 1 project_id: type: integer example: 1 vendor_name: type: string example: "Tech Solutions Inc." risk_name: type: string example: "Data Security" owner: type: string example: "Alice" risk_level: anyOf: - type: string enum: - "No risk" - "Low risk" - "Medium risk" - "High risk" - "Very high risk" example: "High Risk" review_date: type: string format: date-time example: "2024-10-20T00:00:00.000Z" AssessmentTracker: allOf: - $ref: "#/components/schemas/Assessment" type: object # Define the type explicitly properties: topics: type: array items: allOf: - $ref: "#/components/schemas/Topic" type: object # Explicitly define the type properties: subtopics: type: array items: allOf: - $ref: "#/components/schemas/SubTopic" type: object # Explicitly define the type properties: questions: type: array items: $ref: "#/components/schemas/Question" ControlCategories: type: object properties: id: type: integer exampele: 1 projectId: type: integer example: 1 name: type: string example: "AI literacy" orderNo: type: integer example: 1 TrainingModule: type: object properties: id: type: integer example: 1 training_name: type: string example: "AI Training" duration: type: string example: "6 weeks" provider: type: string example: "Verifywise open source AI governance" department: type: string example: "Maths Department" status: type: string enum: [Planned, In Progress, Completed] numberOfPeople: type: integer example: 10 description: type: string example: "A training module requiring 6 weeks" Organization: type: object properties: id: type: integer example: 1 name: type: string example: "VerifyWise Corp" logo: type: string example: "logo.png" created_at: type: string format: date-time example: "2024-01-01T00:00:00.000Z" Framework: type: object properties: id: type: integer example: 1 name: type: string example: "EU AI Act" description: type: string example: "European Union Artificial Intelligence Act" version: type: string example: "1.0" created_at: type: string format: date-time example: "2024-01-01T00:00:00.000Z" FileMetadata: type: object properties: id: type: integer example: 1 filename: type: string example: "document.pdf" originalName: type: string example: "Original Document.pdf" mimetype: type: string example: "application/pdf" size: type: integer example: 1024 uploadedAt: type: string format: date-time example: "2024-01-01T00:00:00.000Z" projectId: type: integer example: 1 AITrustCentreOverview: type: object properties: id: type: integer example: 1 companyName: type: string example: "VerifyWise Corp" description: type: string example: "AI governance and compliance platform" website: type: string example: "https://verifywise.ai" isPublic: type: boolean example: true publicHash: type: string example: "abc123def456" AITrustCentreResource: type: object properties: id: type: integer example: 1 title: type: string example: "AI Policy Document" description: type: string example: "Company AI usage policy" resourceType: type: string example: "policy" isPublic: type: boolean example: true filePath: type: string example: "/resources/ai-policy.pdf" createdAt: type: string format: date-time example: "2024-01-01T00:00:00.000Z" AITrustCentreSubprocessor: type: object properties: id: type: integer example: 1 name: type: string example: "AI Service Provider" description: type: string example: "Third-party AI model provider" website: type: string example: "https://aiservice.com" dataProcessed: type: string example: "User queries and responses" safeguards: type: string example: "Data encryption and access controls" AITrustCentrePublic: type: object properties: overview: $ref: "#/components/schemas/AITrustCentreOverview" resources: type: array items: $ref: "#/components/schemas/AITrustCentreResource" subprocessors: type: array items: $ref: "#/components/schemas/AITrustCentreSubprocessor"