v1
dynamic-simulations

Cancel Dynamic V1

Cancel a queued or running dynamic run.

A QUEUED run has not started: it is canceled and refunded on the spot, and this returns 200 with the terminal resource.

A RUNNING run is a REQUEST. The response still carries the run as running, now with cancel_requested_at set. The worker stops at its next integration chunk boundary — at most one dynamic_cancel_window_s of mission time — then keeps the trajectory it solved, refunds in full, and the run turns canceled with a partial result whose run_meta.partial is true and whose run_meta.canceled_at_t_s says where it stopped. Poll the run, or watch the stream, until the status is canceled; the status code is 200 either way, so read status rather than inferring from it.

post/v1/dynamic-simulations/{public_id}/cancel

Request

  • Base URL: https://thrustlab.com
  • URL: https://thrustlab.com/v1/dynamic-simulations/{public_id}/cancel
  • Auth: HTTP bearer

Path parameters

public_idstring required

Response

Successful Response

battery_topologyobject nullable
cancel_requested_atstring nullable

When a cancel was requested for a RUNNING run. The status stays running until the worker stops at its next integration chunk boundary — at which point it keeps the results it has, refunds in full, and the run turns canceled with a partial result. Null when no cancel is pending, which includes every terminal run: the field reports a request in flight, not the history of one. A QUEUED run cancels immediately instead and never sets this.

created_atstring nullable

When the run was submitted.

credits_costinteger required
dispatched_atstring nullable

When the run was handed to the worker queue. A dynamic run is dispatched at creation, so this always equals created_at — it is NOT the start of execution.

display_labelsobject nullable
errorobject nullable
idstring required
input_snapshotobject nullable
is_starredboolean
namestring nullable
object'dynamic_simulation'
progressobject nullable

How far a running solve has got, refreshed at every integration chunk boundary: fraction (0-1, null when it cannot be estimated), sim_time_s reached, sim_time_total_s (null for a run to depletion, which has no fixed horizon — its fraction comes from the estimated duration and is capped at 0.99), wall_s of real time so far, and updated_at. Null before the first chunk completes.

project_idstring required
resultobject nullable
snapshot_versioninteger
solver_enginestring
started_atstring nullable

When a worker claimed the run and the solve began. Null until then. For a dynamic run this is the only field that shows how long it waited for a slot.

status'queued' | 'running' | 'completed' | 'failed' | 'canceled' required

Changes

No recorded changes to this operation across all 1 revision of this API.