Snapshot

Snapshot Models #

The Snapshot and SnapshotImage models represent images captured via the Canvas iOS application or uploaded directly through the coverages modal. A Snapshot groups related images together, while each SnapshotImage represents an individual image with presigned URL support for secure access.

Snapshots are primarily used for storing coverage card images. Note that there is currently no way to navigate from a Snapshot to the Coverage it is associated with via the SDK. This linkage will be addressed in a future release.

Basic Usage #

from canvas_sdk.v1.data import Snapshot, SnapshotImage

# Get all snapshots
snapshots = Snapshot.objects.all()

# Get a specific snapshot
snapshot = Snapshot.objects.get(dbid=42)

# Get images for a snapshot
images = snapshot.images.all()

# Get all snapshot images
all_images = SnapshotImage.objects.all()

Accessing Image Files #

The image_url property on SnapshotImage returns a presigned S3 URL for securely accessing the image file.

from canvas_sdk.v1.data import SnapshotImage

image = SnapshotImage.objects.exclude(image="").first()

# Returns a presigned S3 URL (valid for 1 hour)
url = image.image_url

Attributes #

Snapshot #

Field NameType
dbidInteger
createdDateTime
modifiedDateTime
originatorCanvasUser
committerCanvasUser
deletedBoolean
entered_in_errorBoolean
titleString
descriptionString
imagesSnapshotImage[]

SnapshotImage #

Field NameType
dbidInteger
createdDateTime
modifiedDateTime
snapshotSnapshot
imageString
titleString
instructionString
tagString
image_urlString (property) — presigned S3 URL