Skip to main content
GET
/
deployments
JavaScript
import Kernel from '@onkernel/sdk';

const client = new Kernel({
  apiKey: 'My API Key',
});

// Automatically fetches more pages as needed.
for await (const deploymentListResponse of client.deployments.list()) {
  console.log(deploymentListResponse.id);
}
[
  {
    "id": "rr33xuugxj9h0bkf1rdt2bet",
    "status": "queued",
    "status_reason": "Deployment in progress",
    "region": "aws.us-east-1a",
    "entrypoint_rel_path": "src/app.py",
    "env_vars": {},
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

app_name
string

Filter results by application name.

limit
integer
default:20

Limit the number of deployments to return.

Required range: 1 <= x <= 100
offset
integer
default:0

Offset the number of deployments to return.

Required range: x >= 0

Response

List of deployments.

id
string
required

Unique identifier for the deployment

Example:

"rr33xuugxj9h0bkf1rdt2bet"

status
enum<string>
required

Current status of the deployment

Available options:
queued,
in_progress,
running,
failed,
stopped
Example:

"queued"

region
string
required

Deployment region code

Allowed value: "aws.us-east-1a"
Example:

"aws.us-east-1a"

created_at
string<date-time>
required

Timestamp when the deployment was created

status_reason
string

Status reason

Example:

"Deployment in progress"

entrypoint_rel_path
string

Relative path to the application entrypoint

Example:

"src/app.py"

env_vars
object

Environment variables configured for this deployment

updated_at
string<date-time> | null

Timestamp when the deployment was last updated

I