# Get a deployment

Source: https://openpanel.sh/docs/api/deployments/get-a-deployment

`GET https://openpanel.sh/api/v1/deployments/{deploymentId}`

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `deploymentId` | path | yes | The deployment's id. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | Get a deployment | `application/json`, `Deployment` |
| 401 | No valid credential was sent. | `application/problem+json`, `Problem` |
| 403 | The credential may not do this. | `application/problem+json`, `Problem` |
| 404 | Not found, or not visible to this credential. | `application/problem+json`, `Problem` |
| 422 | The input was refused; detail says why. | `application/problem+json`, `Problem` |
| 429 | Too many requests; wait for Retry-After seconds. | `application/problem+json`, `Problem` |

## Schemas

### Deployment

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "serviceId": {
      "type": "string",
      "format": "uuid"
    },
    "projectId": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "building",
        "deploying",
        "running",
        "failed",
        "superseded",
        "cancelled"
      ]
    },
    "commit": {
      "type": [
        "string",
        "null"
      ]
    },
    "image": {
      "type": [
        "string",
        "null"
      ]
    },
    "config": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {},
      "description": "The service's settings when this deployment was made, and where each replica runs."
    },
    "rollbackOf": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdBy": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "finishedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "id",
    "serviceId",
    "projectId",
    "status",
    "commit",
    "image",
    "config",
    "rollbackOf",
    "error",
    "createdBy",
    "createdAt",
    "finishedAt"
  ]
}
```

### Problem

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "A link to the error's explanation in the docs."
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    },
    "code": {
      "type": "string",
      "description": "Stable machine-readable code: not_found, forbidden, invalid, conflict, rate_limited, not_implemented, …"
    },
    "detail": {
      "type": "string",
      "description": "What went wrong, in a sentence written for a person."
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "code",
    "detail"
  ]
}
```