Tasks
Snapshot Save
The Snapshot Save task is used to create a snapshot of a stub or GPT chat task in its current state, allowing you to return to that state at some point in the future.
Use cases
- Create a backup of a stub's state for faster development iterations
- Preserve the state of GPT chat tasks associated with a stub
- Track changes in a stub's lifecycle through multiple snapshots
- Save only specific GPT chat task states
Basic usage
Parameters
required string
snapshot_type The type of snapshot to create. Valid values are:
"stub"
: Creates a snapshot of the current stub"gpt_chat_task"
: Creates a snapshot of a specific GPT chat task
optional string
snapshot_name A name to identify this snapshot. If not provided, a default name will be used. Snapshots with the same type and name will overwrite previous snapshots.
Default: "_default"
optional boolean
snapshot_gpt_chat_tasks When snapshot_type
is "stub", setting this to true
will automatically create snapshots of all GPT chat tasks associated with the stub.
Default: false
optional object
child_snapshots Allows you to specify specific GPT chat tasks to snapshot when snapshot_type
is "stub". Each key in the object represents a chat name, and the value contains the snapshot configuration for that chat.
Example:
Result
Properties
snapshot.stubber_snapshot_uuid
The unique identifier for this snapshot.
snapshot.child_snapshot_references
Array of UUIDs referencing any child snapshots created (e.g., GPT chat task snapshots).
snapshot.createdAt
Timestamp when the snapshot was created.
snapshot.orguuid
The organization UUID associated with the snapshot.
snapshot.snapshot
Contains the actual snapshot data of the stub or GPT chat task.
snapshot.snapshot_name
The name given to this snapshot.
snapshot.snapshot_type
The type of snapshot ("stub" or "gpt_chat_task").
snapshot.stubref
The reference to the stub that was snapshotted.
snapshot.updatedAt
Timestamp when the snapshot was last updated.
Examples
Basic Stub Snapshot
Create a snapshot of the current stub state:
Stub Snapshot with GPT Chat Tasks
Create a snapshot of the stub and all its associated GPT chat tasks:
Named Snapshot with Specific Chat Tasks
Create a named snapshot of the stub and specific GPT chat tasks: