openapi: 3.2.0 info: description: Credo AI server API title: Credo AI server Use Case Reviews API servers: - url: /api/v2/credoai tags: - name: use_case_reviews description: Operations related to use case reviews, review actions, tasks and attestations paths: /use_case_reviews/{review_id}/actions: get: description: 'Retrieve a list of all review actions associated with a specific use case review. NOTE: Using this endpoint with review actions of type ''comment'' is DEPRECATED. Please use the comment_threads API endpoints instead for comment functionality: [GET /use_cases/{use_case_id}/comment_threads](#/paths/~1use_cases~1{use_case_id}~1comment_threads/get) ' operationId: CredoAIWeb.API.V2.UseCase.Review.ActionController.index parameters: - description: page after cursor in: query name: page[after] required: false schema: type: string - description: page before cursor in: query name: page[before] required: false schema: type: string - description: page limit in: query name: page[limit] required: false schema: type: integer - description: type match filter in: query name: filter[type] required: false x-example: approve schema: type: string - description: resolved match filter in: query name: filter[resolved] required: false x-example: 'false' schema: type: string - description: deleted match filter in: query name: filter[deleted] required: false x-example: 'false' schema: type: string - description: sort options in: query name: sort required: false x-example: -inserted_at schema: type: string - description: The unique ID of the use case review for which actions are being retrieved. in: path name: review_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseReviewActionsResponse' '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_reviews post: description: 'Create a new review action for the specified use case review. NOTE: Creating review actions of type ''comment'' is DEPRECATED. Please use the comment_threads API endpoints instead for comment functionality: [POST /use_cases/{use_case_id}/comment_threads](#/paths/~1use_cases~1{use_case_id}~1comment_threads/post) and [POST /use_cases/{use_case_id}/comment_threads/{thread_id}/comments](#/paths/~1use_cases~1{use_case_id}~1comment_threads~1{thread_id}~1comments/post) ' operationId: CredoAIWeb.API.V2.UseCase.Review.ActionController.create parameters: - description: The unique ID of the use case review for which a new action is being created. in: path name: review_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseReviewActionResponse' '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_reviews requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseReviewActionCreateRequest' description: The attributes of the review action to be created. /use_case_reviews/{review_id}/snapshot: get: description: Retrieve the snapshot of a specific review. operationId: CredoAIWeb.API.V2.UseCase.ReviewController.show_snapshot parameters: - description: The unique ID of the use case review. in: path name: review_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseSnapshotResponse' '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_reviews /use_case_reviews/{id}: delete: description: Delete a specific review identified by its unique ID. operationId: CredoAIWeb.API.V2.UseCase.ReviewController.delete parameters: - description: The unique ID of the use case review. 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_reviews get: description: Fetch details of a specific review by its unique ID. operationId: CredoAIWeb.API.V2.UseCase.ReviewController.show parameters: - description: The unique ID of the use case review. in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseReviewResponse' '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_reviews patch: description: Update an existing review identified by its ID. operationId: CredoAIWeb.API.V2.UseCase.ReviewController.update parameters: - description: The unique ID of the use case review. 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_reviews requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseReviewUpdateRequest' description: The attributes to update the review. /use_cases/{use_case_id}/reviews: get: description: Retrieve a list of reviews associated with a specific use case. operationId: CredoAIWeb.API.V2.UseCase.ReviewController.index parameters: - description: status match filter in: query name: filter[status] required: false x-example: in_progress schema: type: string - description: sort options in: query name: sort required: false x-example: -inserted_at,status schema: type: string - 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/UseCaseReviewsResponse' '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_reviews post: description: Create a new review for a specified use case. operationId: CredoAIWeb.API.V2.UseCase.ReviewController.create 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/UseCaseReviewResponse' '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_reviews requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseReviewCreateRequest' description: The attributes for the new review. /use_case_reviews/{review_id}/snapshot/workflow_stage: get: description: Retrieve the workflow stage from a specific review's snapshot. operationId: CredoAIWeb.API.V2.UseCase.ReviewController.show_workflow_stage parameters: - description: The unique ID of the use case review. in: path name: review_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseSnapshotResponse' '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_reviews /use_case_reviews/{review_id}/tasks: post: description: Create a new task associated with a specific use case review. operationId: CredoAIWeb.API.V2.UseCase.ReviewController.create_task parameters: - description: The unique ID of the use case review. in: path name: review_id required: true schema: type: string responses: '201': description: OK 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_reviews requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseControlTaskCreateRequest' description: The attributes for the new task. /use_case_review_actions/{id}: delete: description: 'Delete a specific review action. NOTE: Deleting review actions of type ''comment'' is DEPRECATED. Please use the comment_threads API endpoints instead for comment functionality: [DELETE /use_cases/{use_case_id}/comment_threads/{thread_id}](#/paths/~1use_cases~1{use_case_id}~1comment_threads~1{thread_id}/delete) or [DELETE /use_cases/{use_case_id}/comment_threads/{thread_id}/comments/{id}](#/paths/~1use_cases~1{use_case_id}~1comment_threads~1{thread_id}~1comments~1{id}/delete) ' operationId: CredoAIWeb.API.V2.UseCase.Review.ActionController.delete parameters: - description: The unique ID of the review action 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_reviews patch: description: 'Update an existing review action. NOTE: Updating review actions of type ''comment'' is DEPRECATED. Please use the comment_threads API endpoints instead for comment functionality: [PATCH /use_cases/{use_case_id}/comment_threads/{thread_id}](#/paths/~1use_cases~1{use_case_id}~1comment_threads~1{thread_id}/patch) or [PATCH /use_cases/{use_case_id}/comment_threads/{thread_id}/comments/{id}](#/paths/~1use_cases~1{use_case_id}~1comment_threads~1{thread_id}~1comments~1{id}/patch) ' operationId: CredoAIWeb.API.V2.UseCase.Review.ActionController.update parameters: - description: The unique ID of the review action to be updated. in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseReviewActionResponse' '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_reviews requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/UseCaseReviewActionUpdateRequest' description: The attributes to be updated for the review action. components: schemas: UseCaseReviewActionResponse: description: A JSON-API document with a single [UseCaseReviewActionResource](#usecasereviewactionresource) resource properties: data: $ref: '#/components/schemas/UseCaseReviewActionResource' 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 UseCaseSnapshotResource: description: '' properties: attributes: properties: comments: description: comments example: [] type: array controls: description: controls example: [] type: array custom_fields: description: custom_fields example: [] type: array evidences: description: evidences example: [] type: array files: description: files example: [] type: array inserted_at: description: insert time example: '2015-05-22T14:56:29.000Z' type: string model_links: description: model_links example: [] type: array models: description: models example: [] type: array policy_packs: description: policy_packs example: [] type: array questionnaire_sections: description: questionnaire_sections example: [] type: array risk_scenarios: description: risk_scenarios example: [] type: array schema_version: description: '' type: string stakeholders: description: stakeholders example: [] type: array trigger_actions: description: triggered_actions example: [] type: array triggered_actions: description: '' type: string use_case: description: '' type: object use_case_id: description: use_case_id example: 64YUaLWSviHgibJaRWr3ZE type: string vendors: description: vendors example: [] type: array workflow_stage: description: '' type: object 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_snapshots type: string type: object UseCaseReviewCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: due_date: description: due date example: '2024-01-30T17:00:00.000Z' type: string timezone: description: due date timezone example: America/New_York type: string type: object type: description: The JSON-API resource type example: resource-type type: string type: object type: object UseCaseReviewResource: description: '' properties: attributes: properties: due_date: description: '' type: string inserted_at: description: '' type: string review_date: description: '' type: string snapshot_id: description: '' type: string status: description: '' type: string timezone: description: '' type: string updated_at: description: '' type: string use_case_id: description: '' type: string user_id: description: '' type: string workflow_step_type: description: '' type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: actions: properties: data: properties: id: description: Related actions resource id type: string type: description: Type of related actions resource type: string type: object type: object snapshot: properties: data: properties: id: description: Related snapshot resource id type: string type: description: Type of related snapshot resource type: string type: object type: object tasks: properties: data: properties: id: description: Related tasks resource id type: string type: description: Type of related tasks 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 user: properties: data: properties: id: description: Related user resource id type: string type: description: Type of related user resource type: string type: object type: object type: object type: description: The JSON-API resource type example: use_case_reviews type: string type: object UseCaseReviewsResponse: description: A collection of [UseCaseReviewResource](#usecasereviewresource) properties: data: description: Content with [UseCaseReviewResource](#usecasereviewresource) objects items: $ref: '#/components/schemas/UseCaseReviewResource' 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 UseCaseReviewActionsResponse: description: A page of [UseCaseReviewActionResource](#usecasereviewactionresource) results properties: data: description: Content with [UseCaseReviewActionResource](#usecasereviewactionresource) objects items: $ref: '#/components/schemas/UseCaseReviewActionResource' 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 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 UseCaseReviewActionCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: comment: description: comment example: This is a comment type: string tags: description: Tags example: controlKey: FAIR.C1 type: object task_id: description: task id example: y4AsgRJnHGPn6MZXp4uRYe type: string type: description: type enum: - change_request - approve - reject - close_review - comment type: string 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 UseCaseSnapshotResponse: description: A JSON-API document with a single [UseCaseSnapshotResource](#usecasesnapshotresource) resource properties: data: $ref: '#/components/schemas/UseCaseSnapshotResource' 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 UseCaseReviewActionUpdateRequest: description: '' properties: data: description: '' properties: attributes: properties: comment: description: comment type: string resolved: description: resolved type: boolean 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 UseCaseReviewResponse: description: A JSON-API document with a single [UseCaseReviewResource](#usecasereviewresource) resource properties: data: $ref: '#/components/schemas/UseCaseReviewResource' 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 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 UseCaseReviewActionResource: description: '' properties: attributes: properties: comment: description: '' type: string deleted: description: '' type: string inserted_at: description: '' type: string reply_thread_id: description: '' type: string resolved: description: '' type: string review_id: description: '' type: string tags: description: '' type: string task_id: description: '' type: string type: description: '' type: string updated_at: description: '' type: string use_case_id: description: '' type: string user_id: description: '' type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: reply_thread: properties: data: properties: id: description: Related reply_thread resource id type: string type: description: Type of related reply_thread resource type: string type: object type: object review: properties: data: properties: id: description: Related review resource id type: string type: description: Type of related review 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 user: properties: data: properties: id: description: Related user resource id type: string type: description: Type of related user resource type: string type: object type: object type: object type: description: The JSON-API resource type example: use_case_review_actions type: string 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 UseCaseReviewUpdateRequest: description: '' properties: data: description: '' properties: attributes: properties: due_date: description: due date example: '2024-01-30T17:00:00.000Z' type: string review_date: description: review date example: '2024-01-30T17:00:00.000Z' type: string status: description: status enum: - in_progress - closed - approved - rejected type: string timezone: description: due date timezone example: America/New_York type: string 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