# REST Resource: projects.locations.instances.logTypes.parserExtensions.validationReports

- [Resource: ValidationReport](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.SCHEMA_REPRESENTATION)
  - [Verdict](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.Verdict)
  - [Stats](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.Stats)
    - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.Stats.SCHEMA_REPRESENTATION)
  - [ParsingValidationErrors](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.ParsingValidationErrors)
    - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.ParsingValidationErrors.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#METHODS_SUMMARY)

## Resource: ValidationReport

ValidationReport describes the validation status of a parser/extension when it was created.

| JSON representation |
|---|
| ``` { "name": string, "verdict": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.Verdict`), "stats": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.Stats`) }, "error": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.ParsingValidationErrors`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. name of the validation report resource. |
| `verdict` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.Verdict`)`` Verdict of the validation. |
| `stats` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.Stats`)`` Stats of the validation. |
| `error` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports#ValidationReport.ParsingValidationErrors`)`` Errors occurred during validation. |

### Verdict

Verdict represents verdict of the parser validation.

| Enums ||
|---|---|
| `VERDICT_UNSPECIFIED` | The verdict is unspecified. |
| `PASS` | The validation has passed. |
| `FAIL` | The validation has failed. |
| `SKIPPED` | Validation was skipped. |

### Stats

Stats represents the statistics generated by running the parser/extension over a set of sample logs.

| JSON representation |
|---|
| ``` { "logEntryCount": string, "successfullyNormalizedLogCount": string, "failedLogCount": string, "invalidLogCount": string, "onErrorCount": string, "eventCount": string, "genericEventCount": string, "eventCategoryCounts": { string: string, ... }, "dropTagCounts": { string: string, ... }, "maxParseDuration": string, "avgParseDuration": string, "normalizationPercentage": string, "genericEventPercentage": string } ``` |

| Fields ||
|---|---|
| `logEntryCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Count of log entries parsed. |
| `successfullyNormalizedLogCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Count of log entries which successfully created valid events. |
| `failedLogCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Count of log entries which failed to create a valid event. |
| `invalidLogCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Count of log entries which were skipped in parsing because they were invalid. |
| `onErrorCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Count of times "on_error" was encountered while parsing. An `on_error` field is used in CBN config to catch an error and handle. `onErrorCount` counts the number of times errors were handled while parsing the logs. |
| `eventCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Count of events generated. |
| `genericEventCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Count of events created of type GENERIC_EVENT. |
| `eventCategoryCounts` | `map (key: string, value: string (https://developers.google.com/discovery/v1/type-format format))` Stats to account for events created. It stores invalid event reasons and the count corresponding to it. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `dropTagCounts` | `map (key: string, value: string (https://developers.google.com/discovery/v1/type-format format))` Stats to account for number of logs dropped. When we drop a log line from parsing, we specify a drop tag. We tag it to identify the reason of drop. `dropTagCounts` stores the reason for drop and the count corresponding to it. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `maxParseDuration` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Max time taken to parse a log entry. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `avgParseDuration` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#duration` format)`` Average parse time taken to parse a log entry. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `"3.5s"`. |
| `normalizationPercentage` | `string (https://developers.google.com/discovery/v1/type-format format)` Percentage of log lines that successfully generated at least 1 valid event. |
| `genericEventPercentage` | `string (https://developers.google.com/discovery/v1/type-format format)` Percentage of events that have eventType as GENERIC_EVENT. |

### ParsingValidationErrors

Validation Errors encountered during parser/extension creation.

| JSON representation |
|---|
| ``` { "parsingErrors": [ string ], "invalidConfigError": string, "hasMoreParsingError": boolean } ``` |

| Fields ||
|---|---|
| `parsingErrors[]` | `string` Any parsing errors encountered while parsing a log entry, this has cap of size 10. |
| `invalidConfigError` | `string` Error for invalid config. |
| `hasMoreParsingError` | `boolean` True, if there are more validation errors. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions.validationReports/get` | Get a validation report. |