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

**Full name**: projects.locations.instances.integrations.jobs.executeTest

Executes a test run of a `IntegrationJob's Python script. Use this method
to verify background automation logic and connectivity before deploying the
`IntegrationJob\` to an instance for recurring execution.

### HTTP request

`POST https://{endpoint}/v1beta/{parent}/jobs:executeTest`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The resource parent of the IntegrationJob to test. Format: projects/{project}/locations/{location}/instances/{instance}/integrations/{integration}/jobs |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "job": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.integrations.jobs#IntegrationJob`) }, "agentIdentifier": string } ``` |

| Fields ||
|---|---|
| `job` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1beta/projects.locations.instances.integrations.jobs#IntegrationJob`)`` Required. The job that will be tested. |
| `agentIdentifier` | `string` Optional. If the test is being executed on a remote agent, this field includes the agent identifier, else it's null. |

### Response body

Response message for ExecuteTest.

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

| JSON representation |
|---|
| ``` { "output": string, "debugOutput": string, "resultObjectJson": string, "resultName": string, "resultValue": string } ``` |

| Fields ||
|---|---|
| `output` | `string` Required. The script output. |
| `debugOutput` | `string` Required. The script debug output. |
| `resultObjectJson` | `string` Optional. The result json if exists. |
| `resultName` | `string` Optional. The script result. |
| `resultValue` | `string` Optional. The script result value. |

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

- `chronicle.jobs.update`

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