- [HTTP request](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules/test.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules/test.md.txt#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules/test.md.txt#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules/test.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules/test.md.txt#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules/test.md.txt#body.TestAutoLabelingRuleResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules/test.md.txt#body.aspect)
- [Try it!](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest/v1alpha1/projects.locations.autoLabelingRules/test.md.txt#try-it)

Tests auto labeling rules against a conversation.

### HTTP request

`POST https://{endpoint}/v1alpha1/{parent=projects/*/locations/*}/autoLabelingRules:test`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/gemini-enterprise-cx/insights/reference/rest.md.txt#rest_endpoints).

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent project and location. Format: projects/{project}/locations/{location} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "conversation": { object (`Conversation`) }, "autoLabelingRule": { object (`AutoLabelingRule`) } } ``` |

| Fields ||
|---|---|
| `conversation` | ``object (`Conversation`)`` Required. Conversation data to test rules against. |
| `autoLabelingRule` | ``object (`AutoLabelingRule`)`` Required. The auto labeling rule to test. |

### Response body

The response message for testing auto labeling rules.

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

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

| Fields ||
|---|---|
| `labelResult` | `string` The result of the test auto labeling rule. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication.md.txt#authorization-gcp).