Viewcast On Demand measurements
Queue and poll draft and final measurements for Viewcast On Demand assets, the 202 plus poll contract, SLA posture, and the Monday-noon-Eastern final publication batch.
Measurements are the core of the Viewcast On Demand lifecycle. After you create an asset, you queue a draft measurement, poll for completion, and then queue a final measurement to publish the asset. This page covers the queue and poll contract, the SLA posture, and the publication batch.
All endpoints are on the v2 base https://api2.mworks.com. For the full endpoint reference, see Viewcast API reference.
Queue a measurement
POST /v2/viewcast/assets/{asset_id}/measurements
Queue a measurement by specifying kind as either draft or final. The endpoint returns 202 Accepted and requires an Idempotency-Key header.
curl -X POST https://api2.mworks.com/v2/viewcast/assets/$ASSET_ID/measurements \
-H "Authorization: Bearer $TOKEN" \
-H "Idempotency-Key: $UUID" \
-H "Content-Type: application/json" \
-d '{ "kind": "draft" }'Response (202):
{
"asset_id": "vcaJDVDYWSSMHAXVEFYW1DVD2PPFD",
"kind": "draft",
"status": "queued"
}State guard: calling kind=final while the asset is still in draft state returns 409. You must queue and complete a kind=draft measurement first, which moves the asset to draft_measured. Only then can you queue kind=final.
See Purchase flow and credits for the credit costs: 150 credits for a draft purchase, 300 credits for a final purchase, plus the 1 cr base endpoint cost.
Poll for completion
GET /v2/viewcast/assets/{asset_id}/measurements/latest
Poll this endpoint to check the status of the most recent measurement. The response includes a status field and, when applicable, a refund_credits field.
curl https://api2.mworks.com/v2/viewcast/assets/$ASSET_ID/measurements/latest \
-H "Authorization: Bearer $TOKEN"The status field transitions through these values:
| Status | Meaning |
|---|---|
queued | Measurement is waiting to be picked up by the pipeline |
running | Measurement is actively being computed |
completed | Measurement finished; check the result body for the outcome (measured, no_coverage, or insufficient_data) |
failed | Measurement could not produce any result; purchase credits are auto-refunded |
When the status is completed with an informational outcome (no_coverage or insufficient_data) or failed, the refund_credits field reflects the auto-refunded purchase amount. See Purchase flow and credits for the refund rules.
Verified (MA-99, 2026-08-30): the measurements/latest poll shape was confirmed against the live API. A draft measurement moved draft to draft_measured in approximately 1.3 seconds in that run.
SLA posture (qualified)
The draft measurement completion pipeline is not yet live in production. The data team's BigQuery result surface has not been deployed, and the completion batch flag (BATCH_ENABLED) is set to false in the service configuration. This means:
- A draft purchase queues successfully (202 returned, 150 credits charged).
- The measurement does not currently complete to a measured result in the normal production path. It remains in
queuedorrunningstate. - If the measurement does not complete within the
no_result_timeoutwindow, the purchase charge is auto-refunded per the timeout posture. The base 1 cr endpoint cost is not refunded.
The 1.3-second completion observed in the MA-99 canary run (2026-08-30) was faster than the 1-hour SLA ceiling for that test condition, but the completion pipeline that produced it is gated off in the general production configuration. Do not rely on draft measurements completing to a measured result until the completion pipeline is live.
We will update this page when the completion surface lands and the flag flips. The credit charge, queue behavior, and auto-refund-on-timeout behavior are all live and verified; only the completion-to-result step is pending.
Monday-noon-Eastern final publication batch
Final measurements are published through a batch that runs on Monday at noon Eastern time. The batch processes all assets that have reached draft_measured and have a queued kind=final measurement, moving them to final_measured and minting their viewshed_id.
This batch is currently gated off (dark). It will not run until the data team's BigQuery result surface is live in production and the BATCH_ENABLED flag is flipped. Until then, final measurements queue but do not progress to final_measured.
Auto-progression and the auto_progress_final caller hold
When the completion pipeline is live, a completed draft measurement will auto-progress the asset from draft to draft_measured. The caller does not need to take any action to trigger this transition; it happens automatically when the draft result lands.
However, the progression from draft_measured to final_measured requires the caller to explicitly queue a kind=final measurement. This is the auto_progress_final caller hold: the API does not automatically queue or purchase a final measurement. The caller decides when (and whether) to spend the 300 credits to publish the asset as a final, viewable inventory record.
What to read next
Updated about 3 hours ago
