Internal preview. Elefork is not publicly available yet; APIs and hostnames may change.
GET
/v1/projects/{id}/branches
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.elefork.com/v1/projects/example/branches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/projects/example/branches';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.elefork.com/v1/projects/example/branches \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “Responses”Branches
Media typeapplication/json
object
branches
required
Array<object>
object
id
required
string
project_id
required
string
org_id
required
string
name
required
string
durability
required
L0: reset to the last checkpoint after a crash. L1: async WAL replication. L2: no confirmed commit lost if any single host is lost (L1/L2 return 501 until available).
string
pause_policy
required
idle: paused automatically after the idle timeout without connections (woken on the next
connection). never: never paused automatically; POST /v1/branches/{id}/pause still works.
string
size
required
string
state
required
string
state_reason
string
source_kind
required
string
source_ref
required
string
durability_ready
required
boolean
degraded
required
boolean
recovery_blocked
required
boolean
last_active_at
required
string format: date-time
created_at
required
string format: date-time
Example
{ "branches": [ { "durability": "L0", "pause_policy": "idle", "size": "nano", "state": "creating", "source_kind": "template" } ]}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" }}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" }}Headers
Section titled “Headers”Retry-After
integer