- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#body.LegacyGetAuditDataV2Response.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#body.aspect_1)
- [AuditSettingsRequestTypeEnum](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditSettingsRequestTypeEnum)
- [AuditSettingsResponse](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditSettingsResponse)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditSettingsResponse.SCHEMA_REPRESENTATION)
- [AuditSettingsRequestTypeEnum](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditSettingsRequestTypeEnum_1)
- [AuditData](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditData)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditData.SCHEMA_REPRESENTATION)
- [CountData](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData.SCHEMA_REPRESENTATION)
- [MostActiveUsersCountData](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#MostActiveUsersCountData)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#MostActiveUsersCountData.SCHEMA_REPRESENTATION)

**Full name**: projects.locations.instances.legacySoarAudit.legacyGetAuditDataV2

Retrieves a paginated list of audit logs and statistical data from SecOps. This includes details about user activities, operations performed, and system-wide audit distributions, with support for filtering by users and API keys.

### HTTP request

`POST https://{endpoint}/v1alpha/{instance}/legacySoarAudit:legacyGetAuditDataV2`

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

### Path parameters

| Parameters ||
|---|---|
| `instance` | `string` Required. The name of the parent resource, which is the SecOps instance. Format: `projects/{project}/locations/{location}/instances/{instance}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "pageNumber": integer, "usersNames": [ string ], "apiKeys": [ string ], "auditSettingsRequestType": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditSettingsRequestTypeEnum`) } ``` |

| Fields ||
|---|---|
| `pageNumber` | `integer` Optional. The page number of the audit data. |
| `usersNames[]` | `string` Optional. The users names to get the audit data for. |
| `apiKeys[]` | `string` Optional. The api keys to get the audit data for. |
| `auditSettingsRequestType` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditSettingsRequestTypeEnum`)`` Optional. The type of the audit request. |

### Response body

Response message for LegacySoarAuditService

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

| JSON representation |
|---|
| ``` { "payload": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditSettingsResponse`) } } ``` |

| Fields ||
|---|---|
| `payload` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditSettingsResponse`)`` Required. The AuditSettingsResponse response. |

### 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 `instance` resource:

- `chronicle.legacySoarAudits.legacySoarAudit`

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

## AuditSettingsRequestTypeEnum

Enum that represents the type of the audit settings request.

| Enums ||
|---|---|
| `GROUP` | Group. |
| `COUNT` | Count. |

## AuditSettingsResponse

Message that represents a audit settings response.

| JSON representation |
|---|
| ``` { "auditRecords": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditData`) } ], "operationsDistribution": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData`) } ], "mostCommonOperations": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData`) } ], "mostCommonResulations": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData`) } ], "mostCommonActiveUsers": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#MostActiveUsersCountData`) } ], "mostCommonBrowsers": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData`) } ], "mostCommonAddresses": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData`) } ], "totalCount": integer, "pageSize": integer, "pageNumber": integer, "auditSettingsRequestType": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditSettingsRequestTypeEnum_1`) } ``` |

| Fields ||
|---|---|
| `auditRecords[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditData`)`` Optional. Audit records. |
| `operationsDistribution[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData`)`` Optional. Operations distribution. |
| `mostCommonOperations[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData`)`` Optional. Most common operations. |
| `mostCommonResulations[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData`)`` Optional. Most common regulations. |
| `mostCommonActiveUsers[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#MostActiveUsersCountData`)`` Optional. Most common active users. |
| `mostCommonBrowsers[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData`)`` Optional. Most common browsers. |
| `mostCommonAddresses[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#CountData`)`` Optional. Most common addresses. |
| `totalCount` | `integer` Optional. Total count. |
| `pageSize` | `integer` Optional. Page size. |
| `pageNumber` | `integer` Optional. Page number. |
| `auditSettingsRequestType` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarAudit/legacyGetAuditDataV2#AuditSettingsRequestTypeEnum_1`)`` Optional. Audit settings request type. |

## AuditSettingsRequestTypeEnum

Enum that represents the type of the audit settings request.

| Enums ||
|---|---|
| `GROUP` | Group. |
| `COUNT` | Count. |

## AuditData

Message that represents an audit data.

| JSON representation |
|---|
| ``` { "id": string, "user": string, "userGuid": string, "module": string, "operation": string, "address": string, "browser": string, "screenSize": string, "activityItem": string, "currentActivity": string, "previousActivity": string, "source": string, "creationTimeUnixTimeInMs": string, "modificationTimeUnixTimeInMs": string } ``` |

| Fields ||
|---|---|
| `id` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. The id. |
| `user` | `string` The user name is audited. |
| `userGuid` | `string` Optional. The user guid. |
| `module` | `string` Optional. The module. |
| `operation` | `string` Optional. The operation. |
| `address` | `string` The address. |
| `browser` | `string` The browser. |
| `screenSize` | `string` The screen size. |
| `activityItem` | `string` The activity item. |
| `currentActivity` | `string` Optional. The current activity. |
| `previousActivity` | `string` Optional. The previous activity. |
| `source` | `string` The source. |
| `creationTimeUnixTimeInMs` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. The creation time of the audit data. |
| `modificationTimeUnixTimeInMs` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. The modification time of the audit data. |

## CountData

Message that represents a count data.

| JSON representation |
|---|
| ``` { "name": string, "count": integer, "countLabel": string } ``` |

| Fields ||
|---|---|
| `name` | `string` The name. |
| `count` | `integer` Optional. The count. |
| `countLabel` | `string` Optional. The count label. |

## MostActiveUsersCountData

Message that represents a most active users count data.

| JSON representation |
|---|
| ``` { "userFullName": string, "name": string, "count": integer, "countLabel": string } ``` |

| Fields ||
|---|---|
| `userFullName` | `string` The user full name. |
| `name` | `string` Name of the user. |
| `count` | `integer` Optional. The count. |
| `countLabel` | `string` Optional. The count label. |