# REST Resource: namespaces.executions

- [Resource: Execution](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.executions#Execution)
  - [JSON representation](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.executions#Execution.SCHEMA_REPRESENTATION)
- [ExecutionStatus](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.executions#ExecutionStatus)
  - [JSON representation](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.executions#ExecutionStatus.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.executions#METHODS_SUMMARY)

## Resource: Execution

Execution represents the configuration of a single execution. An execution is an immutable resource that references a container image which is run to completion.

| JSON representation |
|---|
| ``` { "apiVersion": string, "kind": string, "metadata": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/ObjectMeta`) }, "spec": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/ExecutionSpec`) }, "status": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.executions#ExecutionStatus`) } } ``` |

| Fields ||
|---|---|
| `apiVersion` | `string` Optional. APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. |
| `kind` | `string` Optional. Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. |
| `metadata` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/ObjectMeta`)`` Optional. Standard object's metadata. |
| `spec` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/ExecutionSpec`)`` Optional. Specification of the desired behavior of an execution. |
| `status` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.executions#ExecutionStatus`)`` Output only. Current status of an execution. |

## ExecutionStatus

ExecutionStatus represents the current state of an Execution.

| JSON representation |
|---|
| ``` { "observedGeneration": integer, "conditions": [ { object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/Condition`) } ], "startTime": string, "completionTime": string, "runningCount": integer, "succeededCount": integer, "failedCount": integer, "cancelledCount": integer, "retriedCount": integer, "logUri": string } ``` |

| Fields ||
|---|---|
| `observedGeneration` | `integer` Optional. The 'generation' of the execution that was last processed by the controller. |
| `conditions[]` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/Condition`)`` Optional. Conditions communicate information about ongoing/complete reconciliation processes that bring the "spec" inline with the observed state of the world. Execution-specific conditions include: - `ResourcesAvailable`: `True` when underlying resources have been provisioned. - `Started`: `True` when the execution has started to execute. - `Completed`: `True` when the execution has succeeded. `False` when the execution has failed. |
| `startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Represents the time that the execution started to run. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `completionTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Represents the time that the execution was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +optional Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `runningCount` | `integer` Optional. The number of actively running tasks. |
| `succeededCount` | `integer` Optional. The number of tasks which reached phase Succeeded. |
| `failedCount` | `integer` Optional. The number of tasks which reached phase Failed. |
| `cancelledCount` | `integer` Optional. The number of tasks which reached phase Cancelled. |
| `retriedCount` | `integer` Optional. The number of tasks which have retried at least once. |
| `logUri` | `string` Optional. URI where logs for this execution can be found in Cloud Console. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.executions/cancel` | Cancel an execution. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.executions/delete` | Delete an execution. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.executions/get` | Get information about an execution. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.executions/list` | List executions. |