Skip to main content

executions

Creates, updates, deletes, gets or lists an executions resource.

Overview

Nameexecutions
TypeResource
Idgoogle.workflowexecutions.executions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The resource name of the execution. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
argumentstringInput parameters of the execution represented as a JSON string. The size limit is 32KB. Note: If you are using the REST API directly to run your workflow, you must escape any JSON string value of argument. Example: '{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'
callLogLevelstringThe call logging level associated to this execution.
createTimestring (google-datetime)Output only. Marks the creation of the execution.
disableConcurrencyQuotaOverflowBufferingbooleanOptional. If set to true, the execution will not be backlogged when the concurrency quota is exhausted. The backlog execution starts when the concurrency quota becomes available.
durationstring (google-duration)Output only. Measures the duration of the execution.
endTimestring (google-datetime)Output only. Marks the end of execution, successful or not.
errorobjectOutput only. The error which caused the execution to finish prematurely. The value is only present if the execution's state is FAILED or CANCELLED. (id: Error)
executionHistoryLevelstringOptional. Describes the execution history level to apply to this execution. If not specified, the execution history level is determined by its workflow's execution history level. If the levels are different, the executionHistoryLevel overrides the workflow's execution history level for this execution.
labelsobjectLabels associated with this execution. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, and dashes. Label keys must start with a letter. International characters are allowed. By default, labels are inherited from the workflow but are overridden by any labels associated with the execution.
resultstringOutput only. Output of the execution represented as a JSON string. The value can only be present if the execution's state is SUCCEEDED.
startTimestring (google-datetime)Output only. Marks the beginning of execution. Note that this will be the same as createTime for executions that start immediately.
statestringOutput only. Current state of the execution.
stateErrorobjectOutput only. Error regarding the state of the Execution resource. For example, this field will have error details if the execution data is unavailable due to revoked KMS key permissions. (id: StateError)
statusobjectOutput only. Status tracks the current steps and progress data of this execution. (id: Status)
workflowRevisionIdstringOutput only. Revision of the workflow this execution is using.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, workflowsId, executionsIdviewReturns an execution of the given name.
listselectprojectsId, locationsId, workflowsIdpageSize, pageToken, view, filter, orderByReturns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).
createinsertprojectsId, locationsId, workflowsIdCreates a new execution using the latest revision of the given workflow. For more information, see Execute a workflow.
cancelexecprojectsId, locationsId, workflowsId, executionsIdCancels an execution of the given name.
export_dataexecprojectsId, locationsId, workflowsId, executionsIdReturns all metadata stored about an execution, excluding most data that is already accessible using other API methods.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
executionsIdstring
locationsIdstring
projectsIdstring
workflowsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
viewstring

SELECT examples

Returns an execution of the given name.

SELECT
name,
argument,
callLogLevel,
createTime,
disableConcurrencyQuotaOverflowBuffering,
duration,
endTime,
error,
executionHistoryLevel,
labels,
result,
startTime,
state,
stateError,
status,
workflowRevisionId
FROM google.workflowexecutions.executions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND workflowsId = '{{ workflowsId }}' -- required
AND executionsId = '{{ executionsId }}' -- required
AND view = '{{ view }}';

INSERT examples

Creates a new execution using the latest revision of the given workflow. For more information, see Execute a workflow.

INSERT INTO google.workflowexecutions.executions (
data__argument,
data__callLogLevel,
data__labels,
data__disableConcurrencyQuotaOverflowBuffering,
data__executionHistoryLevel,
projectsId,
locationsId,
workflowsId
)
SELECT
'{{ argument }}',
'{{ callLogLevel }}',
'{{ labels }}',
{{ disableConcurrencyQuotaOverflowBuffering }},
'{{ executionHistoryLevel }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ workflowsId }}'
RETURNING
name,
argument,
callLogLevel,
createTime,
disableConcurrencyQuotaOverflowBuffering,
duration,
endTime,
error,
executionHistoryLevel,
labels,
result,
startTime,
state,
stateError,
status,
workflowRevisionId
;

Lifecycle Methods

Cancels an execution of the given name.

EXEC google.workflowexecutions.executions.cancel 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@workflowsId='{{ workflowsId }}' --required,
@executionsId='{{ executionsId }}' --required;