- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#body.CreateFeedbackResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#body.aspect_1)
- [UdmQueryFeedback](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#UdmQueryFeedback)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#UdmQueryFeedback.SCHEMA_REPRESENTATION)
- [YLRuleFeedback](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#YLRuleFeedback)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#YLRuleFeedback.SCHEMA_REPRESENTATION)
- [InvestigationFeedback](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#InvestigationFeedback)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#InvestigationFeedback.SCHEMA_REPRESENTATION)
- [FeedbackTarget](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackTarget)
- [FeedbackRating](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackRating)
- [AgentFeedback](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#AgentFeedback)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#AgentFeedback.SCHEMA_REPRESENTATION)
- [ResourceContext](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#ResourceContext)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#ResourceContext.SCHEMA_REPRESENTATION)
- [AgentName](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#AgentName)
- [ItemFeedback](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#ItemFeedback)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#ItemFeedback.SCHEMA_REPRESENTATION)
- [FeedbackContent](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackContent)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackContent.SCHEMA_REPRESENTATION)
- [LookerMigrationFeedback](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#LookerMigrationFeedback)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#LookerMigrationFeedback.SCHEMA_REPRESENTATION)
- [MigrationErrorType](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#MigrationErrorType)
- [FeedbackType](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackType)

**Full name**: projects.locations.instances.createFeedback

RPC to submit user feedback on content generated by AI services.

### HTTP request

`POST https://{endpoint}/v1alpha/{instance}:createFeedback`

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 Chronicle instance associated with the request. Format: projects/{project}/locations/{location}/instances/{instance} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "type": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackType`), "comment": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "udmQueryFeedback": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#UdmQueryFeedback`) }, "ylRuleFeedback": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#YLRuleFeedback`) }, "investigationFeedback": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#InvestigationFeedback`) }, "agentFeedback": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#AgentFeedback`) }, "lookerMigrationFeedback": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#LookerMigrationFeedback`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `type` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackType`)`` Optional. Feedback type. |
| `comment` | `string` Optional. Feedback comment. |
| The feedback metadata associated with the user feedback. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `udmQueryFeedback` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#UdmQueryFeedback`)`` Feedback metadata for UDM query translation. |
| `ylRuleFeedback` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#YLRuleFeedback`)`` Feedback metadata for Yara-L rule translation. |
| `investigationFeedback` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#InvestigationFeedback`)`` Feedback metadata for Investigation and its components. |
| `agentFeedback` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#AgentFeedback`)`` Feedback metadata for an AI Agent's output. |
| `lookerMigrationFeedback` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#LookerMigrationFeedback`)`` Feedback metadata for Looker migration. |
| End of mutually exclusive fields. ||

### Response body

Response message for instances.createFeedback.

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

| JSON representation |
|---|
| ``` { "feedbackId": string } ``` |

| Fields ||
|---|---|
| `feedbackId` | `string` Unique ID for this translation. Currently only used for audit logging purpose only. |

### 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.ais.createFeedback`

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

## UdmQueryFeedback

UdmQueryFeedback contains metadata for the feedback submitted on UDM query translation.

| JSON representation |
|---|
| ``` { "originalInputText": string, "queryLanguage": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.users.searchQueries#QueryLanguage`), "originalOutputQuery": string, "rewrittenQuery": string } ``` |

| Fields ||
|---|---|
| `originalInputText` | `string` Required. The original natural language text used for the translation. |
| `queryLanguage` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.users.searchQueries#QueryLanguage`)`` Optional. The language dialect of the original output and rewritten queries. |
| `originalOutputQuery` | `string` Optional. Original UDM query returned by the translation. |
| `rewrittenQuery` | `string` Optional. Rewritten UDM query (if modified). |

## YLRuleFeedback

YLRuleFeedback contains metadata for the feedback submitted on Yara-L rule translation.

| JSON representation |
|---|
| ``` { "originalInputDescription": string, "originalInputQuery": string, "originalOutputRule": string, "rewrittenRule": string } ``` |

| Fields ||
|---|---|
| `originalInputDescription` | `string` Required. The original natural language description used for the translation. |
| `originalInputQuery` | `string` Optional. The original UDM query used for the rule generation. |
| `originalOutputRule` | `string` Optional. Original Yara-L rule returned by the translation. |
| `rewrittenRule` | `string` Optional. Rewritten Yara-L rule text (if modified). |

## InvestigationFeedback

InvestigationFeedback contains metadata for the feedback submitted on Investigation and its components.

| JSON representation |
|---|
| ``` { "feedbackTarget": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackTarget`), "feedbackRating": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackRating`), "feedbackLabels": [ string ], // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "investigation": string, "investigationStep": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `feedbackTarget` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackTarget`)`` Required. Specifies which part of Investigation being reviewed |
| `feedbackRating` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackRating`)`` Optional. Represents the satisfaction rating |
| `feedbackLabels[]` | `string` Optional. The labels for the feedback. eg. Incorrect Info, Info etc. |
| Target for which the feedback is submitted. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `investigation` | `string` Reference to the investigation. |
| `investigationStep` | `string` Reference to the investigation step. |
| End of mutually exclusive fields. ||

## FeedbackTarget

FeedbackTarget contains the target of the feedback.

| Enums ||
|---|---|
| `FEEDBACK_TARGET_UNSPECIFIED` | The target of the feedback is unknown. |
| `SUMMARY_VERDICT` | The target of the feedback is summary verdict. > [!WARNING] > This item is deprecated! |
| `SUGGESTED_NEXT_STEPS` | The target of the feedback is suggested next steps. |
| `INVESTIGATION_STEP` | The target of the feedback is investigation step. |
| `VERDICT` | The target of the feedback is Verdict |
| `SUMMARY` | The target of the feedback is Summary. |

## FeedbackRating

FeedbackRating contains the rating of the feedback.

| Enums ||
|---|---|
| `FEEDBACK_RATING_UNSPECIFIED` | The rating of the feedback is unknown. |
| `VERY_SATISFIED` | The rating of the feedback is very satisfied. |
| `SOMEWHAT_SATISFIED` | The rating of the feedback is somewhat satisfied. |
| `NEUTRAL` | The rating of the feedback is neutral. |
| `SOMEWHAT_DISSATISFIED` | The rating of the feedback is somewhat dissatisfied. |
| `VERY_DISSATISFIED` | The rating of the feedback is very dissatisfied. |

## AgentFeedback

Represents a generic container for feedback on AI agent outputs.

| JSON representation |
|---|
| ``` { "resourceContext": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#ResourceContext`) }, "agent": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#AgentName`), "feedback": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#ItemFeedback`) } ] } ``` |

| Fields ||
|---|---|
| `resourceContext` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#ResourceContext`)`` Required. Context of the resource the agent was run against. |
| `agent` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#AgentName`)`` Required. Name of agent. |
| `feedback[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#ItemFeedback`)`` Required. Detailed feedback on a specific part of the agent's output. This top-level ItemFeedback can represent the overall feedback or the root of a more complex feedback structure. |

## ResourceContext

Contains context about the primary resource this feedback relates to.

| JSON representation |
|---|
| ``` { "primaryResource": string } ``` |

| Fields ||
|---|---|
| `primaryResource` | `string` Required. Example: For THA, this would be the Case resource name. Format: projects/{project}/locations/{location}/instances/{instance}/cases/{case} |

## AgentName

Represents the different types of agents.

| Enums ||
|---|---|
| `AGENT_NAME_UNKNOWN` | The agent is unknown. |
| `THREAT_HUNT_AGENT` | The agent is a threat hunt agent. |
| `TRIAGE_AGENT` | The agent is a triage agent. |
| `CHAT_AGENT` | The agent is a chat agent. |
| `REPORTING_AGENT` | The agent is a reporting agent. |

## ItemFeedback

Provides feedback on a specific item or component. Items can be nested.

| JSON representation |
|---|
| ``` { "itemId": string, "itemType": string, "content": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackContent`) }, "subItems": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#ItemFeedback`) } ] } ``` |

