Skip to content

API Reference

POST /api/deploy

Submit a new deployment.

Request

Content-Type: multipart/form-data

FieldTypeRequiredDescription
repoUrlstringYesGit repository URL
jobIdstringYesCI job ID
jobTokenstringYesCI job authentication token
versionstringYesDeployment version (e.g. commit SHA, semver tag)
chartfileYesHelm chart tarball (.tgz)

Response

json
{
    "deploymentId": "01924f5a-7b3c-7d8e-9f1a-2b3c4d5e6f7a"
}

Errors

StatusCondition
400Missing required fields
401Job token verification failed
404No app configured for the given repo URL, or no environment configured for the branch

POST /api/get/chart

Download the currently deployed chart from the IaC repository as a gzipped tarball.

Request

Content-Type: application/json

FieldTypeRequiredDescription
repoUrlstringYesGit repository URL
jobIdstringYesCI job ID
jobTokenstringYesCI job authentication token

Response

Content-Type: application/gzip

The response body is a .tgz archive of the chart directory.

Errors

StatusCondition
400Missing required fields, or IaC path resolves outside the repository
401Job token verification failed
404No app configured for the given repo URL, no environment for the branch, or chart directory not found

POST /api/get/values

Fetch the currently deployed values.yaml from the IaC repository, returned as JSON.

Request

Content-Type: application/json

FieldTypeRequiredDescription
repoUrlstringYesGit repository URL
jobIdstringYesCI job ID
jobTokenstringYesCI job authentication token

Response

json
{
    "replicaCount": 3,
    "image": {
        "repository": "my-app",
        "tag": "v1.2.3"
    }
}

Errors

StatusCondition
400Missing required fields, IaC path resolves outside the repository, or malformed YAML
401Job token verification failed
404No app configured for the given repo URL, no environment for the branch, or values.yaml not found

GET /api/deployments/:id/events

Subscribe to real-time deployment status updates via Server-Sent Events (SSE).

Path Parameters

ParameterTypeDescription
idstringDeployment ID (UUID)

Response

The response is an SSE stream. Each event has:

  • Event type: status
  • Data: JSON-encoded DeploymentStatusEvent
typescript
interface DeploymentStatusEvent {
    status: DeploymentStatus;
    message: string;
}

Where DeploymentStatus is one of: pending, validating, pushing, pushed, monitoring, deployed, failed.

Behavior

  • Returns 404 if the deployment is not found
  • If the deployment is already in a terminal state (deployed or failed), sends one final event and closes the connection
  • Otherwise, sends the current status immediately, then streams updates as they occur
  • The connection closes automatically when a terminal status is reached

Example

sh
curl -N https://dag.example.com/api/deployments/01924f5a-7b3c-7d8e-9f1a-2b3c4d5e6f7a/events
event: status
data: {"status":"validating","message":"Verifying job token"}

event: status
data: {"status":"pushing","message":"Pushing chart to IAC repo"}

event: status
data: {"status":"monitoring","message":"Monitoring deployment"}

event: status
data: {"status":"deployed","message":"Deployment successful"}