- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.rules/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.rules/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.rules/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.rules/list#body.request_body)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.rules/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.rules/list#body.ListRulesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.rules/list#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.rules/list#body.aspect_1)

**Full name**: projects.locations.instances.rules.list

Lists Rules.

### HTTP request

`GET https://{endpoint}/v1beta/{parent}/rules`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent, which owns this collection of rules. Format: `projects/{project}/locations/{location}/instances/{instance}` |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` The maximum number of rules to return. The service may return fewer than this value. If unspecified, at most 100 rules will be returned. The maximum value is 1000, or 5000 if `view` is set to `CONFIG_ONLY`; values above the applicable maximum will be coerced to that maximum. |
| `pageToken` | `string` A page token, received from a previous `rules.list` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `rules.list` must match the call that provided the page token. |
| `view` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/RuleView`)`` view indicates the scope of fields to populate for the Rule being returned. If unspecified, defaults to `BASIC`. Note that the `CONFIG_ONLY` view allows a `pageSize` up to 5000, whereas all other views cap `pageSize` at 1000. |
| `filter` | `string` A filter that can be used to retrieve specific rules. For `BASIC`, `FULL`, and `REVISION_METADATA_ONLY` views, only the following single-restriction HAS (`:`) filters are allowed: `referenceLists:{reference_list_name}` `dataTables:{dataTableName}` `displayName:{displayName}` `ruleOwner:{ruleOwner}` `tags:{tag}` `ruleLanguage:{ruleLanguage}` When `view` is set to `TRENDS` or `CONFIG_ONLY`, full AIP-160 filtering (<https://google.aip.dev/160>) and keyword search are supported across rule fields, with logical operators (`AND`, `OR`, `NOT`) and comparison operators (`:`, `=`, `!=`, `<`, `<=`, `>`, `>=`): `alertingEnabled`, `archived`, `author`, `createTime`, `currentDayDetectionCount`, `dataTables`, `description`, `displayName`, `executionState`, `liveModeEnabled`, `metadata`, `name`, `referenceLists`, `revisionCreateTime`, `ruleLanguage`, `ruleOwner`, `runFrequency`, `severity`, `tags`, `text`, `type`. The supported `ruleLanguage` values are `YARA_L` and `GOOGLE_SQL`. See <https://cloud.google.com/chronicle/docs/detection/unified-rules/search-rules-list> for more details. |
| `orderBy` | `string` Optional. The sort order of the rules. If unspecified, rules will be sorted by revisionCreateTime desc ruleId asc. Sorting is supported on a single field only. Composite sort keys are not supported. See <https://google.aip.dev/132#ordering> for more details. Supported fields: "archived", "alertingEnabled", "author", "createTime", "currentDayDetectionCount", "displayName", "executionState", "liveModeEnabled", "revisionCreateTime", "ruleId", "ruleOwner", "severity", "type". Example: "displayName desc" |
| `skip` | `integer` Optional. The number of rules to skip in the response. When a `skip` value is provided, the API will bypass the specified number of rules before returning results. This allows for arbitrary navigation through the results. If not specified, no rules will be skipped and the API will return results starting from the provided `pageToken`. Skipping is only supported in `TRENDS` view. |

### Request body

The request body must be empty.

### Response body

Response message for rules.list method.

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

| JSON representation |
|---|
| ``` { "rules": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.rules#Rule`) } ], "nextPageToken": string, "totalSize": integer } ``` |

| Fields ||
|---|---|
| `rules[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.rules#Rule`)`` The rules from the specified instance. |
| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `totalSize` | `integer` An estimate of the total number of rules that match the query. This value is only populated when the `view` is `TRENDS`. |

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

- `chronicle.rules.list`

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