Skip to Content
Xeonr Developer Docs

Enqueue Run

POST
/uplim.api.v1.InternalPipelineRunsService/EnqueueRun

Atomically creates a QUEUED PipelineRun plus one PENDING StepRun per step in the snapshot, stamping parent_step_id for inlined sub-pipeline steps. Refuses with FailedPrecondition when the integration is not actively installed on a numeric bucket (the system Default integration is exempt) or when a QUEUED/RUNNING run already exists for the resource (checked under a row lock; the coordinator retries this). Returns ResourceExhausted with a retry-after header when the per-integration run quota is exceeded, NotFound for an unknown snapshot, and InvalidArgument when no resource is set. Reclassify triggers mark earlier runs on the resource as superseded by the new run.

Access: internal only — the pipeline coordinator, authenticated by the shared X-Upl-Internal-Token header matching PIPELINE_INTERNAL_TOKEN (FailedPrecondition when unset, Unauthenticated on mismatch). No user authentication.

Authorization

AuthorizationBearer <token>

JWT access token obtained via OAuth2 flow or service account

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

integrationId?string
Formatuuid
bucketId?string

upl-im bucket IDs are numeric (e.g. "7"), not UUIDs; may be empty.

Lengthlength <= 64
snapshotId?string

Snapshot to execute. Coordinator looks this up via GetActivePipelineForResource before calling.

Formatuuid
trigger?string
Value in"PIPELINE_RUN_TRIGGER_UNSPECIFIED" | "PIPELINE_RUN_TRIGGER_UPLOAD_CREATED" | "PIPELINE_RUN_TRIGGER_UPLOAD_CREATED_PINNED" | "PIPELINE_RUN_TRIGGER_UPLOAD_RECLASSIFIED" | "PIPELINE_RUN_TRIGGER_FOLDER_CREATED" | "PIPELINE_RUN_TRIGGER_FOLDER_RECLASSIFIED" | "PIPELINE_RUN_TRIGGER_VIRTUAL_FILE_SENTINEL_INIT" | "PIPELINE_RUN_TRIGGER_VIRTUAL_FILE_SENTINEL_REPROCESS" | "PIPELINE_RUN_TRIGGER_TEMPLATE_MATERIALIZED"
resourceKind?string
Value in"PIPELINE_RESOURCE_KIND_UNSPECIFIED" | "PIPELINE_RESOURCE_KIND_UPLOAD" | "PIPELINE_RESOURCE_KIND_FOLDER" | "PIPELINE_RESOURCE_KIND_VIRTUAL_FILE" | "PIPELINE_RESOURCE_KIND_INTEGRATION_FOLDER"
batchId?|

Shared across runs spawned by one CreateUploadsFromTemplate call.

Lengthlength <= 64
traceRunId?|

Coordinator's tracing run id (its bull job id) — stored on the PipelineRun so GetPipelineRunTrace can resolve the run's spans.

Lengthlength <= 191
folderId?string
Lengthlength <= 64

Response Body

application/json

application/json

curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.InternalPipelineRunsService/EnqueueRun" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "run": "map[bucketId:42 enqueuedAt:2026-10-22T09:30:00Z id:a4e9c2d7-1f5b-4b83-8c6e-0d7f3a9b5e21 integrationId:5d2c8a41-7e3b-4f96-b0a8-1c9e6f3d2a75 pipelineUrn:acme:video resource:map[kind:PIPELINE_RESOURCE_KIND_UPLOAD uploadId:9b7e4d2a-3c1f-4e8b-a6d5-2f0c8e1b7a39] snapshotId:c71a5e93-2b8f-4d06-a4e1-9f3c6b2d8e17 status:PIPELINE_RUN_STATUS_QUEUED stepRuns:[map[attempt:0 status:STEP_RUN_STATUS_PENDING stepId:probe] map[attempt:0 status:STEP_RUN_STATUS_PENDING stepId:thumbnail]] traceRunId:6b1f9d3e-8a2c-4e7b-9d05-3c8a1f6e2b47 trigger:PIPELINE_RUN_TRIGGER_UPLOAD_CREATED]"
}