openapi: 3.2.0 info: description: Credo AI server API title: Credo AI server Use Case Controls API servers: - url: /api/v2/credoai tags: - name: use_case_controls description: Operations related to controls for a specific use case paths: /use_cases/{use_case_id}/controls/{control_id}/files/{id}: delete: description: Deletes a specific file associated with a questionnaire control for a given use case. operationId: CredoAIWeb.API.V2.UseCase.ControlFileController.delete 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 control associated with the use case. in: path name: control_id required: true schema: type: string - description: The unique ID of 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_controls /use_cases/{use_case_id}/controls/{control_id}/tasks: post: description: Create a new task for a specific control within a use case. operationId: CredoAIWeb.API.V2.UseCase.ControlController.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 control. in: path name: control_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' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - use_case_controls requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseControlTaskCreateRequest' description: The attributes for the new task. /use_cases/{use_case_id}/risk_control_links/{id}: delete: description: Delete a specific risk control link associated with a use case. operationId: CredoAIWeb.API.V2.UseCase.RiskControlLinkController.delete 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 risk control link 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_controls /use_cases/{use_case_id}/controls/{control_id}/evidences: get: description: Retrieve a list of evidences associated with a specific use case control. operationId: CredoAIWeb.API.V2.UseCase.ControlEvidenceController.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 use case control. in: path name: control_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_controls post: description: Create a new evidence entry for a specified requirement of a use case control. operationId: CredoAIWeb.API.V2.UseCase.ControlEvidenceController.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 use case control. in: path name: control_id required: true schema: type: string responses: '201': 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' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' security: - Bearer: [] summary: '' tags: - use_case_controls requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseControlEvidenceCreateRequest' description: The attributes of the evidence to be created. /use_cases/{use_case_id}/controls/{control_id}/files: get: description: Retrieves a list of all supplementary files associated with a specific questionnaire control for a given use case. operationId: CredoAIWeb.API.V2.UseCase.ControlFileController.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 control associated with the use case. in: path name: control_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/ControlFilesResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' security: - Bearer: [] summary: '' tags: - use_case_controls post: description: Creates a new file associated with a specific questionnaire control for a given use case. operationId: CredoAIWeb.API.V2.UseCase.ControlFileController.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 control associated with the use case. in: path name: control_id required: true schema: type: string responses: '201': description: Created content: application/vnd.api+json: schema: $ref: '#/components/schemas/ControlFileResponse' '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_controls requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/ControlFileCreateRequest' description: The attributes of the file to be created. required: true /use_cases/{use_case_id}/controls/{id}/cookbook: get: description: Retrieve the cookbook associated with a specific control in a use case. operationId: CredoAIWeb.API.V2.UseCase.ControlController.cookbook 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 control. in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseControlCookbookResponse' '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_controls /use_cases/{use_case_id}/controls: get: description: Retrieve a list of controls associated with a specific use case. operationId: CredoAIWeb.API.V2.UseCase.ControlController.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/UseCaseControlsResponse' '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_controls /use_cases/{use_case_id}/control_assignments: post: description: Creates tasks for multiple controls and assigns them to a user or team operationId: CredoAIWeb.API.V2.UseCase.ControlsAssignmentController.create parameters: - description: The unique ID of the use case in: path name: use_case_id required: true schema: type: string responses: '201': description: Created content: application/vnd.api+json: schema: $ref: '#/components/schemas/TasksResponse' '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_controls requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/ControlsAssignmentRequest' description: The task assignment details /use_cases/{use_case_id}/risk_control_links: get: description: Retrieve a list of risk control links associated with a specific use case. operationId: CredoAIWeb.API.V2.UseCase.RiskControlLinkController.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/UseCaseRiskControlLinksResponse' '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_controls post: description: Create a new risk control link for a specified use case. operationId: CredoAIWeb.API.V2.UseCase.RiskControlLinkController.create parameters: - description: The unique ID of the use case. in: path name: use_case_id required: true schema: type: string responses: '201': description: Created content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseRiskControlLinkResponse' '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_controls requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseRiskControlLinkCreateRequest' description: The attributes for the new risk control link. /use_cases/{use_case_id}/controls/{id}: get: description: Fetch detailed information about a specific control within a use case. operationId: CredoAIWeb.API.V2.UseCase.ControlController.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 control. in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseControlResponse' '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_controls patch: description: Update the details of a specific control within a use case. operationId: CredoAIWeb.API.V2.UseCase.ControlController.update 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 control. in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseControlResponse' '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_controls requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseControlUpdateRequest' description: The attributes to update for the control. components: schemas: TasksResponse: description: A collection of [TaskResource](#taskresource) properties: data: description: Content with [TaskResource](#taskresource) objects items: $ref: '#/components/schemas/TaskResource' type: array required: - data type: object UseCaseControlCookbookResource: description: '' properties: attributes: properties: data: 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_control_cookbooks type: string 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 UseCaseControlResource: description: '' properties: attributes: properties: compliances: description: '' type: string control_key: description: '' type: string due_date: description: '' type: string entity_id: description: '' type: string inserted_at: description: '' type: string model_id: description: '' type: string policy_pack_key: description: '' type: string status: description: '' type: string timezone: 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: 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 reviewer: properties: data: properties: id: description: Related reviewer resource id type: string type: description: Type of related reviewer resource type: string type: object type: object 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 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_controls type: string type: object UseCaseControlEvidenceCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: data: description: value data example: value: This is text evidence type: object generated_at: description: '2022-05-03T11:33:25.582138Z' type: string requirement_key: description: evidence requirement key type: string required: - data type: object type: description: The JSON-API resource type example: resource-type type: string type: object type: object UseCaseRiskControlLinkResponse: description: A JSON-API document with a single [UseCaseRiskControlLinkResource](#usecaseriskcontrollinkresource) resource properties: data: $ref: '#/components/schemas/UseCaseRiskControlLinkResource' 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 UseCaseControlsResponse: description: A collection of [UseCaseControlResource](#usecasecontrolresource) properties: data: description: Content with [UseCaseControlResource](#usecasecontrolresource) objects items: $ref: '#/components/schemas/UseCaseControlResource' 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 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 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 UseCaseRiskControlLinkResource: description: '' properties: attributes: properties: control_key: description: '' type: string entity_id: description: '' type: string inserted_at: description: '' type: string risk_id: description: '' type: string use_case_id: description: '' type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: risk: properties: data: properties: id: description: Related risk resource id type: string type: description: Type of related risk resource type: string type: object type: object type: object type: description: The JSON-API resource type example: use_case_risk_control_links type: string type: object ControlsAssignmentRequest: description: A JSON-API document with a single [ControlsAssignmentResource](#controlsassignmentresource) resource properties: data: $ref: '#/components/schemas/ControlsAssignmentResource' 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 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 ControlFileCreateRequest: 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 requirement_key: description: file requirement key 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 UseCaseControlUpdateRequest: description: '' properties: data: description: '' properties: attributes: properties: due_date: description: due date example: '2024-01-30T17:00:00.000Z' type: string team_ids: description: team ids example: '[8zA2nPjVSenyvcc429LPDT]' type: array timezone: description: due date timezone example: America/New_York type: string 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 UseCaseRiskControlLinkCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: control_key: description: '' type: string risk_id: description: '' type: string required: - risk_id - control_key type: object type: description: The JSON-API resource type example: resource-type type: string type: object type: object UseCaseControlCookbookResponse: description: A JSON-API document with a single [UseCaseControlCookbookResource](#usecasecontrolcookbookresource) resource properties: data: $ref: '#/components/schemas/UseCaseControlCookbookResource' 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 ControlFileResponse: description: A JSON-API document with a single [ControlFileResource](#controlfileresource) resource properties: data: $ref: '#/components/schemas/ControlFileResource' 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 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 ControlFileResource: description: '' properties: attributes: properties: content_type: description: '' type: string control_id: description: '' type: string filename: description: '' type: string id: description: '' type: string inserted_at: description: '' type: string requirement_key: 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_control_files type: string type: object UseCaseRiskControlLinksResponse: description: A collection of [UseCaseRiskControlLinkResource](#usecaseriskcontrollinkresource) properties: data: description: Content with [UseCaseRiskControlLinkResource](#usecaseriskcontrollinkresource) objects items: $ref: '#/components/schemas/UseCaseRiskControlLinkResource' 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 UseCaseControlResponse: description: A JSON-API document with a single [UseCaseControlResource](#usecasecontrolresource) resource properties: data: $ref: '#/components/schemas/UseCaseControlResource' 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 ControlsAssignmentResource: description: '' properties: attributes: properties: control_ids: description: string type: string team_id: description: '' type: string user_id: 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: control_assignments type: string type: object ControlFilesResponse: description: A page of [ControlFileResponse](#controlfileresponse) results properties: data: description: Content with [ControlFileResponse](#controlfileresponse) objects items: $ref: '#/components/schemas/ControlFileResponse' 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 securitySchemes: Bearer: in: header name: Authorization type: apiKey