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

**Full name**: projects.locations.instances.legacySoarDashboard.legacyGetOpenedAndClosedCasesTrends

Returns the historical trends of opened versus closed cases over a specified time period. This provides insight into SOC workload and case resolution efficiency.

### HTTP request

`GET https://{endpoint}/v1alpha/{instance}/legacySoarDashboard:legacyGetOpenedAndClosedCasesTrends`

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 to get the opened and closed cases trends for. Format: projects/{project}/locations/{location}/instances/{instance} |

### Query parameters

| Parameters ||
|---|---|
| `timeRangeType` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarDashboard/legacyGetOpenedAndClosedCasesTrends#SearchTimeRangeType`)`` Required. The time range type of the opened and closed cases trends. |

### Request body

The request body must be empty.

### Response body

GetOpenedAndClosedCasesTrendsResponse represents the response for getting opened and closed cases trends.

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.legacySoarDashboard/legacyGetOpenedAndClosedCasesTrends#GetOpenedAndClosedCasesTrends`) } ] } ``` |

| Fields ||
|---|---|
| `payload[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarDashboard/legacyGetOpenedAndClosedCasesTrends#GetOpenedAndClosedCasesTrends`)`` Optional. The id of the 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.legacySoarDashboards.get`

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

## SearchTimeRangeType

SearchTimeRangeType is an enum that represents the time range type for a search.

| Enums ||
|---|---|
| `SEARCH_TIME_RANGE_TYPE_UNSPECIFIED` | Custom time range |
| `LAST_DAY` | Last day |
| `LAST_2_DAYS` | Last 2 days |
| `LAST_3_DAYS` | Last 3 days |
| `LAST_4_DAYS` | Last 4 days |
| `LAST_WEEK` | Last week |
| `LAST_2_WEEKS` | Last 2 weeks |
| `LAST_MONTH` | Last year |
| `LAST_3_MONTHS` | Last 3 months |
| `LAST_6_MONTHS` | Last 6 months |
| `LAST_YEAR` | Last year |
| `LAST_13_MONTHS` | Last 13 months |

## GetOpenedAndClosedCasesTrends

GetOpenedAndClosedCasesTrends represents the opened and closed cases trends.

| JSON representation |
|---|
| ``` { "id": string, "values": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarDashboard/legacyGetOpenedAndClosedCasesTrends#CaseTrendValue`) } ] } ``` |

| Fields ||
|---|---|
| `id` | `string` Optional. The id of the response. |
| `values[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacySoarDashboard/legacyGetOpenedAndClosedCasesTrends#CaseTrendValue`)`` Optional. The values of the response. |

## CaseTrendValue

CaseTrendValue represents the value of a case trend.

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

| Fields ||
|---|---|
| `timestamp` | `string` Optional. The timestamp of the case trend. |
| `count` | `integer` Optional. The count of the case trend. |