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

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

Verifies the given rule text.

### HTTP request

`POST https://{endpoint}/v1/{instance}:verifyRuleText`

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 name of the parent resource, which is the SecOps 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 |
|---|
| ``` { "ruleText": string } ``` |

| Fields ||
|---|---|
| `ruleText` | `string` Required. The rule text to verify as a UTF-8 string. |

### Response body

Response message for instances.verifyRuleText method.

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

| JSON representation |
|---|
| ``` { "success": boolean, "compilationDiagnostics": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1/projects.locations.instances.rules#CompilationDiagnostic`) } ], "allowedRunFrequencies": [ enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1/projects.locations.instances.rules#RunFrequency`) ], "nearRealTimeLiveRuleEligible": boolean, "inputsUsed": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1/projects.locations.instances.rules#InputsUsed`) } } ``` |

| Fields ||
|---|---|
| `success` | `boolean` Whether or not the rule text was successfully verified. |
| `compilationDiagnostics[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1/projects.locations.instances.rules#CompilationDiagnostic`)`` A list of a rule's corresponding compilation diagnostic messages such as compilation errors and compilation warnings. |
| `allowedRunFrequencies[]` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1/projects.locations.instances.rules#RunFrequency`)`` The run frequencies that are allowed for the rule. |
| `nearRealTimeLiveRuleEligible` | `boolean` Indicates whether the rule can run as a near real-time live rule. If this is true, the rule runs as a near real-time live rule when the run frequency is set to LIVE. |
| `inputsUsed` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1/projects.locations.instances.rules#InputsUsed`)`` Optional. The sources of events (if any) used in the 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.rules.verifyRuleText`

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