# REST Resource: namespaces.revisions

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

## Resource: Revision

Revision is an immutable snapshot of code and configuration. A revision references one or more container images. Revisions are created by updates to a Service.

| 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/RevisionSpec`) }, "status": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions#RevisionStatus`) } } ``` |

| Fields ||
|---|---|
| `apiVersion` | `string` The API version for this call such as "serving.knative.dev/v1". |
| `kind` | `string` The kind of this resource, in this case "Revision". |
| `metadata` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/ObjectMeta`)`` Metadata associated with this Revision, including name, namespace, labels, and annotations. |
| `spec` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/RevisionSpec`)`` Spec holds the desired state of the Revision (from the client). |
| `status` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions#RevisionStatus`)`` Status communicates the observed state of the Revision (from the controller). |

## RevisionStatus

RevisionStatus communicates the observed state of the Revision (from the controller).

| JSON representation |
|---|
| ``` { "observedGeneration": integer, "conditions": [ { object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/Condition`) } ], "logUrl": string, "serviceName": string, "imageDigest": string, "desiredReplicas": integer } ``` |

| Fields ||
|---|---|
| `observedGeneration` | `integer` ObservedGeneration is the 'Generation' of the Revision that was last processed by the controller. Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation, and the Ready condition's status is True or False. |
| `conditions[]` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/Condition`)`` Conditions communicate information about ongoing/complete reconciliation processes that bring the "spec" inline with the observed state of the world. As a Revision is being prepared, it will incrementally update conditions. Revision-specific conditions include: - `ResourcesAvailable`: `True` when underlying resources have been provisioned. - `ContainerHealthy`: `True` when the Revision readiness check completes. - `Active`: `True` when the Revision may receive traffic. |
| `logUrl` | `string` Optional. Specifies the generated logging url for this particular revision based on the revision url template specified in the controller's config. |
| `serviceName` | `string` Not currently used by Cloud Run. |
| `imageDigest` | `string` ImageDigest holds the resolved digest for the image specified within .Spec.Container.Image. The digest is resolved during the creation of Revision. This field holds the digest value regardless of whether a tag or digest was originally specified in the Container object. |
| `desiredReplicas` | `integer` Output only. The configured number of instances running this revision. For Cloud Run, this only includes instances provisioned using the minScale annotation. It does not include instances created by autoscaling. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/delete` | Delete a revision. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get` | Get information about a revision. |
| ### `https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/list` | List revisions. |