Internal preview. Elefork is not publicly available yet; APIs and hostnames may change.
GET
/v1/usage
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.elefork.com/v1/usage"
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/usage';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/usage \ --header 'Authorization: Bearer <token>'Running seconds per branch in [from, to). Defaults to the last 24 hours; at most 31 days.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”from
string format: date-time
to
string format: date-time
Responses
Section titled “Responses”Usage
Media typeapplication/json
object
from
required
string format: date-time
to
required
string format: date-time
total_compute_seconds
required
number
items
required
Array<object>
object
branch_id
required
string
branch_name
required
string
size
required
string
compute_seconds
required
number
Example
{ "items": [ { "size": "nano" } ]}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