# Deployments (https://developer.godaddy.com/en/docs/references/rest/nodejs-hosting/deployments)

***

title: Deployments
description: >-
Publish the latest code, list past deployments, roll back to a previous one,
and probe runtime status.
full: true
\_openapi:
toc:

* depth: 2
  title: List deployments
  url: '#list-deployments'
* depth: 2
  title: Publish app (deploy latest code)
  url: '#publish-app-deploy-latest-code'
* depth: 2
  title: Get app status
  url: '#get-app-status'
* depth: 2
  title: Rollback to a previous deployment
  url: '#rollback-to-a-previous-deployment'
  structuredData:
  headings:
  * content: List deployments
    id: list-deployments
  * content: Publish app (deploy latest code)
    id: publish-app-deploy-latest-code
  * content: Get app status
    id: get-app-status
  * content: Rollback to a previous deployment
    id: rollback-to-a-previous-deployment
    contents: \[]

***

## GET /apps/{appId}/deployments

List deployments

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `appId` | string | yes |  |

### Query parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no |  |

### Responses

**200** — Deployments

Content-Type: `application/json`

Schema:

- object
  - `deployments` (required): array
      - items:
          - `id` (required): string
          - `status` (required): string
            - enum: "pending", "deploying", "deployed", "failed"
          - `gitHash` (required): string
          - `createdAt` (required): string
          - `updatedAt` (required): string
          - `errorMessage`: string
  - `totalCount` (required): integer
  - `hasMore` (required): boolean

**401** — Unauthorized (missing session, invalid API key or Bearer token, or insufficient OAuth scope)

**404** — Not found

**429** — Too many requests. Limit: 60 requests per minute per client IP. X-RateLimit-* headers are returned on successful responses as well.

Content-Type: `application/json`

Schema:

- object
  - `error` (required): string
  - `code` (required): string
    - enum: "RATE_LIMITED"
  - `detail` (required): string

**Security:** requires `oauth2`; scopes `hosting.paas.apps:read`.

## POST /apps/{appId}/deployments

Publish app (deploy latest code)

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `appId` | string | yes |  |

### Responses

**200** — Publish started

Content-Type: `application/json`

Schema:

- object
  - `deploymentId` (required): string
  - `status` (required): string
  - `commitHash`: string

**401** — Unauthorized (missing session, invalid API key or Bearer token, or insufficient OAuth scope)

**404** — Not found

**429** — Too many requests. Limit: 10 requests per minute per client IP. X-RateLimit-* headers are returned on successful responses as well.

Content-Type: `application/json`

Schema:

- object
  - `error` (required): string
  - `code` (required): string
    - enum: "RATE_LIMITED"
  - `detail` (required): string

**Security:** requires `oauth2`; scopes `hosting.paas.deploy:execute`.

## GET /apps/{appId}/status

Get app status

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `appId` | string | yes |  |

### Responses

**200** — App status

Content-Type: `application/json`

Schema:

- object
  - `appStatus` (required): string
  - `variants` (required): array
      - items:
          - `variant` (required): string
          - `status` (required): string
          - `lifecycleState`: string

**401** — Unauthorized (missing session, invalid API key or Bearer token, or insufficient OAuth scope)

**404** — Not found

**429** — Too many requests. Limit: 120 requests per minute per client IP. X-RateLimit-* headers are returned on successful responses as well.

Content-Type: `application/json`

Schema:

- object
  - `error` (required): string
  - `code` (required): string
    - enum: "RATE_LIMITED"
  - `detail` (required): string

**Security:** requires `oauth2`; scopes `hosting.paas.apps:read`.

## POST /apps/{appId}/rollback

Rollback to a previous deployment

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `appId` | string | yes |  |

### Request body (required)

Content-Type: `application/json`

Schema:

- object
  - `deploymentId` (required): string

### Responses

**200** — Rollback started

Content-Type: `application/json`

Schema:

- object
  - `rollbackFrom` (required): string
  - `commitHash` (required): string
  - `deploymentId` (required): string
  - `status` (required): string

**401** — Unauthorized (missing session, invalid API key or Bearer token, or insufficient OAuth scope)

**403** — Rollback not enabled

**404** — Not found

**429** — Too many requests. Limit: 10 requests per minute per client IP. X-RateLimit-* headers are returned on successful responses as well.

Content-Type: `application/json`

Schema:

- object
  - `error` (required): string
  - `code` (required): string
    - enum: "RATE_LIMITED"
  - `detail` (required): string

**Security:** requires `oauth2`; scopes `hosting.paas.deploy:execute`.
