- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#body.RunParserResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#body.aspect_1)
- [ParserLogResult](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParserLogResult)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParserLogResult.SCHEMA_REPRESENTATION)
- [ParsedEvents](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParsedEvents)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParsedEvents.SCHEMA_REPRESENTATION)
- [ParsedEvent](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParsedEvent)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParsedEvent.SCHEMA_REPRESENTATION)
- [StatedumpResult](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#StatedumpResult)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#StatedumpResult.SCHEMA_REPRESENTATION)

**Full name**: projects.locations.instances.logTypes.runParser

logTypes.runParser runs the parser against a log and returns normalized events or any error that occurred during the normalization.

### HTTP request

`POST https://{endpoint}/v1alpha/{logtype}:runParser`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/chronicle/docs/reference/rest#rest_endpoints).

### Path parameters

| Parameters ||
|---|---|
| `logtype` | `string` Required. The logtype of parser or parserExtension. Format: projects/{project}/locations/{location}/instances/{instance}/logTypes/{logtype} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "parser": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parsers#Parser`) }, "parserExtension": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions#ParserExtension`) }, "dynamicParsingConfig": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions#ParserExtension`) }, "log": [ string ], "statedumpAllowed": boolean, "continueOnError": boolean } ``` |

| Fields ||
|---|---|
| `parser` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parsers#Parser`)`` The parser configuration. |
| `parserExtension` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions#ParserExtension`)`` The parser extension configuration. |
| `dynamicParsingConfig` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes.parserExtensions#ParserExtension`)`` Optional. The dynamic parsing config. |
| `log[]` | `string (https://developers.google.com/discovery/v1/type-format format)` sample logs used for while running the parser A base64-encoded string. |
| `statedumpAllowed` | `boolean` Optional. Flag whether the Statedump filter is enabled or not for a config. If enabled, the intermediate state of the parsing will be returned as part of the output. Useful for debugging purposes. |
| `continueOnError` | `boolean` Optional. |

### Response body

Response message for logTypes.runParser.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "runParserResults": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParserLogResult`) } ] } ``` |

| Fields ||
|---|---|
| `runParserResults[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParserLogResult`)`` Results produced after running a parser over log. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/chronicle`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `logtype` resource:

- `chronicle.parsers.runParser`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## ParserLogResult

Result generated when normalizing a log.

| JSON representation |
|---|
| ``` { "log": string, "statedumpResults": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#StatedumpResult`) } ], "parsedFields": { object }, "failedFieldsAndErrors": { object }, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "parsedEvents": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParsedEvents`) }, "error": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/ListOperationsResponse#Status`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `log` | `string (https://developers.google.com/discovery/v1/type-format format)` Log entry. A base64-encoded string. |
| `statedumpResults[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#StatedumpResult`)`` Statedump filter output. |
| `parsedFields` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` |
| `failedFieldsAndErrors` | ``object (`https://protobuf.dev/reference/protobuf/google.protobuf#struct` format)`` |
| parsed result. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `parsedEvents` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParsedEvents`)`` Parsed events when normalizing a log. |
| `error` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/ListOperationsResponse#Status`)`` Error message when normalizing the log. |
| End of mutually exclusive fields. ||

## ParsedEvents

Normalized events generated from a log.

| JSON representation |
|---|
| ``` { "events": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParsedEvent`) } ] } ``` |

| Fields ||
|---|---|
| `events[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.logTypes/runParser#ParsedEvent`)`` Events generated when normalizing the log. |

## ParsedEvent

EventInfo is a wrapper containing a UDM or Entity.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "event": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Collection#UDM`) }, "entity": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Collection#Entity`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `event` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Collection#UDM`)`` A UDM event. |
| `entity` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Collection#Entity`)`` An Entity. |
| End of mutually exclusive fields. ||

## StatedumpResult

StatedumpResult represents statedump filter output generated from a log.

| JSON representation |
|---|
| ``` { "label": string, "statedumpResult": string } ``` |

| Fields ||
|---|---|
| `label` | `string` Label represents a tag for the statedump filter. |
| `statedumpResult` | `string` StatedumpResult represents output for the corresponding label. |