# Generated with protoc-gen-openapi # https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi openapi: 3.0.3 info: title: Assessment API description: |- Representing the link between orchestrator and discovery: Assessing evidences from discovery and sending results to orchestrator version: 0.0.1 paths: /v1/assessment/evidences: post: tags: - Assessment description: |- Assesses the evidence sent by the discovery. Part of the public API, also exposed as REST. operationId: Assessment_AssessEvidence requestBody: content: application/json: schema: $ref: '#/components/schemas/Evidence' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/AssessEvidenceResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' /v1/assessment/results: get: tags: - Assessment description: List all assessment results. Part of the public API, also exposed as REST. operationId: Assessment_ListAssessmentResults parameters: - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/ListAssessmentResultsResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' components: schemas: AssessEvidenceResponse: type: object properties: status: enum: - ASSESSMENT_STATUS_UNSPECIFIED - WAITING_FOR_RELATED - ASSESSED - FAILED type: string format: enum statusMessage: type: string AssessmentResult: type: object properties: id: type: string description: Assessment result id timestamp: type: string description: Time of assessment format: date-time metricId: type: string description: Reference to the metric the assessment was based on metricConfiguration: $ref: '#/components/schemas/MetricConfiguration' compliant: type: boolean description: 'Compliant case: true or false' evidenceId: type: string description: Reference to the assessed evidence resourceId: type: string description: Reference to the resource of the assessed evidence nonComplianceComments: type: string description: Some comments on the reason for non-compliance description: A result resource, representing the result after assessing the cloud resource with id resource_id. Evidence: type: object properties: id: type: string description: the ID in a uuid format timestamp: type: string description: time of evidence creation format: date-time serviceId: type: string description: Reference to a service this evidence was gathered from toolId: type: string description: Reference to the tool which provided the evidence raw: type: string description: Contains the evidence in its original form without following a defined schema, e.g. the raw JSON resource: $ref: '#/components/schemas/GoogleProtobufValue' description: An evidence resource GoogleProtobufAny: type: object properties: '@type': type: string description: The type of the serialized message. additionalProperties: true description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. GoogleProtobufValue: description: Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. ListAssessmentResultsResponse: type: object properties: results: type: array items: $ref: '#/components/schemas/AssessmentResult' nextPageToken: type: string MetricConfiguration: type: object properties: operator: type: string description: The operator to compare the metric, such as == or > targetValue: $ref: '#/components/schemas/GoogleProtobufValue' isDefault: type: boolean description: Whether this configuration is a default configuration description: Defines the operator and a target value for an individual metric Status: type: object properties: code: type: integer description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. format: int32 message: type: string description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. details: type: array items: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).' tags: - name: Assessment