- [HTTP request](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#body.request_body)
- [Response body](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#body.QueryWorkflowInvocationActionsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#body.aspect_1)
- [WorkflowInvocationAction](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#WorkflowInvocationAction)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#WorkflowInvocationAction.SCHEMA_REPRESENTATION)
- [BigQueryAction](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#BigQueryAction)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#BigQueryAction.SCHEMA_REPRESENTATION)
- [NotebookAction](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#NotebookAction)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#NotebookAction.SCHEMA_REPRESENTATION)
- [DataPreparationAction](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#DataPreparationAction)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#DataPreparationAction.SCHEMA_REPRESENTATION)
- [ActionSqlDefinition](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionSqlDefinition)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionSqlDefinition.SCHEMA_REPRESENTATION)
- [ActionErrorTable](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionErrorTable)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionErrorTable.SCHEMA_REPRESENTATION)
- [ActionLoadConfig](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionLoadConfig)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionLoadConfig.SCHEMA_REPRESENTATION)
- [ActionSimpleLoadMode](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionSimpleLoadMode)
- [ActionIncrementalLoadMode](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionIncrementalLoadMode)
  - [JSON representation](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionIncrementalLoadMode.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#State)
- [Try it!](https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#try-it)

Returns WorkflowInvocationActions in a given WorkflowInvocation.

### HTTP request

Choose a location:
<button value="global" default="">global</button> <button value="africa-south1">africa-south1</button> <button value="asia-east1">asia-east1</button> <button value="asia-east2">asia-east2</button> <button value="asia-northeast1">asia-northeast1</button> <button value="asia-northeast2">asia-northeast2</button> <button value="asia-northeast3">asia-northeast3</button> <button value="asia-south1">asia-south1</button> <button value="asia-south2">asia-south2</button> <button value="asia-southeast1">asia-southeast1</button> <button value="asia-southeast2">asia-southeast2</button> <button value="australia-southeast1">australia-southeast1</button> <button value="australia-southeast2">australia-southeast2</button> <button value="europe-central2">europe-central2</button> <button value="europe-north1">europe-north1</button> <button value="europe-southwest1">europe-southwest1</button> <button value="europe-west1">europe-west1</button> <button value="europe-west10">europe-west10</button> <button value="europe-west12">europe-west12</button> <button value="europe-west2">europe-west2</button> <button value="europe-west3">europe-west3</button> <button value="europe-west4">europe-west4</button> <button value="europe-west6">europe-west6</button> <button value="europe-west8">europe-west8</button> <button value="europe-west9">europe-west9</button> <button value="me-central1">me-central1</button> <button value="me-central2">me-central2</button> <button value="me-west1">me-west1</button> <button value="northamerica-northeast1">northamerica-northeast1</button> <button value="northamerica-northeast2">northamerica-northeast2</button> <button value="southamerica-east1">southamerica-east1</button> <button value="southamerica-west1">southamerica-west1</button> <button value="us-central1">us-central1</button> <button value="us-east1">us-east1</button> <button value="us-east4">us-east4</button> <button value="us-east5">us-east5</button> <button value="us-south1">us-south1</button> <button value="us-west1">us-west1</button> <button value="us-west2">us-west2</button> <button value="us-west3">us-west3</button> <button value="us-west4">us-west4</button>   
`GET https://dataform.googleapis.com/v1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query`

<br />

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The workflow invocation's name. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `dataform.workflowInvocations.query` |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. Maximum number of workflow invocations to return. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default. |
| `pageToken` | `string` Optional. Page token received from a previous `workflowInvocations.query` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `workflowInvocations.query`, with the exception of `pageSize`, must match the call that provided the page token. |

### Request body

The request body must be empty.

### Response body

`workflowInvocations.query` response message.

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

| JSON representation |
|---|
| ``` { "workflowInvocationActions": [ { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#WorkflowInvocationAction`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `workflowInvocationActions[]` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#WorkflowInvocationAction`)`` List of workflow invocation actions. |
| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |

### Authorization scopes

Requires one of the following OAuth scopes:

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

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:

- `dataform.workflowInvocations.query`

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

## WorkflowInvocationAction

Represents a single action in a workflow invocation.

| JSON representation |
|---|
| ``` { "target": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) }, "canonicalTarget": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) }, "state": enum (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#State`), "failureReason": string, "invocationTiming": { object (`https://docs.cloud.google.com/dataform/reference/rest/Shared.Types/Interval`) }, // Union field `action` can be only one of the following: "bigqueryAction": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#BigQueryAction`) }, "notebookAction": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#NotebookAction`) }, "dataPreparationAction": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#DataPreparationAction`) } // End of list of possible types for union field `action`. "internalMetadata": string } ``` |

| Fields ||
|---|---|
| `target` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`)`` Output only. This action's identifier. Unique within the workflow invocation. |
| `canonicalTarget` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`)`` Output only. The action's identifier if the project had been compiled without any overrides configured. Unique within the compilation result. |
| `state` | ``enum (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#State`)`` Output only. This action's current state. |
| `failureReason` | `string` Output only. If and only if action's state is FAILED a failure reason is set. |
| `invocationTiming` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/Shared.Types/Interval`)`` Output only. This action's timing details. `startTime` will be set if the action is in \[RUNNING, SUCCEEDED, CANCELLED, FAILED\] state. `endTime` will be set if the action is in \[SUCCEEDED, CANCELLED, FAILED\] state. |
| Union field `action`. The action's details. `action` can be only one of the following: ||
| `bigqueryAction` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#BigQueryAction`)`` Output only. The workflow action's bigquery action details. |
| `notebookAction` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#NotebookAction`)`` Output only. The workflow action's notebook action details. |
| `dataPreparationAction` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#DataPreparationAction`)`` Output only. The workflow action's data preparation action details. |
| `internalMetadata` | `string` Output only. All the metadata information that is used internally to serve the resource. For example: timestamps, flags, status fields, etc. The format of this field is a JSON string. |

## BigQueryAction

Represents a workflow action that will run against BigQuery.

| JSON representation |
|---|
| ``` { "sqlScript": string, "jobId": string } ``` |

| Fields ||
|---|---|
| `sqlScript` | `string` Output only. The generated BigQuery SQL script that will be executed. |
| `jobId` | `string` Output only. The ID of the BigQuery job that executed the SQL in sqlScript. Only set once the job has started to run. |

## NotebookAction

Represents a workflow action that will run against a Notebook runtime.

| JSON representation |
|---|
| ``` { "contents": string, "jobId": string, "filePath": string } ``` |

| Fields ||
|---|---|
| `contents` | `string` Output only. The code contents of a Notebook to be run. |
| `jobId` | `string` Output only. The ID of the Gemini Enterprise Agent Platform job that executed the notebook in contents and also the ID used for the outputs created in Google Cloud Storage buckets. Only set once the job has started to run. |
| `filePath` | `string` Output only. The path to the notebook file in the repository. |

## DataPreparationAction

Represents a workflow action that will run a Data Preparation.

| JSON representation |
|---|
| ``` { "generatedSql": string, "jobId": string, // Union field `definition` can be only one of the following: "contentsYaml": string, "contentsSql": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionSqlDefinition`) } // End of list of possible types for union field `definition`. } ``` |

| Fields ||
|---|---|
| `generatedSql` | `string` Output only. The generated BigQuery SQL script that will be executed. For reference only. |
| `jobId` | `string` Output only. The ID of the BigQuery job that executed the SQL in sqlScript. Only set once the job has started to run. |
| Union field `definition`. The definition for the data preparation. `definition` can be only one of the following: ||
| `contentsYaml` | `string` Output only. YAML representing the contents of the data preparation. Can be used to show the customer what the input was to their workflow. |
| `contentsSql` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionSqlDefinition`)`` SQL definition for a Data Preparation. Contains a SQL query and additional context information. |

## ActionSqlDefinition

Definition of a SQL Data Preparation

| JSON representation |
|---|
| ``` { "query": string, "errorTable": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionErrorTable`) }, "loadConfig": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionLoadConfig`) } } ``` |

| Fields ||
|---|---|
| `query` | `string` The SQL query representing the data preparation steps. Formatted as a Pipe SQL query statement. |
| `errorTable` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionErrorTable`)`` Error table configuration, |
| `loadConfig` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionLoadConfig`)`` Load configuration. |

## ActionErrorTable

Error table information, used to write error data into a BigQuery table.

| JSON representation |
|---|
| ``` { "target": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`) }, "retentionDays": integer } ``` |

| Fields ||
|---|---|
| `target` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/Target`)`` Error Table target. |
| `retentionDays` | `integer` Error table partition expiration in days. Only positive values are allowed. |

## ActionLoadConfig

Simplified load configuration for actions

| JSON representation |
|---|
| ``` { // Union field `mode` can be only one of the following: "replace": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionSimpleLoadMode`) }, "append": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionSimpleLoadMode`) }, "maximum": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionIncrementalLoadMode`) }, "unique": { object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionIncrementalLoadMode`) } // End of list of possible types for union field `mode`. } ``` |

| Fields ||
|---|---|
| Union field `mode`. Load mode `mode` can be only one of the following: ||
| `replace` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionSimpleLoadMode`)`` Replace destination table |
| `append` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionSimpleLoadMode`)`` Append into destination table |
| `maximum` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionIncrementalLoadMode`)`` Insert records where the value exceeds the previous maximum value for a column in the destination table |
| `unique` | ``object (`https://docs.cloud.google.com/dataform/reference/rest/v1/projects.locations.repositories.workflowInvocations/query#ActionIncrementalLoadMode`)`` Insert records where the value of a column is not already present in the destination table |

## ActionSimpleLoadMode

This type has no fields.
Simple load definition

## ActionIncrementalLoadMode

Load definition for incremental load modes

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

| Fields ||
|---|---|
| `column` | `string` Column name for incremental load modes |

## State

Represents the current state of a workflow invocation action.

| Enums ||
|---|---|
| `PENDING` | The action has not yet been considered for invocation. |
| `RUNNING` | The action is currently running. |
| `SKIPPED` | Execution of the action was skipped because upstream dependencies did not all complete successfully. A terminal state. |
| `DISABLED` | Execution of the action was disabled as per the configuration of the corresponding compilation result action. A terminal state. |
| `SUCCEEDED` | The action succeeded. A terminal state. |
| `CANCELLED` | The action was cancelled. A terminal state. |
| `FAILED` | The action failed. A terminal state. |
| `QUEUED` | Execution of the action was queued waiting for an available concurrency slot. |