# REST Resource: projects.locations.agents.environments.deployments

- [Resource: Deployment](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments#Deployment)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments#Deployment.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments#State)
- [Result](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments#Result)
  - [JSON representation](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments#Result.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments#METHODS_SUMMARY)

## Resource: Deployment

Represents a deployment in an environment. A deployment happens when a flow version configured to be active in the environment. You can configure running pre-deployment steps, e.g. running validation test cases, experiment auto-rollout, etc.

| JSON representation |
|---|
| ``` { "name": string, "flowVersion": string, "state": enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments#State`), "result": { object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments#Result`) }, "startTime": string, "endTime": string } ``` |

| Fields ||
|---|---|
| `name` | `string` The name of the deployment. Format: projects//locations//agents//environments//deployments/. |
| `flowVersion` | `string` The name of the flow version for this deployment. Format: projects//locations//agents//flows//versions/. |
| `state` | ``enum (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments#State`)`` The current state of the deployment. |
| `result` | ``object (`https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments#Result`)`` Result of the deployment. |
| `startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Start time of this deployment. 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"`. |
| `endTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` End time of this deployment. 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"`. |

## State

The state of the deployment.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | State unspecified. |
| `RUNNING` | The deployment is running. |
| `SUCCEEDED` | The deployment succeeded. |
| `FAILED` | The deployment failed. |

## Result

Result of the deployment.

| JSON representation |
|---|
| ``` { "deploymentTestResults": [ string ], "experiment": string } ``` |

| Fields ||
|---|---|
| `deploymentTestResults[]` | `string` Results of test cases running before the deployment. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`. |
| `experiment` | `string` The name of the experiment triggered by this deployment. Format: projects//locations//agents//environments//experiments/. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments/get` | Retrieves the specified `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments#Deployment`. |
| ### `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments.deployments/list` | Returns the list of all deployments in the specified `https://docs.cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.environments#Environment`. |