# Method: projects.locations.instanceOSPoliciesCompliances.list

- [HTTP request](https://docs.cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.instanceOSPoliciesCompliances/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.instanceOSPoliciesCompliances/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.instanceOSPoliciesCompliances/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.instanceOSPoliciesCompliances/list#body.request_body)
- [Response body](https://docs.cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.instanceOSPoliciesCompliances/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.instanceOSPoliciesCompliances/list#body.ListInstanceOSPoliciesCompliancesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.instanceOSPoliciesCompliances/list#body.aspect)
- [Try it!](https://docs.cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.instanceOSPoliciesCompliances/list#try-it)

> [!WARNING]
> ListInstanceOSPoliciesCompliances is deprecated. Instead, use ListOSPolicyAssignmentReports.

List OS policies compliance data for all Compute Engine VM instances in the specified zone.

### HTTP request

`GET https://osconfig.googleapis.com/v1alpha/{parent=projects/*/locations/*}/instanceOSPoliciesCompliances`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent resource name. Format: `projects/{project}/locations/{location}` For `{project}`, either Compute Engine project-number or project-id can be provided. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` The maximum number of results to return. |
| `pageToken` | `string` A pagination token returned from a previous call to `instanceOSPoliciesCompliances.list` that indicates where this listing should continue from. |
| `filter` | `string` If provided, this field specifies the criteria that must be met by a `InstanceOSPoliciesCompliance` API resource to be included in the response. |

### Request body

The request body must be empty.

### Response body

> [!WARNING]
> This item is deprecated!

A response message for listing OS policies compliance data for all Compute Engine VMs in the given location.

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

| JSON representation |
|---|
| ``` { "instanceOsPoliciesCompliances": [ { object (`https://docs.cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.instanceOSPoliciesCompliances#InstanceOSPoliciesCompliance`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `instanceOsPoliciesCompliances[]` | ``object (`https://docs.cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.instanceOSPoliciesCompliances#InstanceOSPoliciesCompliance`)`` List of instance OS policies compliance objects. |
| `nextPageToken` | `string` The pagination token to retrieve the next page of instance OS policies compliance objects. |

### Authorization scopes

Requires the following OAuth scope:

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

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