Skip to content
EleforkDocs
Internal preview. Elefork is not publicly available yet; APIs and hostnames may change.

Checkpoint a branch

POST
/v1/branches/{id}/checkpoints
curl --request POST \
--url https://api.elefork.com/v1/branches/example/checkpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example" }'
id
required
string
Idempotency-Key
string
<= 200 characters
Media typeapplication/json
object
name
string

Example generated

{
"name": "example"
}

Checkpoint is being taken

Media typeapplication/json
object
checkpoint
required
object
id
required
string
branch_id
required
string
org_id
required
string
name
required
string
mode
required
string
Allowed values: full fs-only
state
required
string
Allowed values: creating ready failed deleting deleted
created_at
required
string format: date-time
expires_at
required
One of:
string format: date-time
pinned

Kept after its branch is deleted (dataset templates, sealed episodes) until expires_at.

boolean
kind

Snapshot (L0, a VM snapshot) or restore_point (L1/L2, a position in the branch’s WAL; reset and fork from it are point-in-time recoveries).

string
Allowed values: snapshot restore_point
remote_ready

The checkpoint survives the loss of its host: an L0 snapshot archived to object storage (CP_ARCHIVE_CHECKPOINTS), or an L1/L2 restore point (its WAL is in object storage once ready).

boolean
operation
required
object
id
required
string
org_id
required
string
branch_id
required
One of:
string
kind
required
string
Allowed values: create checkpoint reset pause wake delete recover
state
required
string
Allowed values: pending running succeeded failed
error
string
params
required
object
result
required
object
created_at
required
string format: date-time
finished_at
required
One of:
string format: date-time
request_id

The API request that started the operation (X-Request-Id).

string

Example

{
"checkpoint": {
"mode": "full",
"state": "creating",
"kind": "snapshot"
},
"operation": {
"kind": "create",
"state": "pending"
}
}

Error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example

{
"error": {
"code": "not_found"
}
}

Error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example

{
"error": {
"code": "not_found"
}
}

Error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example

{
"error": {
"code": "not_found"
}
}

Error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example

{
"error": {
"code": "not_found"
}
}

request_in_progress: a request with this Idempotency-Key is still running; retry later

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example

{
"error": {
"code": "not_found"
}
}

idempotency_mismatch: this Idempotency-Key was used with a different request

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example

{
"error": {
"code": "not_found"
}
}

Temporarily unavailable; retry after the Retry-After seconds. Codes: database_unavailable (the metadata database is failing over) and cube_admission (a compute node runs a sandbox shim below the platform minimum, so creates, forks, checkpoints and resets are refused until it is upgraded).

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example

{
"error": {
"code": "not_found"
}
}
Retry-After
integer