package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.elefork.com/v1/branches/example/checkpoints"
payload := strings.NewReader("{ \"name\": \"example\" }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.elefork.com/v1/branches/example/checkpoints';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.elefork.com/v1/branches/example/checkpoints \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Body
Section titled “Request Body”object
Example generated
{ "name": "example"}Responses
Section titled “Responses”Checkpoint is being taken
object
object
Kept after its branch is deleted (dataset templates, sealed episodes) until expires_at.
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).
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).
object
object
object
The API request that started the operation (X-Request-Id).
Example
{ "checkpoint": { "mode": "full", "state": "creating", "kind": "snapshot" }, "operation": { "kind": "create", "state": "pending" }}Error
object
object
Example
{ "error": { "code": "not_found" }}Error
object
object
Example
{ "error": { "code": "not_found" }}Error
object
object
Example
{ "error": { "code": "not_found" }}Error
object
object
Example
{ "error": { "code": "not_found" }}request_in_progress: a request with this Idempotency-Key is still running; retry later
object
object
Example
{ "error": { "code": "not_found" }}idempotency_mismatch: this Idempotency-Key was used with a different request
object
object
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).
object
object
Example
{ "error": { "code": "not_found" }}