# Yandex Cloud Registry API, gRPC: ScannerService.GetLast

Returns the last finished ScanResult for the specified artifact.

## gRPC request

**rpc GetLast ([GetLastScanResultRequest](#yandex.cloud.cloudregistry.v1.GetLastScanResultRequest)) returns ([ScanResult](#yandex.cloud.cloudregistry.v1.ScanResult))**

## GetLastScanResultRequest {#yandex.cloud.cloudregistry.v1.GetLastScanResultRequest}

```json
{
  "artifact_id": "string"
}
```

#|
||Field | Description ||
|| artifact_id | **string**

ID of the artifact to get last finished ScanResult.

The maximum string length in characters is 50. ||
|#

## ScanResult {#yandex.cloud.cloudregistry.v1.ScanResult}

```json
{
  "id": "string",
  "artifact_id": "string",
  "scanned_at": "google.protobuf.Timestamp",
  "status": "Status",
  "vulnerabilities": {
    "critical": "int64",
    "high": "int64",
    "medium": "int64",
    "low": "int64",
    "negligible": "int64",
    "undefined": "int64"
  }
}
```

A ScanResult resource.

#|
||Field | Description ||
|| id | **string**

Output only. ID of the ScanResult. ||
|| artifact_id | **string**

Output only. ID of the artifact that the ScanResult belongs to. ||
|| scanned_at | **[google.protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#timestamp)**

Output only. The timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format when the scan been finished. ||
|| status | enum **Status**

Output only. The status of the ScanResult.

- `RUNNING`: Image scan is in progress.
- `READY`: Image has been scanned and result is ready.
- `ERROR`: Image scan is failed.
- `QUEUED`: Image scan is waiting in queue to be processed.
- `CANCELLED`: Image scan was cancelled by user. ||
|| vulnerabilities | **[VulnerabilityStats](#yandex.cloud.cloudregistry.v1.VulnerabilityStats)**

Output only. Summary information about vulnerabilities found. ||
|#

## VulnerabilityStats {#yandex.cloud.cloudregistry.v1.VulnerabilityStats}

A VulnerabilityStats resource.

#|
||Field | Description ||
|| critical | **int64**

Count of CRITICAL vulnerabilities. ||
|| high | **int64**

Count of HIGH vulnerabilities. ||
|| medium | **int64**

Count of MEDIUM vulnerabilities. ||
|| low | **int64**

Count of LOW vulnerabilities. ||
|| negligible | **int64**

Count of NEGLIGIBLE vulnerabilities. ||
|| undefined | **int64**

Count of other vulnerabilities. ||
|#