Internal preview. Elefork is not publicly available yet; APIs and hostnames may change.
GET
/v1/branches/{id}/rows
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.elefork.com/v1/branches/example/rows?database=postgres&role=postgres&schema=public&table=example&limit=100&offset=0&dir=asc"
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/branches/example/rows?database=postgres&role=postgres&schema=public&table=example&limit=100&offset=0&dir=asc';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/branches/example/rows?database=postgres&role=postgres&schema=public&table=example&limit=100&offset=0&dir=asc' \ --header 'Authorization: Bearer <token>'total is exact when the planner estimates at most 100,000 rows, otherwise the estimate.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Query Parameters
Section titled “Query Parameters”database
string
role
string
Role to connect as
schema
string
table
required
string
limit
integer
offset
integer
order_by
string
Column name
dir
string
Responses
Section titled “Responses”One page
Media typeapplication/json
object
columns
required
Array<object>
object
name
required
string
type
required
string
rows
required
Array<Array>
command_tag
required
string
row_count
required
Rows returned or affected
integer
truncated
required
boolean
total
required
integer
total_exact
required
boolean
Example generated
{ "columns": [ { "name": "example", "type": "example" } ], "rows": [ [ "example" ] ], "command_tag": "example", "row_count": 1, "truncated": true, "total": 1, "total_exact": true}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" }}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