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

**Full name**: projects.locations.instances.legacy.legacySearchRuleDetectionCountBuckets

Legacy endpoint for listing detection count buckets for a Rules Engine rule.

### HTTP request

`GET https://{endpoint}/v1alpha/{instance}/legacy:legacySearchRuleDetectionCountBuckets`

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 instance the resource belongs to. Format: projects/{project}/locations/{location}/instances/{instance} |

### Query parameters

| Parameters ||
|---|---|
| `ruleId` | `string` Required. The rule/curated rule ID to return buckets for. |
| `versionTimestamp` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. The version timestamp of the rule. If not specified for a customer rule, buckets will be returned for the latest revision of the rule. Ignored for curated rules. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `timeRange` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Interval`)`` Required. The time range to return buckets for. |
| `bucketSize` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/BucketSize`)`` Required. The bucket size. Only BUCKET_SIZE_DAY is currently supported. |
| `ruleSource` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/RuleSource`)`` Optional. The rule source to return buckets for. If omitted, will default to USER_RULE. Should be consistent with ruleId (USER_RULE for rules, UPPERCASE_RULE for curated rules); otherwise, there could be unexpected behavior. |

### Request body

The request body must be empty.

### Response body

Legacy response with list of found detection count buckets.

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

| JSON representation |
|---|
| ``` { "detectionCountBuckets": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/DetectionCountBucket`) } ] } ``` |

| Fields ||
|---|---|
| `detectionCountBuckets[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/DetectionCountBucket`)`` Detection count buckets for the rule/curated rule. |

### 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.legacies.legacySearchRuleDetectionCountBuckets`

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