| Fields ||
|---|---|
| `itemId` | `string` Required. The key or identifier for the item. |
| `itemType` | `string` Required. Type of the item (e.g., "hunt-summary", "hunt-determination", "step-task", "step-query", "step-summary"). |
| `content` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackContent`)`` Optional. The actual feedback content for this specific item. |
| `subItems[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#ItemFeedback`)`` Optional. Optional: Nested feedback for sub-items or sub-components. |

## FeedbackContent

Contains the actual feedback ratings.

| JSON representation |
|---|
| ``` { "rating": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackRating`), "reasonLabels": [ string ] } ``` |

| Fields ||
|---|---|
| `rating` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#FeedbackRating`)`` Optional. Represents the satisfaction rating for the item. |
| `reasonLabels[]` | `string` Optional. The optional reasons for the given rating (multi-select). |

## LookerMigrationFeedback

LookerMigrationFeedback contains metadata for the feedback submitted on Looker to Native Dashboard migration.

| JSON representation |
|---|
| ``` { "lookerDashboard": string, "migrationJobId": string, "nativeDashboard": string, "migrationErrorTypes": [ enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#MigrationErrorType`) ], "contactAllowed": boolean } ``` |

| Fields ||
|---|---|
| `lookerDashboard` | `string` Required. The Looker dashboard. |
| `migrationJobId` | `string` Optional. The migration job ID. |
| `nativeDashboard` | `string` Optional. The native dashboard. |
| `migrationErrorTypes[]` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/createFeedback#MigrationErrorType`)`` Optional. Types of migration errors encountered. |
| `contactAllowed` | `boolean` Optional. Whether the user allows the product team to contact them for follow-up or fix validation. |

## MigrationErrorType

Types of migration errors.

| Enums ||
|---|---|
| `MIGRATION_ERROR_TYPE_UNSPECIFIED` | The migration error type is unspecified. |
| `INACCURATE_FIELD_MAPPING` | Inaccurate field mapping between Looker and native dashboard. |
| `DATA_MISMATCH` | Data mismatch between Looker and native dashboard. |
| `MISSING_OR_BROKEN_WIDGET` | Missing or broken widget in the native dashboard. |
| `FILTER_OR_QUERY_SYNTAX_ERROR` | Filter or query syntax error. |
| `VISUAL_FORMATTING_OR_LAYOUT_ISSUE` | Visual formatting or layout issue. |

## FeedbackType

Feedback types.

| Enums ||
|---|---|
| `FEEDBACK_TYPE_UNKNOWN` | Unknown feedback. |
| `POSITIVE` | Positive feedback. |
| `NEGATIVE` | Negative feedback. |
| `REWRITE` | Negative feedback with a rewritten answer. |
| `DISCARD` | Indicates a generated response was discarded. |