# 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 of all cloud services the requester can access. Optionally, further filters of specific cloud services, metrics or the compliance status can be specified. Part of the public API, also exposed as REST. operationId: Assessment_ListAssessmentResults parameters: - name: filteredCloudServiceId in: query description: Optional. List only assessment results of a specific cloud service. schema: type: string - name: filteredCompliant in: query description: Optional. List only compliant assessment results. schema: type: boolean - name: filteredMetricId in: query description: Optional. List only assessment results of a specific metric id. schema: type: array items: type: string - name: latestByResourceId in: query description: Optional. Latest results grouped by resource_id. schema: type: boolean - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string - name: orderBy in: query schema: type: string - name: asc in: query schema: type: boolean 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: {} description: AssessEvidenceResponse belongs to AssessEvidence, which uses a custom unary RPC and therefore requires a response message according to the style convention. Since no return values are required, this is empty. 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 resourceTypes: type: array items: type: string description: Resource types nonComplianceComments: type: string description: Some comments on the reason for non-compliance cloudServiceId: type: string description: The cloud service which this assessment result belongs to 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 cloudServiceId: 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: Optional. 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 updatedAt: type: string description: The last time of update format: date-time metricId: type: string description: The metric this configuration belongs to cloudServiceId: type: string description: The service this configuration belongs to 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