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

List schemas, tables and columns

GET
/v1/branches/{id}/schema
curl --request GET \
--url 'https://api.elefork.com/v1/branches/example/schema?database=postgres&role=postgres' \
--header 'Authorization: Bearer <token>'

User schemas of database with their tables, views and columns (up to 2,000 relations).

id
required
string
database
string
default: postgres
role
string
default: postgres

Role to connect as

Schemas, public first

Media typeapplication/json
object
schemas
required
Array<object>
object
name
required
string
tables
required
Array<object>
object
name
required
string
kind
required
string
Allowed values: table partitioned_table view materialized_view foreign_table
estimated_rows
required
integer
primary_key
required
Array<string>
columns
required
Array<object>
object
name
required
string
type
required
string
nullable
required
boolean
default
required
One of:
string

Example

{
"schemas": [
{
"tables": [
{
"kind": "table"
}
]
}
]
}

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"
}
}
Retry-After
integer