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

**Full name**: projects.locations.instances.cases.generateReport

Generates a report for a Case in a specified format (e.g., PDF, HTML). Use this method to create a shareable summary of the case.

### HTTP request

`POST https://{endpoint}/v1alpha/{name}:generateReport`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the Case to generate Report for. Format: projects/{project}/locations/{location}/instances/{instance}/cases/{case} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "caseId": integer, "reportKind": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.cases/generateReport#ReportType`) } ``` |

| Fields ||
|---|---|
| `caseId` | `integer` Required. Case id to generate report for. |
| `reportKind` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.cases/generateReport#ReportType`)`` Required. Report kind. |

### Response body

Response message for cases.generateReport.

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

| JSON representation |
|---|
| ``` { "fileContents": string, "contentType": string } ``` |

| Fields ||
|---|---|
| `fileContents` | `string (https://developers.google.com/discovery/v1/type-format format)` Output only. The content of the report. A base64-encoded string. |
| `contentType` | `string` Output only. The content type of the report. |

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

- `chronicle.cases.generateReport`

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

## ReportType

Report type.

| Enums ||
|---|---|
| `REPORT_TYPE_UNSPECIFIED` | Unspecified report type. |
| `PDF` | PDF report type. |
| `RTF` | RTF report type. |
| `DOC` | DOC report type. |
| `DOCX` | DOCX report type. |
| `HTML` | HTML report type. |
| `XLSX` | XLSX report type. |
| `CSV` | CSV report type. |