Skip to main content
The Deployments API gives you full programmatic control over the deployment lifecycle in Varo Cloud. You can trigger deployments from a Git repository or a container image, monitor their progress in real time via log streaming, roll back to a previous stable version, or cancel a deployment that is still queued or building. Every deployment belongs to a project and targets a named environment such as production, staging, or preview. Base URL: https://inference.varo.cloud/v1 All requests require an Authorization: Bearer YOUR_API_KEY header.

GET /deployments

Returns a paginated list of deployments, optionally filtered by project, environment, or status.
project_id
string
Filter deployments to a specific project by its ID.
environment
string
Filter by target environment name (e.g. production, staging).
status
string
Filter by deployment status. One of queued, building, deploying, active, failed, cancelled, or rolled_back.
per_page
integer
default:"20"
Number of results to return per page. Maximum value is 100.
cursor
string
Pagination cursor from a previous response to retrieve the next page.
curl -X GET "https://inference.varo.cloud/v1/deployments?project_id=proj_abc123&environment=production&per_page=20" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "data": [
    {
      "id": "dep_xyz789",
      "project_id": "proj_abc123",
      "environment": "production",
      "status": "active",
      "version": "v1.2.3",
      "created_at": "2024-01-15T10:00:00Z",
      "updated_at": "2024-01-15T10:08:00Z",
      "completed_at": "2024-01-15T10:08:00Z"
    }
  ],
  "meta": {
    "per_page": 20,
    "next_cursor": null
  }
}

POST /deployments

Creates and queues a new deployment for the specified project and environment.
project_id
string
required
The ID of the project to deploy to.
environment
string
required
The target environment name, such as production, staging, or preview.
source
object
required
Describes the deployment source. Must include a type field of either git or image, plus the corresponding fields described below.
source.type
string
required
The source type. Use git to deploy from a repository branch or tag, or image to deploy a pre-built container image.
source.repo
string
Required when source.type is git. The repository path in owner/repo format.
source.branch
string
The branch to deploy. Used when source.type is git.
source.tag
string
A specific tag to deploy. Used when source.type is git. Takes precedence over branch when both are provided.
source.image_url
string
Required when source.type is image. The full URL of the container image to deploy, including tag.
curl -X POST "https://inference.varo.cloud/v1/deployments" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_abc123",
    "environment": "production",
    "source": {
      "type": "git",
      "repo": "acme-corp/storefront-api",
      "branch": "main"
    }
  }'
{
  "id": "dep_mno345",
  "project_id": "proj_abc123",
  "environment": "production",
  "status": "queued",
  "version": null,
  "source": {
    "type": "git",
    "repo": "acme-corp/storefront-api",
    "branch": "main",
    "tag": null,
    "image_url": null
  },
  "created_at": "2024-01-15T10:20:00Z",
  "updated_at": "2024-01-15T10:20:00Z",
  "completed_at": null
}

GET /deployments/

Retrieves the full details of a single deployment.
id
string
required
The unique identifier of the deployment.
curl -X GET "https://inference.varo.cloud/v1/deployments/dep_xyz789" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "dep_xyz789",
  "project_id": "proj_abc123",
  "environment": "production",
  "status": "active",
  "version": "v1.2.3",
  "source": {
    "type": "git",
    "repo": "acme-corp/storefront-api",
    "branch": "main",
    "tag": "v1.2.3",
    "image_url": null
  },
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-15T10:08:00Z",
  "completed_at": "2024-01-15T10:08:00Z"
}

GET /deployments//logs

Returns an array of log entries generated during the deployment build and rollout process. This endpoint is useful for inspecting build output, error messages, and runtime startup logs.
id
string
required
The unique identifier of the deployment whose logs you want to retrieve.
curl -X GET "https://inference.varo.cloud/v1/deployments/dep_xyz789/logs" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "data": [
    {
      "timestamp": "2024-01-15T10:01:00Z",
      "level": "info",
      "message": "Build started for commit a3f9c12"
    },
    {
      "timestamp": "2024-01-15T10:03:22Z",
      "level": "info",
      "message": "Dependencies installed successfully"
    },
    {
      "timestamp": "2024-01-15T10:05:45Z",
      "level": "info",
      "message": "Container image built and pushed"
    },
    {
      "timestamp": "2024-01-15T10:07:10Z",
      "level": "info",
      "message": "Health check passed — deployment marked active"
    }
  ]
}
data[].timestamp
string
ISO 8601 datetime string for when the log entry was emitted.
data[].level
string
Severity level of the log entry. One of info, warn, or error.
data[].message
string
The log message text.

POST /deployments//rollback

Rolls back the specified deployment by creating a new deployment targeting the most recent previously active version in the same environment.
id
string
required
The unique identifier of the deployment to roll back from.
Rollback creates a new deployment pointing to the previous stable version. It does not modify or revert the original deployment record. You can inspect the new deployment object to track the rollback’s progress through the normal deployment lifecycle.
curl -X POST "https://inference.varo.cloud/v1/deployments/dep_xyz789/rollback" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "dep_pqr678",
  "project_id": "proj_abc123",
  "environment": "production",
  "status": "queued",
  "version": "v1.2.2",
  "source": {
    "type": "git",
    "repo": "acme-corp/storefront-api",
    "branch": null,
    "tag": "v1.2.2",
    "image_url": null
  },
  "created_at": "2024-01-15T11:00:00Z",
  "updated_at": "2024-01-15T11:00:00Z",
  "completed_at": null
}

POST /deployments//cancel

Cancels a deployment that is currently in the queued or building state.
id
string
required
The unique identifier of the deployment to cancel.
curl -X POST "https://inference.varo.cloud/v1/deployments/dep_mno345/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "dep_mno345",
  "project_id": "proj_abc123",
  "environment": "production",
  "status": "cancelled",
  "version": null,
  "source": {
    "type": "git",
    "repo": "acme-corp/storefront-api",
    "branch": "main",
    "tag": null,
    "image_url": null
  },
  "created_at": "2024-01-15T10:20:00Z",
  "updated_at": "2024-01-15T10:21:30Z",
  "completed_at": null
}

Deployment Object

id
string
Unique identifier for the deployment, prefixed with dep_.
project_id
string
The ID of the project this deployment belongs to.
environment
string
The target environment name (e.g. production, staging).
status
string
Current lifecycle status of the deployment. One of queued, building, deploying, active, failed, cancelled, or rolled_back.
source
object
An object describing the deployment source, including type, repo, branch, tag, and image_url.
version
string
The resolved version string (e.g. a Git tag or image digest). null while the deployment is still queued or building.
created_at
string
ISO 8601 datetime string for when the deployment was created.
updated_at
string
ISO 8601 datetime string for when the deployment was last updated.
completed_at
string
ISO 8601 datetime string for when the deployment reached a terminal state (active, failed, cancelled, or rolled_back). null if the deployment is still in progress.