openapi: 3.2.0 info: description: Credo AI server API title: Credo AI server Entity Risk Scenarios API servers: - url: /api/v2/credoai tags: - name: entity_risk_scenarios paths: /entities/{entity_id}/risk_scenarios/{id}: delete: description: Deletes the specified risk scenario from the entity. operationId: CredoAIWeb.API.V2.Entity.RiskScenarioController.delete parameters: - description: The ID of the entity. in: path name: entity_id required: true schema: type: string - description: The ID of the risk scenario. 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: - entity_risk_scenarios get: description: Retrieves detailed information about a specific risk scenario associated with the given entity. operationId: CredoAIWeb.API.V2.Entity.RiskScenarioController.show parameters: - description: The ID of the risk scenario. in: path name: id required: true schema: type: string - description: The ID of the entity. in: path name: entity_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/EntityRiskScenarioResponse' '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: - entity_risk_scenarios patch: description: Updates the attributes of an existing risk scenario. operationId: CredoAIWeb.API.V2.Entity.RiskScenarioController.update parameters: - description: The ID of the risk scenario. in: path name: id required: true schema: type: string - description: The ID of the entity. in: path name: entity_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/EntityRiskScenarioResponse' '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: - entity_risk_scenarios requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/EntityRiskScenarioUpdateRequest' description: The updated attributes for the risk scenario. /entities/{entity_id}/risk_scenarios: get: description: Retrieves a paginated list of risk scenarios associated with the specified entity operationId: CredoAIWeb.API.V2.Entity.RiskScenarioController.index parameters: - description: The ID of the entity. in: path name: entity_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/EntityRiskScenariosResponse' '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: - entity_risk_scenarios post: description: 'Creates a new risk scenario for the specified entity. Options include: 1. Creating a new scenario with a name and risk type. 2. Referencing an existing catalog scenario using its ID. ' operationId: CredoAIWeb.API.V2.Entity.RiskScenarioController.create parameters: - description: The ID of the entity. in: path name: entity_id required: true schema: type: string responses: '201': description: Created content: application/vnd.api+json: schema: $ref: '#/components/schemas/EntityRiskScenarioResponse' '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: - entity_risk_scenarios requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/EntityRiskScenarioCreateRequest' description: The attributes for the new risk scenario. components: schemas: EntityRiskScenarioResource: description: '' properties: attributes: properties: description: description: '' type: string entity_id: description: '' type: string inherent_risk: description: '' type: string inherent_risk_impact: description: '' type: string inherent_risk_likelihood: description: '' type: string inserted_at: description: '' type: string name: description: '' type: string residual_risk: description: '' type: string residual_risk_impact: description: '' type: string residual_risk_likelihood: description: '' type: string risk_scenario_id: description: '' type: string risk_type_ids: description: '' type: string updated_at: description: '' type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: risk_control_links: properties: data: properties: id: description: Related risk_control_links resource id type: string type: description: Type of related risk_control_links resource type: string type: object type: object risk_scenario: properties: data: properties: id: description: Related risk_scenario resource id type: string type: description: Type of related risk_scenario resource type: string type: object type: object type: object type: description: The JSON-API resource type example: entity_risk_scenarios 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 EntityRiskScenarioCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: description: description: risk scenario description type: string inherent_risk_impact: description: inherent risk impact(1-5) example: 1 type: integer inherent_risk_likelihood: description: inherent risk likelihood(1-5) example: 1 type: integer name: description: risk scenario name type: string risk_scenario_id: description: risk scenario id example: 8zA2nPjVSenyvcc429LPDT type: string risk_type_ids: description: risk type ids example: - NkBkDB9i64w53eVR6ssfzj type: array type: object type: description: The JSON-API resource type example: resource-type type: string type: object type: object EntityRiskScenariosResponse: description: A collection of [EntityRiskScenarioResource](#entityriskscenarioresource) properties: data: description: Content with [EntityRiskScenarioResource](#entityriskscenarioresource) objects items: $ref: '#/components/schemas/EntityRiskScenarioResource' type: array required: - data type: object EntityRiskScenarioUpdateRequest: description: '' properties: data: description: '' properties: attributes: properties: description: description: risk scenario description type: string inherent_risk_impact: description: inherent risk impact(1-5) example: 1 type: integer inherent_risk_likelihood: description: inherent risk likelihood(1-5) example: 1 type: integer name: description: risk scenario name type: string residual_risk_impact: description: residual risk impact(1-5) example: 1 type: integer residual_risk_likelihood: description: residual risk likelihood(1-5) example: 1 type: integer risk_type_ids: description: risk type ids example: - NkBkDB9i64w53eVR6ssfzj 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 EntityRiskScenarioResponse: description: A JSON-API document with a single [EntityRiskScenarioResource](#entityriskscenarioresource) resource properties: data: $ref: '#/components/schemas/EntityRiskScenarioResource' 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 securitySchemes: Bearer: in: header name: Authorization type: apiKey