---
title: Deployments
description: API reference for Deployments endpoints.
product: Reference
url: https://docs.digitalocean.com/reference/paperspace/api-reference/deployments/
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# Deployments

Generated on 17 Nov 2026

Base URL `https://api.paperspace.com/v1`

## Endpoints

- **GET** [Get a deployment](#deployments-get)
- **DELETE** [Delete a deployment](#deployments-delete)
- **GET** [List deployments](#deployments-list)
- **POST** [Upsert a deployment](#deployments-upsert)
- **GET** [List deployment runs](#deploymentRuns-get)
- **GET** [List deployment metrics](#deploymentMetrics-get)
- **GET** [List deployment logs](#deploymentLogs-list)
- **GET** [List deployment history](#deploymentHistory-list)
- **GET** [List a project's deployments](#projectDeployments-list)

## GET Get a deployment

`/deployments/{id}`

**Authorizations: BearerAuth**

Http: Bearer

An API key or access token

Fetches a single deployment by deployment ID.

#### Path Parameters

`id` string (uuid) required

The ID of the deployment to fetch

##### Request: `/deployments/{id}`

### cURL

```bash
curl -X GET \
  -H "Authorization: Bearer $API_TOKEN" \
  "https://api.paperspace.com/v1/deployments/{id}"
```

#### Responses

**200** Successful response

Response Schema: `application/json`

`basicAuthKey` string optional Nullable

The endpoint security key for the deployment

`dtCreated` string (date-time) required

The date the deployment was created

`endpoint` string required

The unique endpoint for the deployment

`id` string required

The ID of the deployment

`latestSpec` object optional Nullable

The latest deployment configuration. If invalid, null is returned.

**Show child properties**

`data` anyOf optional Nullable

The data for the deployment spec

One of:

**Option 1**

`apiVersion` string, one of: v0alpha0 required

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

**Show child properties**

`name` string required

`value` string required

`healthChecks` object optional

**Show child properties**

`liveness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`readiness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`startup` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`models` array of object optional

**Show child properties**

`id` string required

`path` string optional

`name` string required

`port` number optional

`region` string, one of: ny2, ca1, ams1 optional

`repositories` object optional

**Show child properties**

`dataset` string required

`mountPath` string optional

`repositories` array of object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`resources` object required

**Show child properties**

`autoscaling` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`instanceType` string required

`replicas` number optional

**Option 2**

`apiVersion` string, one of: v0alpha1 required

`basicAuthKey` string optional

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

**Show child properties**

`name` string required

`value` string required

`healthChecks` object optional

**Show child properties**

`liveness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`readiness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`startup` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthchecks` object optional

**Show child properties**

`liveness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`readiness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`startup` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`integrations` array of anyOf optional

`name` string required

`region` string, one of: ny2, ca1, ams1 optional

`resources` object required

**Show child properties**

`autoscaling` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`machineType` string required

`ports` array of number required

`replicas` number optional

**Option 3**

`apiVersion` string, one of: v1, latest required

`basicAuthKey` string optional

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

**Show child properties**

`name` string required

`value` string required

`healthChecks` object optional

**Show child properties**

`liveness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`readiness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`startup` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthchecks` object optional

**Show child properties**

`liveness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`readiness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`startup` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`integrations` array of anyOf optional

`name` string required

`region` string, one of: ny2, ca1, ams1 optional

`resources` object required

**Show child properties**

`autoscaling` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`machineType` string required

`ports` array of number required

`replicas` number optional

`deploymentId` string required

The ID of the deployment the spec belongs to

`dtHealthy` string (date-time) optional Nullable

The date the deployment was marked "healthy"

`error` string optional Nullable

The fatal configuration error. Only present if the cluster was unable to apply the entire deployment configuration. This is not the same as an instance error.

`externalApplied` string (date-time) optional Nullable

The date the deployment configuration was applied to the cluster

`id` string required

The ID of the deployment spec

`metadata` object optional Nullable

Metadata about the source of the configuration

**Show child properties**

`gitHeaders` object optional

**Show child properties**

`x-git-actor` string required

`x-git-host` string, one of: github, gitlab required

`x-git-owner` string required

`x-git-ref` string required

`x-git-repo` string required

`x-git-sha` string required

`userId` string required

The ID of the user the deployment belongs to

`latestSpecHash` string optional Nullable

The last version hash for the deployment

`name` string required

The name of the deployment

`projectId` string required

The ID of the project the deployment belongs to

`teamId` string required

The ID of the team the deployment belongs to

**default** Error response

Response Schema: `application/json`

`code` string required

`details` object optional

`message` string required

##### Response

**200**

```json
{
  "basicAuthKey": "string",
  "dtCreated": "2019-08-24T14:15:22Z",
  "endpoint": "string",
  "id": "string",
  "latestSpec": {
    "data": {
      "apiVersion": "v0alpha0",
      "command": [],
      "containerRegistry": "string",
      "enabled": true,
      "env": [],
      "image": "string",
      "models": [],
      "name": "string",
      "port": 80,
      "region": "ny2"
    },
    "deploymentId": "string",
    "dtHealthy": "2019-08-24T14:15:22Z",
    "error": "string",
    "externalApplied": "2019-08-24T14:15:22Z",
    "id": "string",
    "userId": "string"
  },
  "latestSpecHash": "string",
  "name": "string",
  "projectId": "string",
  "teamId": "string"
}
```

**default**

```json
{
  "code": "string",
  "message": "string"
}
```

* * *

## DELETE Delete a deployment

`/deployments/{id}`

Deletes a deployment by deployment ID.

#### Path Parameters

`id` string (uuid) required

The ID of the deployment to delete

##### Request: `/deployments/{id}`

### cURL

```bash
curl -X DELETE \
  -H "Authorization: Bearer $API_TOKEN" \
  "https://api.paperspace.com/v1/deployments/{id}"
```

#### Responses

**200** Successful response

Response Schema: `application/json`

`id` string required

The ID of the deleted deployment

**default** Error response

Response Schema: `application/json`

`code` string required

`details` object optional

`message` string required

##### Response

**200**

```json
{
  "id": "string"
}
```

**default**

```json
{
  "code": "string",
  "message": "string"
}
```

* * *

## GET List deployments

`/deployments`

Fetches a list of deployments for a logged in user.

#### Query Parameters

`after` string optional

Fetch the next page of results after this cursor.

`limit` integer 1 – 120 optional

The number of items to fetch after this page.

`orderBy` string, one of: dtCreated optional

Order results by one of these fields.

Default: `dtCreated`

`order` string, one of: asc, desc optional

The order to sort the results by.

Default: `desc`

##### Request: `/deployments`

### cURL

```bash
curl -X GET \
  -H "Authorization: Bearer $API_TOKEN" \
  "https://api.paperspace.com/v1/deployments"
```

#### Responses

**200** Successful response

Response Schema: `application/json`

`hasMore` boolean required

Whether there are more pages of results available.

`items` array of object required

The items on this page.

**Show child properties**

`basicAuthKey` string optional Nullable

The endpoint security key for the deployment

`dtCreated` string (date-time) required

The date the deployment was created

`endpoint` string required

The unique endpoint for the deployment

`id` string required

The ID of the deployment

`latestSpec` object optional Nullable

The latest deployment configuration. If invalid, null is returned.

**Show child properties**

`data` anyOf optional Nullable

The data for the deployment spec

One of:

**Option 1**

`apiVersion` string, one of: v0alpha0 required

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthChecks` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`models` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`name` string required

`port` number optional

`region` string, one of: ny2, ca1, ams1 optional

`repositories` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`resources` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

**Option 2**

`apiVersion` string, one of: v0alpha1 required

`basicAuthKey` string optional

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthChecks` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthchecks` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`integrations` array of anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`name` string required

`region` string, one of: ny2, ca1, ams1 optional

`resources` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

**Option 3**

`apiVersion` string, one of: v1, latest required

`basicAuthKey` string optional

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthChecks` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthchecks` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`integrations` array of anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`name` string required

`region` string, one of: ny2, ca1, ams1 optional

`resources` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`deploymentId` string required

The ID of the deployment the spec belongs to

`dtHealthy` string (date-time) optional Nullable

The date the deployment was marked "healthy"

`error` string optional Nullable

The fatal configuration error. Only present if the cluster was unable to apply the entire deployment configuration. This is not the same as an instance error.

`externalApplied` string (date-time) optional Nullable

The date the deployment configuration was applied to the cluster

`id` string required

The ID of the deployment spec

`metadata` object optional Nullable

Metadata about the source of the configuration

**Show child properties**

`gitHeaders` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`userId` string required

The ID of the user the deployment belongs to

`latestSpecHash` string optional Nullable

The last version hash for the deployment

`name` string required

The name of the deployment

`projectId` string required

The ID of the project the deployment belongs to

`teamId` string required

The ID of the team the deployment belongs to

`nextPage` string optional

The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page.

**default** Error response

Response Schema: `application/json`

`code` string required

`details` object optional

`message` string required

##### Response

**200**

```json
{
  "hasMore": true,
  "items": [
    {
      "basicAuthKey": "string",
      "dtCreated": "2019-08-24T14:15:22Z",
      "endpoint": "string",
      "id": "string",
      "latestSpecHash": "string",
      "name": "string",
      "projectId": "string",
      "teamId": "string"
    }
  ],
  "nextPage": "string"
}
```

**default**

```json
{
  "code": "string",
  "message": "string"
}
```

* * *

## POST Upsert a deployment

`/deployments`

Submit a new deployment configuration. If a deployment does not exist, one is created. Otherwise, a deployment is updated with new configuration.

#### Request Body: `application/json`

`config` anyOf required

The deployment configuration

One of:

**Option 1**

`apiVersion` string, one of: v0alpha0 required

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

**Show child properties**

`name` string required

`value` string required

`healthChecks` object optional

**Show child properties**

`liveness` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`readiness` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`startup` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`image` string required

`models` array of object optional

**Show child properties**

`id` string required

`path` string optional

`name` string required

`port` number optional

`region` string, one of: ny2, ca1, ams1 optional

`repositories` object optional

**Show child properties**

`dataset` string required

`mountPath` string optional

`repositories` array of object required

**Show child properties**

`name` string required

`password` string optional

`ref` string optional

`url` string required

`username` string optional

`resources` object required

**Show child properties**

`autoscaling` object optional

**Show child properties**

`enabled` boolean optional

`maxReplicas` number required

`metrics` array of anyOf required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`instanceType` string required

`replicas` number optional

**Option 2**

`apiVersion` string, one of: v0alpha1 required

`basicAuthKey` string optional

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

**Show child properties**

`name` string required

`value` string required

`healthChecks` object optional

**Show child properties**

`liveness` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`readiness` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`startup` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`healthchecks` object optional

**Show child properties**

`liveness` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`readiness` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`startup` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`image` string required

`integrations` array of anyOf optional

`name` string required

`region` string, one of: ny2, ca1, ams1 optional

`resources` object required

**Show child properties**

`autoscaling` object optional

**Show child properties**

`enabled` boolean optional

`maxReplicas` number required

`metrics` array of anyOf required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`machineType` string required

`ports` array of number required

`replicas` number optional

**Option 3**

`apiVersion` string, one of: v1, latest required

`basicAuthKey` string optional

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

**Show child properties**

`name` string required

`value` string required

`healthChecks` object optional

**Show child properties**

`liveness` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`readiness` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`startup` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`healthchecks` object optional

**Show child properties**

`liveness` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`readiness` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`startup` anyOf optional

One of:

**Option 1**

`failureThreshold` number optional

`headers` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`host` string optional

`initialDelaySeconds` number optional

`path` string required

`periodSeconds` number optional

`port` number optional

`timeoutSeconds` number optional

**Option 2**

`exec` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`failureThreshold` number optional

`initialDelaySeconds` number optional

`periodSeconds` number optional

`timeoutSeconds` number optional

`image` string required

`integrations` array of anyOf optional

`name` string required

`region` string, one of: ny2, ca1, ams1 optional

`resources` object required

**Show child properties**

`autoscaling` object optional

**Show child properties**

`enabled` boolean optional

`maxReplicas` number required

`metrics` array of anyOf required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`machineType` string required

`ports` array of number required

`replicas` number optional

`deploymentId` string optional Nullable

The ID of the deployment to update.

`projectId` string required

The project ID to deploy resources under.

##### Request: `/deployments`

### Payload

Content type `application/json`

```json
{
  "config": {
    "apiVersion": "v0alpha0",
    "command": [
      "string"
    ],
    "containerRegistry": "string",
    "enabled": true,
    "env": [],
    "image": "string",
    "models": [],
    "name": "string",
    "port": 80,
    "region": "ny2",
    "repositories": {
      "dataset": "string",
      "mountPath": "string",
      "repositories": []
    },
    "resources": {
      "instanceType": "string",
      "replicas": 1
    }
  },
  "deploymentId": "string",
  "projectId": "string"
}
```

### cURL

```bash
curl -X POST \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "config": {
    "apiVersion": "v0alpha0",
    "command": [
      "string"
    ],
    "containerRegistry": "string",
    "enabled": true,
    "env": [],
    "image": "string",
    "models": [],
    "name": "string",
    "port": 80,
    "region": "ny2",
    "repositories": {
      "dataset": "string",
      "mountPath": "string",
      "repositories": []
    },
    "resources": {
      "instanceType": "string",
      "replicas": 1
    }
  },
  "deploymentId": "string",
  "projectId": "string"
}' \
  "https://api.paperspace.com/v1/deployments"
```

#### Responses

**200** Successful response

Response Schema: `application/json`

`deploymentId` string required

The ID of the deployment

**default** Error response

Response Schema: `application/json`

`code` string required

`details` object optional

`message` string required

##### Response

**200**

```json
{
  "deploymentId": "string"
}
```

**default**

```json
{
  "code": "string",
  "message": "string"
}
```

* * *

## GET List deployment runs

`/deployments/{id}/runs`

Lists the active deployment runs for a deployment.

#### Path Parameters

`id` string (uuid) required

The ID of the deployment to fetch

#### Query Parameters

`limit` number optional

The latest n number of deployment runs to return

Default: `10`

##### Request: `/deployments/{id}/runs`

### cURL

```bash
curl -X GET \
  -H "Authorization: Bearer $API_TOKEN" \
  "https://api.paperspace.com/v1/deployments/{id}/runs"
```

#### Responses

200

Successful response

**default** Error response

Response Schema: `application/json`

`code` string required

`details` object optional

`message` string required

##### Response

**200**

```json
[
  {
    "availableReplicas": 0,
    "id": "string",
    "instances": [],
    "readyReplicas": 0,
    "replicas": 0
  }
]
```

**default**

```json
{
  "code": "string",
  "message": "string"
}
```

* * *

## GET List deployment metrics

`/deployments/{id}/metrics`

Lists metrics for a given deployment.

#### Path Parameters

`id` string (uuid) required

The ID of the deployment to fetch

#### Query Parameters

`metric` anyOf required

The metric to fetch.

`timeframe` string, one of: hour, 12_hours, day, 1_week, 2_weeks optional

The time frame for the metrics request.

##### Request: `/deployments/{id}/metrics`

### cURL

```bash
curl -X GET \
  -H "Authorization: Bearer $API_TOKEN" \
  "https://api.paperspace.com/v1/deployments/{id}/metrics?metric={metric}"
```

#### Responses

**200** Successful response

Response Schema: `application/json`

### Option 1

`timestamp` string (date-time) required

`value` string required

**default** Error response

Response Schema: `application/json`

`code` string required

`details` object optional

`message` string required

##### Response

**200**

```json
{
  "timestamp": "2019-08-24T14:15:22Z",
  "value": "string"
}
```

**default**

```json
{
  "code": "string",
  "message": "string"
}
```

* * *

## GET List deployment logs

`/deployments/{id}/logs`

Lists logs for a given deployment.

#### Path Parameters

`id` string (uuid) required

The ID of the deployment

#### Query Parameters

`after` string optional

Fetch the next page of results after this cursor.

`limit` integer 1 – 120 optional

The number of items to fetch after this page.

`orderBy` string, one of: dtCreated optional

Order results by one of these fields.

Default: `dtCreated`

`order` string, one of: asc, desc optional

The order to sort the results by.

Default: `desc`

`instanceId` string optional

Get the logs for a particular instance ID

##### Request: `/deployments/{id}/logs`

### cURL

```bash
curl -X GET \
  -H "Authorization: Bearer $API_TOKEN" \
  "https://api.paperspace.com/v1/deployments/{id}/logs"
```

#### Responses

**200** Successful response

Response Schema: `application/json`

`hasMore` boolean required

Whether there are more pages of results available.

`items` array of object required

The items on this page.

**Show child properties**

`dtCreated` string (date-time) required

The date the log was created.

`id` string required

ID of the log item

`instanceId` string optional Nullable

The instance ID the log is associated with.

`jobId` string required

The associated job ID of the log item.

`message` string required

The message of the log item.

`uuid` string optional Nullable

UUID representing the log item

`nextPage` string optional

The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page.

**default** Error response

Response Schema: `application/json`

`code` string required

`details` object optional

`message` string required

##### Response

**200**

```json
{
  "hasMore": true,
  "items": [
    {
      "dtCreated": "2019-08-24T14:15:22Z",
      "id": "string",
      "instanceId": "string",
      "jobId": "string",
      "message": "string",
      "uuid": "string"
    }
  ],
  "nextPage": "string"
}
```

**default**

```json
{
  "code": "string",
  "message": "string"
}
```

* * *

## GET List deployment history

`/deployments/{id}/history`

Lists history for a given deployment.

#### Path Parameters

`id` string (uuid) required

The ID of the deployment

#### Query Parameters

`after` string optional

Fetch the next page of results after this cursor.

`limit` integer 1 – 120 optional

The number of items to fetch after this page.

`orderBy` string, one of: dtCreated optional

Order results by one of these fields.

Default: `dtCreated`

`order` string, one of: asc, desc optional

The order to sort the results by.

Default: `desc`

##### Request: `/deployments/{id}/history`

### cURL

```bash
curl -X GET \
  -H "Authorization: Bearer $API_TOKEN" \
  "https://api.paperspace.com/v1/deployments/{id}/history"
```

#### Responses

**200** Successful response

Response Schema: `application/json`

`hasMore` boolean required

Whether there are more pages of results available.

`items` array of object required

The items on this page.

**Show child properties**

`data` anyOf optional Nullable

The data for the deployment spec

One of:

**Option 1**

`apiVersion` string, one of: v0alpha0 required

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

**Show child properties**

`name` string required

`value` string required

`healthChecks` object optional

**Show child properties**

`liveness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`readiness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`startup` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`models` array of object optional

**Show child properties**

`id` string required

`path` string optional

`name` string required

`port` number optional

`region` string, one of: ny2, ca1, ams1 optional

`repositories` object optional

**Show child properties**

`dataset` string required

`mountPath` string optional

`repositories` array of object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`resources` object required

**Show child properties**

`autoscaling` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`instanceType` string required

`replicas` number optional

**Option 2**

`apiVersion` string, one of: v0alpha1 required

`basicAuthKey` string optional

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

**Show child properties**

`name` string required

`value` string required

`healthChecks` object optional

**Show child properties**

`liveness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`readiness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`startup` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthchecks` object optional

**Show child properties**

`liveness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`readiness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`startup` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`integrations` array of anyOf optional

`name` string required

`region` string, one of: ny2, ca1, ams1 optional

`resources` object required

**Show child properties**

`autoscaling` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`machineType` string required

`ports` array of number required

`replicas` number optional

**Option 3**

`apiVersion` string, one of: v1, latest required

`basicAuthKey` string optional

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

**Show child properties**

`name` string required

`value` string required

`healthChecks` object optional

**Show child properties**

`liveness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`readiness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`startup` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthchecks` object optional

**Show child properties**

`liveness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`readiness` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`startup` anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`integrations` array of anyOf optional

`name` string required

`region` string, one of: ny2, ca1, ams1 optional

`resources` object required

**Show child properties**

`autoscaling` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`machineType` string required

`ports` array of number required

`replicas` number optional

`deploymentId` string required

The ID of the deployment the spec belongs to

`dtHealthy` string (date-time) optional Nullable

The date the deployment was marked "healthy"

`error` string optional Nullable

The fatal configuration error. Only present if the cluster was unable to apply the entire deployment configuration. This is not the same as an instance error.

`externalApplied` string (date-time) optional Nullable

The date the deployment configuration was applied to the cluster

`id` string required

The ID of the deployment spec

`metadata` object optional Nullable

Metadata about the source of the configuration

**Show child properties**

`gitHeaders` object optional

**Show child properties**

`x-git-actor` string required

`x-git-host` string, one of: github, gitlab required

`x-git-owner` string required

`x-git-ref` string required

`x-git-repo` string required

`x-git-sha` string required

`userId` string required

The ID of the user the deployment belongs to

`workflowRun` object optional Nullable

**Show child properties**

`dtCreated` string (date-time) optional Nullable

When the workflow run was created

`dtFinished` string (date-time) optional Nullable

When the workflow run finished

`dtStarted` string (date-time) optional Nullable

When the workflow run started

`id` string (uuid) required

The ID of the workflow run

`message` string optional Nullable

The message of the workflow run

`phase` string (enum) required

The phase of the workflow run

`workflow` object required

**Show child properties**

`dtCreated` string (date-time) optional Nullable

When the workflow was created

`id` string (uuid) required

The ID of the workflow

`name` string required Nullable

The name of the workflow

`workflowId` string (uuid) required

The ID of the workflow

`nextPage` string optional

The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page.

**default** Error response

Response Schema: `application/json`

`code` string required

`details` object optional

`message` string required

##### Response

**200**

```json
{
  "hasMore": true,
  "items": [
    {
      "deploymentId": "string",
      "dtHealthy": "2019-08-24T14:15:22Z",
      "error": "string",
      "externalApplied": "2019-08-24T14:15:22Z",
      "id": "string",
      "userId": "string"
    }
  ],
  "nextPage": "string"
}
```

**default**

```json
{
  "code": "string",
  "message": "string"
}
```

* * *

## GET List a project's deployments

`/projects/{id}/deployments`

Fetches a list of deployments for a project.

#### Path Parameters

`id` string required

The ID of the project to fetch deployments for

#### Query Parameters

`after` string optional

Fetch the next page of results after this cursor.

`limit` integer 1 – 120 optional

The number of items to fetch after this page.

`orderBy` string, one of: dtCreated optional

Order results by one of these fields.

Default: `dtCreated`

`order` string, one of: asc, desc optional

The order to sort the results by.

Default: `desc`

`name` string optional

Filter to deployments with names matching this string.

##### Request: `/projects/{id}/deployments`

### cURL

```bash
curl -X GET \
  -H "Authorization: Bearer $API_TOKEN" \
  "https://api.paperspace.com/v1/projects/{id}/deployments"
```

#### Responses

**200** Successful response

Response Schema: `application/json`

`hasMore` boolean required

Whether there are more pages of results available.

`items` array of object required

The items on this page.

**Show child properties**

`basicAuthKey` string optional Nullable

The endpoint security key for the deployment

`dtCreated` string (date-time) required

The date the deployment was created

`endpoint` string required

The unique endpoint for the deployment

`id` string required

The ID of the deployment

`latestSpec` object optional Nullable

The latest deployment configuration. If invalid, null is returned.

**Show child properties**

`data` anyOf optional Nullable

The data for the deployment spec

One of:

**Option 1**

`apiVersion` string, one of: v0alpha0 required

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthChecks` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`models` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`name` string required

`port` number optional

`region` string, one of: ny2, ca1, ams1 optional

`repositories` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`resources` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

**Option 2**

`apiVersion` string, one of: v0alpha1 required

`basicAuthKey` string optional

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthChecks` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthchecks` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`integrations` array of anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`name` string required

`region` string, one of: ny2, ca1, ams1 optional

`resources` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

**Option 3**

`apiVersion` string, one of: v1, latest required

`basicAuthKey` string optional

`command` array of string optional

`containerRegistry` string optional

`enabled` boolean optional

`env` array of object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthChecks` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`healthchecks` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`image` string required

`integrations` array of anyOf optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`name` string required

`region` string, one of: ny2, ca1, ams1 optional

`resources` object required

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`deploymentId` string required

The ID of the deployment the spec belongs to

`dtHealthy` string (date-time) optional Nullable

The date the deployment was marked "healthy"

`error` string optional Nullable

The fatal configuration error. Only present if the cluster was unable to apply the entire deployment configuration. This is not the same as an instance error.

`externalApplied` string (date-time) optional Nullable

The date the deployment configuration was applied to the cluster

`id` string required

The ID of the deployment spec

`metadata` object optional Nullable

Metadata about the source of the configuration

**Show child properties**

`gitHeaders` object optional

*Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.*

`userId` string required

The ID of the user the deployment belongs to

`latestSpecHash` string optional Nullable

The last version hash for the deployment

`name` string required

The name of the deployment

`projectId` string required

The ID of the project the deployment belongs to

`teamId` string required

The ID of the team the deployment belongs to

`nextPage` string optional

The cursor required to fetch the next page of results. i.e. `?after=nextPage`. This is `null` when there is no next page.

**default** Error response

Response Schema: `application/json`

`code` string required

`details` object optional

`message` string required

##### Response

**200**

```json
{
  "hasMore": true,
  "items": [
    {
      "basicAuthKey": "string",
      "dtCreated": "2019-08-24T14:15:22Z",
      "endpoint": "string",
      "id": "string",
      "latestSpecHash": "string",
      "name": "string",
      "projectId": "string",
      "teamId": "string"
    }
  ],
  "nextPage": "string"
}
```

**default**

```json
{
  "code": "string",
  "message": "string"
}
```

* * *