Chelabase
ManagementData api

The branch's schema as the data API sees it

GET
/v1/databases/{id}/branches/{branch_id}/data-api/schema

Authorization

bearer
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Database id

Formatuuid
branch_id*string

Branch id

Formatuuid

Query Parameters

database?string

The Postgres database to describe; main when absent. It must be served by the data API.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/databases/497f6eca-6276-4993-bfeb-53cbbbba6f08/branches/497f6eca-6276-4993-bfeb-53cbbbba6f08/data-api/schema"
{  "app_users": {    "schema": "string",    "table": "string"  },  "default_schema": "string",  "schemas": {    "property1": {      "enums": {        "property1": [          "string"        ],        "property2": [          "string"        ]      },      "functions": {        "property1": [          {            "args": [              {                "array": true,                "has_default": true,                "name": "string",                "type": "string"              }            ],            "returns": {              "array": true,              "set": true,              "type": "string"            }          }        ],        "property2": [          {            "args": [              {                "array": true,                "has_default": true,                "name": "string",                "type": "string"              }            ],            "returns": {              "array": true,              "set": true,              "type": "string"            }          }        ]      },      "tables": {        "property1": {          "columns": {            "property1": {              "array": true,              "enum": "string",              "generated": true,              "has_default": true,              "nullable": true,              "type": "string"            },            "property2": {              "array": true,              "enum": "string",              "generated": true,              "has_default": true,              "nullable": true,              "type": "string"            }          },          "kind": "table",          "primary_key": [            "string"          ],          "privileges": {            "property1": [              "select"            ],            "property2": [              "select"            ]          },          "rls": true,          "security_invoker": true        },        "property2": {          "columns": {            "property1": {              "array": true,              "enum": "string",              "generated": true,              "has_default": true,              "nullable": true,              "type": "string"            },            "property2": {              "array": true,              "enum": "string",              "generated": true,              "has_default": true,              "nullable": true,              "type": "string"            }          },          "kind": "table",          "primary_key": [            "string"          ],          "privileges": {            "property1": [              "select"            ],            "property2": [              "select"            ]          },          "rls": true,          "security_invoker": true        }      }    },    "property2": {      "enums": {        "property1": [          "string"        ],        "property2": [          "string"        ]      },      "functions": {        "property1": [          {            "args": [              {                "array": true,                "has_default": true,                "name": "string",                "type": "string"              }            ],            "returns": {              "array": true,              "set": true,              "type": "string"            }          }        ],        "property2": [          {            "args": [              {                "array": true,                "has_default": true,                "name": "string",                "type": "string"              }            ],            "returns": {              "array": true,              "set": true,              "type": "string"            }          }        ]      },      "tables": {        "property1": {          "columns": {            "property1": {              "array": true,              "enum": "string",              "generated": true,              "has_default": true,              "nullable": true,              "type": "string"            },            "property2": {              "array": true,              "enum": "string",              "generated": true,              "has_default": true,              "nullable": true,              "type": "string"            }          },          "kind": "table",          "primary_key": [            "string"          ],          "privileges": {            "property1": [              "select"            ],            "property2": [              "select"            ]          },          "rls": true,          "security_invoker": true        },        "property2": {          "columns": {            "property1": {              "array": true,              "enum": "string",              "generated": true,              "has_default": true,              "nullable": true,              "type": "string"            },            "property2": {              "array": true,              "enum": "string",              "generated": true,              "has_default": true,              "nullable": true,              "type": "string"            }          },          "kind": "table",          "primary_key": [            "string"          ],          "privileges": {            "property1": [              "select"            ],            "property2": [              "select"            ]          },          "rls": true,          "security_invoker": true        }      }    }  },  "version": "string"}