air_sdk.endpoints.checkpoints
air_sdk.endpoints.checkpoints
Classes
Module Contents
Bases: air_sdk.air_model.AirModel
Checkpoint model representing a snapshot of a simulation run.
Checkpoints are created when a simulation is shut down (stored). They capture the state of all nodes at that point in time and can be used to restore the simulation to that state later.
Unique identifier for the checkpoint
A customizable name for the checkpoint
Whether the checkpoint is favored over others when Air determines which checkpoints should be automatically deleted
Timestamp when the checkpoint was created
Timestamp when the checkpoint was last modified
UUID of the run during which the checkpoint was created
Current state of the checkpoint (PENDING, COMPLETE, or DELETED)
Update the checkpoint’s properties.
Parameters:
name– A new name for the checkpointfavorite– Whether the checkpoint should be protected from automatic deletion**kwargs– Additional fields for future API compatibility
Example:
Delete this checkpoint.
Only checkpoints in the COMPLETE state may be deleted. Deletion
updates the state to DELETED and removes the stored snapshots.
Example:
Bases: air_sdk.air_model.BaseEndpointAPI[air_sdk.endpoints.checkpoints.Checkpoint]
Endpoint API for managing simulation checkpoints.
Provides methods for listing, retrieving, updating, and deleting checkpoints. Checkpoints cannot be created directly; they are created automatically when a simulation is shut down.
List checkpoints.
When accessed via simulation.checkpoints.list(), results are
automatically filtered to that simulation. When accessed via
api.checkpoints.list(), all visible checkpoints are returned
unless filtered.
Parameters:
simulation– Filter by simulation UUIDrun– Filter by run UUIDstate– Filter by checkpoint statefavorite– Filter by favorite statuslimit– Number of results to return per pageoffset– Initial index from which to return resultsordering– Order by field (prefix with ”-” for descending). Options: created, modified, name, run, state, favoritesearch– Search by name or state**kwargs– Additional filter parameters
Returns:
Iterator of Checkpoint instances
Example:
Retrieve a specific checkpoint.
Parameters:
pk– Checkpoint UUID**kwargs– Additional query parameters
Returns:
Checkpoint instance
Example:
Update individual fields of a checkpoint.
Only name and favorite can be modified.
Parameters:
pk– Checkpoint UUIDname– A new name for the checkpointfavorite– Whether the checkpoint should be protected from automatic deletion**kwargs– Additional fields for future API compatibility
Returns:
Updated Checkpoint instance
Example:
Delete a checkpoint.
Only checkpoints in the COMPLETE state may be deleted. Deletion
updates the state to DELETED and removes the stored snapshots.
Parameters:
pk– Checkpoint UUID**kwargs– Additional parameters
Example:
Update individual fields of a checkpoint.
Only name and favorite can be modified.
Parameters:
checkpoint– Checkpoint instance or checkpoint UUIDname– A new name for the checkpointfavorite– Whether the checkpoint should be protected from automatic deletion**kwargs– Additional fields for future API compatibility
Returns:
Updated Checkpoint instance
Example: