openapi: 3.2.0 info: description: Credo AI server API title: Credo AI server Use Case Questionnaires API servers: - url: /api/v2/credoai tags: - name: use_case_questionnaires description: Operations related to questionnaires, questionnaire sections, and questionnaire evidence for a specific use case paths: /use_cases/{use_case_id}/questionnaire_sections/{section_id}/files: get: description: Retrieves a list of all supplementary files associated with a specific questionnaire section for a given use case. operationId: CredoAIWeb.API.V2.UseCase.Questionnaire.SectionFileController.index parameters: - description: The unique ID for the use case. in: path name: use_case_id required: true schema: type: string - description: The unique ID for the questionnaire section. in: path name: section_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/SectionFilesResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires post: description: Creates a new file associated with a specific questionnaire section for a given use case. operationId: CredoAIWeb.API.V2.UseCase.Questionnaire.SectionFileController.create parameters: - description: The unique ID for the use case. in: path name: use_case_id required: true schema: type: string - description: The unique ID for the questionnaire section. in: path name: section_id required: true schema: type: string responses: '201': description: Created content: application/vnd.api+json: schema: $ref: '#/components/schemas/SectionFileResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/SectionFileCreateRequest' description: The attributes of the file to be created. required: true /use_cases/{use_case_id}/questionnaires: get: description: List all use_case_questionnaires of use_case operationId: CredoAIWeb.API.V2.UseCase.QuestionnaireController.index parameters: - description: use_case id in: path name: use_case_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseQuestionnairesResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires post: description: Add questionnaire to use case, as a result creates use_case_questionnaires and use_case_questionnaire_sections operationId: CredoAIWeb.API.V2.UseCase.QuestionnaireController.create parameters: - description: use_case id in: path name: use_case_id required: true schema: type: string responses: '201': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseQuestionnaireResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseQuestionnaireCreateRequest' description: attributes /use_cases/{use_case_id}/questionnaire_sections: get: description: Retrieves a list of all questionnaire sections associated with a specific use case. operationId: CredoAIWeb.API.V2.UseCase.Questionnaire.SectionController.index parameters: - description: The unique ID of the use case. in: path name: use_case_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseQuestionnaireSectionsResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires /use_cases/{use_case_id}/questionnaire_sections/{section_id}/files/{id}: delete: description: Deletes a specific file from a questionnaire section for a given use case. operationId: CredoAIWeb.API.V2.UseCase.Questionnaire.SectionFileController.delete parameters: - description: The unique ID for the use case. in: path name: use_case_id required: true schema: type: string - description: The unique ID for the questionnaire section. in: path name: section_id required: true schema: type: string - description: The unique ID for the file to be deleted. in: path name: id required: true schema: type: string responses: '204': description: No Content '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires /use_cases/{use_case_id}/questionnaire_sections/{section_id}/tasks: post: description: Creates a new task associated with a specific questionnaire section of a use case. operationId: CredoAIWeb.API.V2.UseCase.Questionnaire.SectionController.create_task parameters: - description: The unique ID of the use case. in: path name: use_case_id required: true schema: type: string - description: The unique ID of the questionnaire section. in: path name: section_id required: true schema: type: string responses: '201': description: Created content: application/vnd.api+json: schema: $ref: '#/components/schemas/TaskResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseControlTaskCreateRequest' description: The details of the task to be created. /use_cases/{use_case_id}/questionnaire_sections/{section_id}/evidences: get: description: Retrieves a list of evidences associated with a specific use case questionnaire section. operationId: CredoAIWeb.API.V2.UseCase.Questionnaire.SectionEvidenceController.index parameters: - description: The unique ID of the use case. in: path name: use_case_id required: true schema: type: string - description: The unique ID of the questionnaire section. in: path name: section_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/EvidencesResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires post: description: Creates a new evidence entry for a specific question within a questionnaire section of a use case. operationId: CredoAIWeb.API.V2.UseCase.Questionnaire.SectionEvidenceController.create parameters: - description: The unique ID of the use case. in: path name: use_case_id required: true schema: type: string - description: The unique ID of the questionnaire section. in: path name: section_id required: true schema: type: string responses: '200': description: Created content: application/vnd.api+json: schema: $ref: '#/components/schemas/EvidenceResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseQuestionnaireSectionEvidenceCreateRequest' description: The attributes of the evidence to be created. /use_cases/{use_case_id}/questionnaire_sections/{id}: get: description: Fetches a specific questionnaire section for a given use case by its unique ID. operationId: CredoAIWeb.API.V2.UseCase.Questionnaire.SectionController.show parameters: - description: The unique ID of the use case. in: path name: use_case_id required: true schema: type: string - description: The unique ID of the questionnaire section. in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseQuestionnaireSectionResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires /use_cases/{use_case_id}/questionnaires/{id}: delete: description: Remove queationnaire from use case, as a result deletes use_case_questionnaires and use_case_questionnaire_sections operationId: CredoAIWeb.API.V2.UseCase.QuestionnaireController.delete parameters: - description: use_case id in: path name: use_case_id required: true schema: type: string - description: use_case_questionnaire id in: path name: id required: true schema: type: string responses: '204': description: OK '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires patch: description: 'Update use_case_questionnaires. If version is provided, it will upgrade questinnaire to that version and other attributes will be ignored. If due_date is provided, it will update due_date of use_case_questionnaires. ' operationId: CredoAIWeb.API.V2.UseCase.QuestionnaireController.update parameters: - description: use_case id in: path name: use_case_id required: true schema: type: string - description: use_case_questionnaire id in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseQuestionnaireResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - use_case_questionnaires requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseQuestionnaireUpdateRequest' description: attributes components: schemas: UseCaseQuestionnaireSectionEvidenceCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: data: description: value data example: value: This is text evidence type: object generated_at: description: evidence generated time example: '2022-05-03T11:33:25.582138Z' type: string question_id: description: question id type: string required: - question_id - data type: object type: description: The JSON-API resource type example: resource-type type: string type: object type: object TaskResponse: description: A JSON-API document with a single [TaskResource](#taskresource) resource properties: data: $ref: '#/components/schemas/TaskResource' included: description: Included resources items: properties: id: description: The JSON-API resource ID type: string type: description: The JSON-API resource type type: string type: object type: array required: - data type: object SectionFileResponse: description: A JSON-API document with a single [SectionFileResource](#sectionfileresource) resource properties: data: $ref: '#/components/schemas/SectionFileResource' included: description: Included resources items: properties: id: description: The JSON-API resource ID type: string type: description: The JSON-API resource type type: string type: object type: array required: - data type: object TaskResource: description: '' properties: attributes: properties: assigner_id: description: '' type: string completed_at: description: '' type: string due_date: description: '' type: string entity_questionnaire_section_id: description: '' type: string inserted_at: description: '' type: string model_id: description: '' type: string status: description: '' type: string sub_status: description: '' type: string team_ids: description: '' type: string timezone: description: '' type: string type: description: '' type: string updated_at: description: '' type: string use_case_control_id: description: '' type: string use_case_id: description: '' type: string use_case_review_id: description: '' type: string user_ids: description: '' type: string vendor_id: description: '' type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: assigner: properties: data: properties: id: description: Related assigner resource id type: string type: description: Type of related assigner resource type: string type: object type: object entity_questionnaire_section: properties: data: properties: id: description: Related entity_questionnaire_section resource id type: string type: description: Type of related entity_questionnaire_section resource type: string type: object type: object model: properties: data: properties: id: description: Related model resource id type: string type: description: Type of related model resource type: string type: object type: object teams: properties: data: properties: id: description: Related teams resource id type: string type: description: Type of related teams resource type: string type: object type: object use_case: properties: data: properties: id: description: Related use_case resource id type: string type: description: Type of related use_case resource type: string type: object type: object use_case_control: properties: data: properties: id: description: Related use_case_control resource id type: string type: description: Type of related use_case_control resource type: string type: object type: object use_case_review: properties: data: properties: id: description: Related use_case_review resource id type: string type: description: Type of related use_case_review resource type: string type: object type: object users: properties: data: properties: id: description: Related users resource id type: string type: description: Type of related users resource type: string type: object type: object vendor: properties: data: properties: id: description: Related vendor resource id type: string type: description: Type of related vendor resource type: string type: object type: object type: object type: description: The JSON-API resource type example: tasks type: string type: object UseCaseQuestionnaireSectionResponse: description: A JSON-API document with a single [UseCaseQuestionnaireSectionResource](#usecasequestionnairesectionresource) resource properties: data: $ref: '#/components/schemas/UseCaseQuestionnaireSectionResource' included: description: Included resources items: properties: id: description: The JSON-API resource ID type: string type: description: The JSON-API resource type type: string type: object type: array required: - data type: object EvidenceResponse: description: A JSON-API document with a single [EvidenceResource](#evidenceresource) resource properties: data: $ref: '#/components/schemas/EvidenceResource' included: description: Included resources items: properties: id: description: The JSON-API resource ID type: string type: description: The JSON-API resource type type: string type: object type: array required: - data type: object EvidencesResponse: description: A collection of [EvidenceResource](#evidenceresource) properties: data: description: Content with [EvidenceResource](#evidenceresource) objects items: $ref: '#/components/schemas/EvidenceResource' type: array required: - data type: object UseCaseControlTaskCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: team_ids: description: team ids example: '[8zA2nPjVSenyvcc429LPDT]' type: array user_ids: description: user ids example: '[8zA2nPjVSenyvcc429LPDT]' type: array type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string type: description: The JSON-API resource type example: resource-type type: string type: object type: object UseCaseQuestionnaireCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: key: description: questionnaire key example: QUES type: string version: description: quetionnaire version type: integer required: - key - version type: object type: description: The JSON-API resource type example: resource-type type: string type: object type: object SectionFileCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: content: description: Base 64 encoded file content type: string content_type: description: Content type type: string filename: description: File name type: string question_id: description: Question ID type: string size: description: File size type: integer required: - content type: object type: description: The JSON-API resource type example: resource-type type: string type: object type: object EvidenceResource: description: '' properties: attributes: properties: control_key: description: Control key example: FAIR.C1 type: string creator: description: Creator example: family_name: John given_name: Doe nickname: doe type: object data: description: value data, example: value: value type: object entity_id: description: '' type: string generated_at: description: Evidence generation time example: '2015-05-22T14:56:29.000Z' type: string hash_key: description: '' type: string inserted_at: description: insert time example: '2015-05-22T14:56:29.000Z' type: string label: description: label in the evidence requirement example: key: value type: object metadata: description: metadata example: key: value type: object model_id: description: model_id example: 4pEfRTw2RVVrouMbFH9tuH type: string model_version: description: '' type: string type: description: Evidence type example: text type: string use_case_id: description: use_case_id example: 64YUaLWSviHgibJaRWr3ZE type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: asset_links: properties: data: properties: id: description: Related asset_links resource id type: string type: description: Type of related asset_links resource type: string type: object type: object model: properties: data: properties: id: description: Related model resource id type: string type: description: Type of related model resource type: string type: object type: object policy_pack_links: properties: data: properties: id: description: Related policy_pack_links resource id type: string type: description: Type of related policy_pack_links resource type: string type: object type: object type: object type: description: The JSON-API resource type example: evidences type: string type: object UseCaseQuestionnaireSectionsResponse: description: A collection of [UseCaseQuestionnaireSectionResource](#usecasequestionnairesectionresource) properties: data: description: Content with [UseCaseQuestionnaireSectionResource](#usecasequestionnairesectionresource) objects items: $ref: '#/components/schemas/UseCaseQuestionnaireSectionResource' type: array required: - data type: object UseCaseQuestionnairesResponse: description: A collection of [UseCaseQuestionnaireResource](#usecasequestionnaireresource) properties: data: description: Content with [UseCaseQuestionnaireResource](#usecasequestionnaireresource) objects items: $ref: '#/components/schemas/UseCaseQuestionnaireResource' type: array required: - data type: object UseCaseQuestionnaireResponse: description: A JSON-API document with a single [UseCaseQuestionnaireResource](#usecasequestionnaireresource) resource properties: data: $ref: '#/components/schemas/UseCaseQuestionnaireResource' included: description: Included resources items: properties: id: description: The JSON-API resource ID type: string type: description: The JSON-API resource type type: string type: object type: array required: - data type: object ForbiddenError: properties: errors: description: Errors items: properties: code: description: an application-specific error code, expressed as a string value. type: integer detail: description: a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized. type: string title: description: a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. type: string type: object type: array type: object AuthError: properties: errors: description: Errors items: properties: code: description: an application-specific error code, expressed as a string value. type: integer detail: description: a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized. type: string title: description: a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. type: string type: object type: array type: object UseCaseQuestionnaireSectionResource: description: '' properties: attributes: properties: compliances: description: '' type: string entity_id: description: '' type: string inserted_at: description: '' type: string questionnaire_id: description: '' type: string section_id: description: '' type: string status: description: '' type: string updated_at: description: '' type: string use_case_id: description: '' type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: task: properties: data: properties: id: description: Related task resource id type: string type: description: Type of related task resource type: string type: object type: object type: object type: description: The JSON-API resource type example: use_case_questionnaire_sections type: string type: object UseCaseQuestionnaireResource: description: '' properties: attributes: properties: due_date: description: '' type: string entity_id: description: '' type: string inserted_at: description: '' type: string key: description: '' type: string timezone: description: '' type: string updated_at: description: '' type: string use_case_id: description: '' type: string version: description: '' type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: use_case: properties: data: properties: id: description: Related use_case resource id type: string type: description: Type of related use_case resource type: string type: object type: object type: object type: description: The JSON-API resource type example: use_case_questionnaires type: string type: object SectionFileResource: description: '' properties: attributes: properties: content_type: description: '' type: string filename: description: '' type: string id: description: '' type: string inserted_at: description: '' type: string question_id: description: '' type: string section_id: description: '' type: string size: description: '' type: string updated_at: description: '' type: string url: description: '' type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: {} type: object type: description: The JSON-API resource type example: use_case_questionnaire_section_files type: string type: object SectionFilesResponse: description: A page of [SectionFileResponse](#sectionfileresponse) results properties: data: description: Content with [SectionFileResponse](#sectionfileresponse) objects items: $ref: '#/components/schemas/SectionFileResponse' type: array meta: properties: after: description: after cursor for the next page resources type: string before: description: before cursor for the previous page resources type: string limit: description: number of resources limit applied to this request type: integer type: object required: - data type: object NotFoundError: properties: errors: description: Errors items: properties: code: description: an application-specific error code, expressed as a string value. type: integer detail: description: a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized. type: string title: description: a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. type: string type: object type: array type: object UseCaseQuestionnaireUpdateRequest: description: '' properties: data: description: '' properties: attributes: properties: due_date: description: due date example: '2024-01-30T17:00:00.000Z' type: string timezone: description: timezone example: Asia/Seoul type: string version: description: quetionnaire version type: integer type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string type: description: The JSON-API resource type example: resource-type type: string type: object type: object securitySchemes: Bearer: in: header name: Authorization type: apiKey