02 Wait For Upload And Capture Artifact

Step 2: Wait for the upload, capture the artifact id

The fast-path artifact is dispatched after the upload finishes processing. Re-send GET /ingestions/{{af_task_id}} until attributes.artifact_id appears โ€” that is the artifact the worker auto-created for this upload.

What this step does

It polls the ingestion task (not the artifact) for two reasons at once: to confirm the upload finished processing, and to learn the id of the artifact the worker generated as a result. The artifact id is stamped onto the task's attributes only after the fast-path dispatch fires.

Why it's needed

In the fast path you never asked for an artifact id โ€” the worker mints the artifact for you, asynchronously, once ingestion completes. So there's a hand-off gap: this step bridges it by watching the task until the id materialises. Until the upload reaches a terminal state the field is simply absent (a still-processing upload, second example); a failed upload creates no artifact at all, which is why you gate on the upload's status here rather than assuming an artifact exists.

This is the one extra step the fast path adds versus a plain upload โ€” from here on (Steps 3โ€“4) it is identical to the on-demand path.

What to capture

FieldNotes
attributes.artifact_idThe auto-created artifact. Captured into {{af_artifact_id}}.
attributes.artifact_dashboard_urlPresent only when you set signed_url_ttl_seconds in Step 1, and only once the artifact succeeds. Minted on read, never stored. Captured into {{af_dashboard_url}}.
attributes.artifact_signed_url_expires_atExpiry of that dashboard link.

Until the upload reaches a terminal state the artifact_id field is absent (see the second example). A failed upload creates nothing.

Alternative discovery: you can also find the artifact by scope with GET /artifacts?filter[assets.task_id]=eq:{{af_task_id}} instead of reading it off the task.

Next Step

โ†’ Step 3: Poll Artifact Until Completed.