Skip to content

Workflow Packs API

Workflow pack endpoints manage packaged worker runtime bundles, staged versions, and installation pinning.

Auth and scope

  • Session auth required for all endpoints except VM publish with API key fallback.
  • All pack and installation reads/writes are organization-scoped.

Packs

  • GET /api/workflow-packs list packs in current org
  • POST /api/workflow-packs ensure a pack from process library (workerKey required)
  • GET /api/workflow-packs/{id} load pack, versions, draft bundle, installations, runtime bundles
  • PATCH /api/workflow-packs/{id} update pack metadata/stage tags

Draft bundles

  • GET /api/workflow-packs/{id}/draft read current draft bundle
  • PUT /api/workflow-packs/{id}/draft upload draft bundle (bundleBase64, file inventory)

Version lifecycle

  • GET /api/workflow-packs/{id}/versions list versions
  • POST /api/workflow-packs/{id}/versions publish current draft into a version
  • POST /api/workflow-packs/{id}/versions/{versionId}/promote move version stage

Supported stages:

  • draft
  • internal_verified
  • pilot
  • production
  • deprecated
  • archived

VM-origin draft publishing

  • Preferred transport:
    • POST /api/workflow-packs/{id}/publish-from-vm/upload
    • POST /api/workflow-packs/{id}/publish-from-vm/finalize
  • Legacy compatibility:
    • POST /api/workflow-packs/{id}/publish-from-vm

Preferred flow:

  1. Call .../upload with optional fileName and contentType.
  2. Upload the zip directly to S3 using the returned presigned URL.
  3. Call .../finalize with uploadKey, draft base identifiers, and file inventory.

Finalize writes a new draft head from the uploaded bundle. Supports:

  • session auth
  • x-api-key auth when no user session exists

Conflict behavior:

  • Returns 409 with draft_head_conflict when baseRuntimeBundleId no longer matches current draft head on finalize.

Legacy endpoint behavior:

  • Still supported for backward compatibility.
  • Returns 400 parse diagnostics (parseError, contentLength) when JSON body parsing fails.

Installations

  • GET /api/workflow-pack-installations list org installations
  • POST /api/workflow-pack-installations create installation
  • GET /api/workflow-pack-installations/{id} load installation
  • PATCH /api/workflow-pack-installations/{id} update installation metadata
  • POST /api/workflow-pack-installations/{id}/pin pin installation to version
  • POST /api/workflow-pack-installations/{id}/rollback rollback to prior version pointer

Use installation pinning to keep execution deterministic and release-safe.