Get database tables
GEThttps://api.instacloud.com/projects/{projectId}/database/tables
Token scope: account · org · project — read-only tokens allowed.
List schemas, tables, columns, and keys (live introspection, never cached). Gated — db.query. May wake a suspended database.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
branch | query | string | no | Branch name (defaults to the project's default branch) |
group | query | string | no | postgres service name (default: the sole postgres service) |
database | query | string | no | database on the instance (default: the connection-string database) |
projectId | path | string | yes |
Responses
200
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
tables | object[] | yes | |
tables.schema | string | yes | |
tables.name | string | yes | |
tables.approxRows | integer | yes | pg_class.reltuples estimate — render as "~N rows" |
tables.columns | object[] | yes | |
tables.columns.name | string | yes | |
tables.columns.dataType | string | yes | |
tables.columns.default | string | null | yes | |
tables.columns.identity | boolean | yes | |
tables.primaryKey | string[] | yes | |
tables.foreignKeys | object[] | yes | |
tables.foreignKeys.name | string | yes | |
tables.foreignKeys.columns | string[] | yes | |
tables.foreignKeys.foreignSchema | string | yes | |
tables.foreignKeys.foreignTable | string | yes | |
tables.foreignKeys.foreignColumns | string[] | yes |
202
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
status | "approval_required" | no | |
approvalId | string | no | |
action | string | no | the gated action, or a comma-joined compound set — prefer `actions` |
actions | string[] | no | every capability this approval covers |
message | string | no | |
url | string | no | the console page where a project admin reviews this request |
nextActions | object[] | no | |
nextActions.op | string | yes | Neutral logical action id, e.g. "service.add" — NOT an operationId or a CLI/MCP tool name; each client maps it to its own surface. |
nextActions.reason | string | yes | Natural-language, human/LLM-facing "why do this now". |
nextActions.args | object | no | Suggested, flat named arguments; "<placeholder>"s where a value is unknown. |
nextActions.gated | boolean | no | True if the action passes a governance gate. |
400
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
403
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
404
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |
409
code public_access_closed: the database's public access is closed and the console has no private lane on this deployment yet
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes | |
code | string | no | stable machine-readable reason, e.g. private_lane_disabled, private_lane_unavailable_in_region, public_access_closed, credential_change_in_progress |
502
Default Response
| Field | Type | Required | Description |
|---|---|---|---|
error | string | yes |