Skip to main content
PUT
/
v1
/
agent-deployments
/
{deployment_id}
/
versions
/
{version_id}
/
bundle
Upload an agent deployment version bundle
import requests

url = "https://api.13-215-85-171.sslip.io/v1/agent-deployments/{deployment_id}/versions/{version_id}/bundle"

payload = "<string>"
headers = {
    "Idempotency-Key": "<idempotency-key>",
    "X-Nullspace-Bundle-Digest": "<x-nullspace-bundle-digest>",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/x-tar"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
{
  "id": "adpv_1234abcd",
  "deployment_id": "<string>",
  "version_number": 2,
  "bundle_digest": "<string>",
  "bundle_manifest": {
    "bundle_digest": "<string>",
    "config_digest": "<string>",
    "archive_format": "tar",
    "total_size": 1,
    "file_count": 1,
    "generated_at": "2023-11-07T05:31:56Z",
    "materialization_path": "/workspace/project",
    "entries": [
      {
        "path": "<string>",
        "included": true,
        "reason": "<string>",
        "size": 1,
        "mode": 123,
        "digest": "<string>",
        "symlink_target": "<string>"
      }
    ],
    "include_patterns": [
      "<string>"
    ],
    "exclude_patterns": [
      "<string>"
    ],
    "default_exclude_patterns": [
      "<string>"
    ]
  },
  "config": {
    "name": "<string>",
    "template": "<string>",
    "workdir": "<string>",
    "entrypoint": "<string>",
    "env": {
      "required": [
        "<string>"
      ],
      "optional": [
        "<string>"
      ]
    },
    "resources": {
      "vcpus": 2,
      "memory_mb": 2,
      "disk_mb": 2,
      "timeout_seconds": 2
    },
    "service": {
      "port": 32768,
      "readiness": {
        "path": "<string>",
        "timeout_seconds": 1
      }
    },
    "debug": {
      "retain_on_failure": true,
      "retain_seconds": 2
    },
    "install": "<string>",
    "permissions": {
      "internet_access": true,
      "allow_out": [
        "<string>"
      ],
      "deny_out": [
        "<string>"
      ],
      "public_url": true,
      "allow_public_traffic": true,
      "volumes": true,
      "desktop": true,
      "pty": true,
      "debug": true,
      "retain_on_failure": true,
      "max_vcpus": 2,
      "max_memory_mb": 2,
      "max_disk_mb": 2,
      "max_timeout_seconds": 2
    },
    "outputs": {
      "paths": [
        "<string>"
      ]
    }
  },
  "template": "<string>",
  "workdir": "<string>",
  "entrypoint_command": "<string>",
  "env_spec": {
    "required": [
      "<string>"
    ],
    "optional": [
      "<string>"
    ]
  },
  "resource_config": {
    "vcpus": 2,
    "memory_mb": 2,
    "disk_mb": 2,
    "timeout_seconds": 2
  },
  "debug_config": {
    "retain_on_failure": true,
    "retain_seconds": 2
  },
  "created_at": "2023-11-07T05:31:56Z",
  "install_command": "<string>",
  "service_port": 32768,
  "readiness_config": {
    "path": "<string>",
    "timeout_seconds": 1
  },
  "cache_summary": {
    "enabled": true,
    "artifact_ready": true,
    "reason": "<string>",
    "build_id": "<string>",
    "cache_key_digest": "sha256:abc123",
    "artifact_id": "<string>",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "build_summary": {
    "build_id": "adpb_1234abcd",
    "artifact_ready": true,
    "artifact_id": "<string>",
    "size_bytes": 1,
    "failure_reason": "<string>",
    "started_at": "2023-11-07T05:31:56Z",
    "completed_at": "2023-11-07T05:31:56Z"
  },
  "failure_reason": "<string>",
  "ready_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Headers

Idempotency-Key
string
required

Reuse the same key to safely retry the same create, reusable snapshot create, fork, upload create/complete, or agent deployment create operation without duplicating work.

X-Nullspace-Bundle-Digest
string
required

Content-addressed bundle digest from the version manifest.

Path Parameters

deployment_id
string
required

Agent deployment ID

version_id
string
required

Agent deployment version ID

Body

application/x-tar

The body is of type file.

Response

Agent deployment version is ready

id
string
required
Example:

"adpv_1234abcd"

deployment_id
string
required
version_number
integer
required
Required range: x >= 1
bundle_digest
string
required
bundle_manifest
object
required
config
object
required
template
string
required
workdir
string
required
entrypoint_command
string
required
env_spec
object
required

Environment variable names only. Secret values must not be stored in deployment config rows.

resource_config
object
required
debug_config
object
required

Debug retention config for agent deployments. The server validates that only retain_on_failure and retain_seconds are accepted when a deployment version is created.

status
enum<string>
required
Available options:
created,
building,
ready,
failed,
superseded
cache_policy
enum<string>
required
Available options:
auto,
no_cache,
rebuild
created_at
string<date-time>
required
install_command
string | null
service_port
integer | null
Required range: 1 <= x <= 65535
readiness_config
object

Service readiness probe config, validated on write (type one of http, tcp, timeout; path must start with /). Unknown keys are preserved verbatim, so the object is deliberately open beyond the known fields.

cache_summary
object
build_summary
object
failure_reason
string | null
ready_at
string<date-time> | null