# Deployment

URL: https://developers.cloud66.com/v3/models/deployment/

Deployments represent the deployment history and operations for your stacks. Each deployment tracks the git commit, trigger source, outcome, and timing information.

<Model>
    <ModelProperty name="id" type="integer">
        The unique identifier of the deployment.
    </ModelProperty>
    <ModelProperty name="triggered_by" type="string">
        The user or system that triggered this deployment.
    </ModelProperty>
    <ModelProperty name="triggered_via" type="object">
        Information about how the deployment was triggered, including code and meaning (web, api, or hook).
    </ModelProperty>
    <ModelProperty name="started_at" type="datetime">
        The date and time when the deployment started, in ISO 8601 format.
    </ModelProperty>
    <ModelProperty name="finished_at" type="datetime">
        The date and time when the deployment finished, in ISO 8601 format.
    </ModelProperty>
    <ModelProperty name="outcome" type="object">
        The deployment outcome, including code and meaning (pending, success, or failed).
    </ModelProperty>
    <ModelProperty name="git_hash" type="string">
        The git commit hash for this deployment.
    </ModelProperty>
    <ModelProperty name="git_ref" type="string">
        The git reference (branch or tag) used for this deployment.
    </ModelProperty>
    <ModelProperty name="deploy_session" type="string">
        The unique session identifier for this deployment.
    </ModelProperty>
    <ModelProperty name="deploy_type" type="object">
        The type of deployment, including code and meaning (build, redeploy, scale, first_build, or revert).
    </ModelProperty>
    <ModelProperty name="is_head" type="boolean">
        Whether this deployment is the current HEAD deployment.
    </ModelProperty>
    <ModelProperty name="is_live" type="boolean">
        Whether this deployment is currently live.
    </ModelProperty>
    <ModelProperty name="reverted" type="boolean">
        Whether this deployment has been reverted.
    </ModelProperty>
    <ModelProperty name="reverted_by" type="string">
        The user who reverted this deployment, if applicable.
    </ModelProperty>
    <ModelProperty name="reverted_at" type="datetime">
        The date and time when this deployment was reverted, in ISO 8601 format.
    </ModelProperty>
    <ModelProperty name="is_deploying" type="boolean">
        Whether this deployment is currently in progress.
    </ModelProperty>
    <ModelProperty name="commit_url" type="string">
        The URL to view the git commit for this deployment.
    </ModelProperty>
    <ModelProperty name="snapshot_uuid" type="string">
        The UUID of the snapshot associated with this deployment.
    </ModelProperty>
</Model>

## Example

```json
{
  "id": 456789,
  "triggered_by": "john@example.com",
  "triggered_via": {
    "code": "web",
    "meaning": "Web Interface"
  },
  "started_at": "2024-02-15T14:30:00Z",
  "finished_at": "2024-02-15T14:45:30Z",
  "outcome": {
    "code": "success",
    "meaning": "Successful"
  },
  "git_hash": "a1b2c3d4e5f6789012345678901234567890abcd",
  "git_ref": "main",
  "deploy_session": "deploy-session-uuid-12345",
  "deploy_type": {
    "code": "redeploy",
    "meaning": "Redeploy"
  },
  "is_head": true,
  "is_live": true,
  "reverted": false,
  "reverted_by": null,
  "reverted_at": null,
  "is_deploying": false,
  "commit_url": "https://github.com/example/repo/commit/a1b2c3d4e5f6789012345678901234567890abcd",
  "snapshot_uuid": "550e8400-e29b-41d4-a716-446655440000"
}
```
