Rename Snapshot
PATCH
/api/v1/projects/{project_id}/snapshots/{snapshot_id}
const url = 'https://aura.strangeworks.com/api/v1/projects/example/snapshots/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"label":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://aura.strangeworks.com/api/v1/projects/example/snapshots/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "label": "example" }'Set or clear a snapshot’s label.
A label doubles as a pin: labeled snapshots are exempt from retention
pruning (see snapshot_service.select_expired_snapshots).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project_id
required
Project Id
string
snapshot_id
required
Snapshot Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
UpdateSnapshotRequest
Rename a snapshot. A blank/whitespace label clears back to the positional default.
label is required (nullable): an omitted field 422s rather than being
read as “clear” — clearing also unpins retention, so it must be explicit.
Examplegenerated
{ "label": "example"}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
SnapshotResponse
Metadata for a single workspace snapshot (list view).
Built from the Snapshot ORM object via model_validate; solution_summary
is read from the model’s like-named property (the linked execution’s summary), so
the execution relationship must be eager-loaded.
object
created_at
required
Created At
string format: date-time
file_count
required
File Count
integer
id
required
Id
string
kind
SnapshotKind
string
project_id
required
Project Id
string
tags
Tags
Array<string>
total_size_bytes
required
Total Size Bytes
integer
Example
{ "kind": "solve", "tags": []}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}