curl --request GET \
--url https://api.example.com/v1/instances/{instance}/databases/{database}/metadata{
"name": "<string>",
"schemas": [
{
"name": "<string>",
"tables": [
{
"name": "<string>",
"columns": [
{
"name": "<string>",
"position": 123,
"hasDefault": true,
"default": "<string>",
"defaultOnNull": true,
"onUpdate": "<string>",
"nullable": true,
"type": "<string>",
"characterSet": "<string>",
"collation": "<string>",
"comment": "<string>",
"generation": {
"type": "TYPE_UNSPECIFIED",
"expression": "<string>"
},
"isIdentity": true,
"identityGeneration": "IDENTITY_GENERATION_UNSPECIFIED",
"identitySeed": "<string>",
"identityIncrement": "<string>",
"defaultConstraintName": "<string>"
}
],
"indexes": [
{
"name": "<string>",
"expressions": [
"<string>"
],
"keyLength": [
"<string>"
],
"descending": [
true
],
"type": "<string>",
"unique": true,
"primary": true,
"visible": true,
"comment": "<string>",
"definition": "<string>",
"parentIndexSchema": "<string>",
"parentIndexName": "<string>",
"granularity": "<string>",
"isConstraint": true,
"spatialConfig": {
"method": "<string>",
"tessellation": {
"scheme": "<string>",
"gridLevels": [
{
"level": 123,
"density": "<string>"
}
],
"cellsPerObject": 123,
"boundingBox": {
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123
}
},
"storage": {
"fillfactor": 123,
"buffering": "<string>",
"tablespace": "<string>",
"workTablespace": "<string>",
"sdoLevel": 123,
"commitInterval": 123,
"padIndex": true,
"sortInTempdb": "<string>",
"dropExisting": true,
"online": true,
"allowRowLocks": true,
"allowPageLocks": true,
"maxdop": 123,
"dataCompression": "<string>"
},
"dimensional": {
"dimensions": 123,
"dataType": "<string>",
"srid": 123,
"constraints": [
{
"dimension": "<string>",
"minValue": 123,
"maxValue": 123,
"tolerance": 123
}
]
}
},
"opclassNames": [
"<string>"
],
"opclassDefaults": [
true
]
}
],
"engine": "<string>",
"collation": "<string>",
"charset": "<string>",
"rowCount": "<string>",
"dataSize": "<string>",
"indexSize": "<string>",
"dataFree": "<string>",
"createOptions": "<string>",
"comment": "<string>",
"foreignKeys": [
{
"name": "<string>",
"columns": [
"<string>"
],
"referencedSchema": "<string>",
"referencedTable": "<string>",
"referencedColumns": [
"<string>"
],
"onDelete": "<string>",
"onUpdate": "<string>",
"matchType": "<string>"
}
],
"partitions": [
{
"name": "<string>",
"type": "TYPE_UNSPECIFIED",
"expression": "<string>",
"value": "<string>",
"useDefault": "<string>",
"subpartitions": "<array>",
"indexes": [
{
"name": "<string>",
"expressions": [
"<string>"
],
"keyLength": [
"<string>"
],
"descending": [
true
],
"type": "<string>",
"unique": true,
"primary": true,
"visible": true,
"comment": "<string>",
"definition": "<string>",
"parentIndexSchema": "<string>",
"parentIndexName": "<string>",
"granularity": "<string>",
"isConstraint": true,
"spatialConfig": {
"method": "<string>",
"tessellation": {
"scheme": "<string>",
"gridLevels": [
{
"level": 123,
"density": "<string>"
}
],
"cellsPerObject": 123,
"boundingBox": {
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123
}
},
"storage": {
"fillfactor": 123,
"buffering": "<string>",
"tablespace": "<string>",
"workTablespace": "<string>",
"sdoLevel": 123,
"commitInterval": 123,
"padIndex": true,
"sortInTempdb": "<string>",
"dropExisting": true,
"online": true,
"allowRowLocks": true,
"allowPageLocks": true,
"maxdop": 123,
"dataCompression": "<string>"
},
"dimensional": {
"dimensions": 123,
"dataType": "<string>",
"srid": 123,
"constraints": [
{
"dimension": "<string>",
"minValue": 123,
"maxValue": 123,
"tolerance": 123
}
]
}
},
"opclassNames": [
"<string>"
],
"opclassDefaults": [
true
]
}
],
"checkConstraints": [
{
"name": "<string>",
"expression": "<string>"
}
]
}
],
"checkConstraints": [
{
"name": "<string>",
"expression": "<string>"
}
],
"owner": "<string>",
"sortingKeys": [
"<string>"
],
"triggers": [
{
"name": "<string>",
"event": "<string>",
"timing": "<string>",
"body": "<string>",
"sqlMode": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"comment": "<string>",
"skipDump": true
}
],
"skipDump": true,
"shardingInfo": "<string>",
"primaryKeyType": "<string>"
}
],
"externalTables": [
{
"name": "<string>",
"externalServerName": "<string>",
"externalDatabaseName": "<string>",
"columns": [
{
"name": "<string>",
"position": 123,
"hasDefault": true,
"default": "<string>",
"defaultOnNull": true,
"onUpdate": "<string>",
"nullable": true,
"type": "<string>",
"characterSet": "<string>",
"collation": "<string>",
"comment": "<string>",
"generation": {
"type": "TYPE_UNSPECIFIED",
"expression": "<string>"
},
"isIdentity": true,
"identityGeneration": "IDENTITY_GENERATION_UNSPECIFIED",
"identitySeed": "<string>",
"identityIncrement": "<string>",
"defaultConstraintName": "<string>"
}
]
}
],
"views": [
{
"name": "<string>",
"definition": "<string>",
"comment": "<string>",
"dependencyColumns": [
{
"schema": "<string>",
"table": "<string>",
"column": "<string>"
}
],
"columns": [
{
"name": "<string>",
"position": 123,
"hasDefault": true,
"default": "<string>",
"defaultOnNull": true,
"onUpdate": "<string>",
"nullable": true,
"type": "<string>",
"characterSet": "<string>",
"collation": "<string>",
"comment": "<string>",
"generation": {
"type": "TYPE_UNSPECIFIED",
"expression": "<string>"
},
"isIdentity": true,
"identityGeneration": "IDENTITY_GENERATION_UNSPECIFIED",
"identitySeed": "<string>",
"identityIncrement": "<string>",
"defaultConstraintName": "<string>"
}
],
"triggers": [
{
"name": "<string>",
"event": "<string>",
"timing": "<string>",
"body": "<string>",
"sqlMode": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"comment": "<string>",
"skipDump": true
}
],
"skipDump": true
}
],
"functions": [
{
"name": "<string>",
"definition": "<string>",
"signature": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"databaseCollation": "<string>",
"sqlMode": "<string>",
"comment": "<string>",
"dependencyTables": [
{
"schema": "<string>",
"table": "<string>"
}
],
"skipDump": true
}
],
"procedures": [
{
"name": "<string>",
"definition": "<string>",
"signature": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"databaseCollation": "<string>",
"sqlMode": "<string>",
"comment": "<string>",
"skipDump": true
}
],
"streams": [
{
"name": "<string>",
"tableName": "<string>",
"owner": "<string>",
"comment": "<string>",
"type": "TYPE_UNSPECIFIED",
"stale": true,
"mode": "MODE_UNSPECIFIED",
"definition": "<string>"
}
],
"tasks": [
{
"name": "<string>",
"id": "<string>",
"owner": "<string>",
"comment": "<string>",
"warehouse": "<string>",
"schedule": "<string>",
"predecessors": [
"<string>"
],
"state": "STATE_UNSPECIFIED",
"condition": "<string>",
"definition": "<string>"
}
],
"materializedViews": [
{
"name": "<string>",
"definition": "<string>",
"comment": "<string>",
"dependencyColumns": [
{
"schema": "<string>",
"table": "<string>",
"column": "<string>"
}
],
"triggers": [
{
"name": "<string>",
"event": "<string>",
"timing": "<string>",
"body": "<string>",
"sqlMode": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"comment": "<string>",
"skipDump": true
}
],
"indexes": [
{
"name": "<string>",
"expressions": [
"<string>"
],
"keyLength": [
"<string>"
],
"descending": [
true
],
"type": "<string>",
"unique": true,
"primary": true,
"visible": true,
"comment": "<string>",
"definition": "<string>",
"parentIndexSchema": "<string>",
"parentIndexName": "<string>",
"granularity": "<string>",
"isConstraint": true,
"spatialConfig": {
"method": "<string>",
"tessellation": {
"scheme": "<string>",
"gridLevels": [
{
"level": 123,
"density": "<string>"
}
],
"cellsPerObject": 123,
"boundingBox": {
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123
}
},
"storage": {
"fillfactor": 123,
"buffering": "<string>",
"tablespace": "<string>",
"workTablespace": "<string>",
"sdoLevel": 123,
"commitInterval": 123,
"padIndex": true,
"sortInTempdb": "<string>",
"dropExisting": true,
"online": true,
"allowRowLocks": true,
"allowPageLocks": true,
"maxdop": 123,
"dataCompression": "<string>"
},
"dimensional": {
"dimensions": 123,
"dataType": "<string>",
"srid": 123,
"constraints": [
{
"dimension": "<string>",
"minValue": 123,
"maxValue": 123,
"tolerance": 123
}
]
}
},
"opclassNames": [
"<string>"
],
"opclassDefaults": [
true
]
}
],
"skipDump": true
}
],
"packages": [
{
"name": "<string>",
"definition": "<string>"
}
],
"owner": "<string>",
"sequences": [
{
"name": "<string>",
"dataType": "<string>",
"start": "<string>",
"minValue": "<string>",
"maxValue": "<string>",
"increment": "<string>",
"cycle": true,
"cacheSize": "<string>",
"lastValue": "<string>",
"ownerTable": "<string>",
"ownerColumn": "<string>",
"comment": "<string>",
"skipDump": true
}
],
"events": [
{
"name": "<string>",
"definition": "<string>",
"timeZone": "<string>",
"sqlMode": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"comment": "<string>"
}
],
"enumTypes": [
{
"name": "<string>",
"values": [
"<string>"
],
"comment": "<string>",
"skipDump": true
}
],
"skipDump": true,
"comment": "<string>"
}
],
"characterSet": "<string>",
"collation": "<string>",
"extensions": [
{
"name": "<string>",
"schema": "<string>",
"version": "<string>",
"description": "<string>"
}
],
"owner": "<string>",
"searchPath": "<string>"
}Retrieves database metadata including tables, columns, and indexes. Permissions required: bb.databases.getSchema
curl --request GET \
--url https://api.example.com/v1/instances/{instance}/databases/{database}/metadata{
"name": "<string>",
"schemas": [
{
"name": "<string>",
"tables": [
{
"name": "<string>",
"columns": [
{
"name": "<string>",
"position": 123,
"hasDefault": true,
"default": "<string>",
"defaultOnNull": true,
"onUpdate": "<string>",
"nullable": true,
"type": "<string>",
"characterSet": "<string>",
"collation": "<string>",
"comment": "<string>",
"generation": {
"type": "TYPE_UNSPECIFIED",
"expression": "<string>"
},
"isIdentity": true,
"identityGeneration": "IDENTITY_GENERATION_UNSPECIFIED",
"identitySeed": "<string>",
"identityIncrement": "<string>",
"defaultConstraintName": "<string>"
}
],
"indexes": [
{
"name": "<string>",
"expressions": [
"<string>"
],
"keyLength": [
"<string>"
],
"descending": [
true
],
"type": "<string>",
"unique": true,
"primary": true,
"visible": true,
"comment": "<string>",
"definition": "<string>",
"parentIndexSchema": "<string>",
"parentIndexName": "<string>",
"granularity": "<string>",
"isConstraint": true,
"spatialConfig": {
"method": "<string>",
"tessellation": {
"scheme": "<string>",
"gridLevels": [
{
"level": 123,
"density": "<string>"
}
],
"cellsPerObject": 123,
"boundingBox": {
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123
}
},
"storage": {
"fillfactor": 123,
"buffering": "<string>",
"tablespace": "<string>",
"workTablespace": "<string>",
"sdoLevel": 123,
"commitInterval": 123,
"padIndex": true,
"sortInTempdb": "<string>",
"dropExisting": true,
"online": true,
"allowRowLocks": true,
"allowPageLocks": true,
"maxdop": 123,
"dataCompression": "<string>"
},
"dimensional": {
"dimensions": 123,
"dataType": "<string>",
"srid": 123,
"constraints": [
{
"dimension": "<string>",
"minValue": 123,
"maxValue": 123,
"tolerance": 123
}
]
}
},
"opclassNames": [
"<string>"
],
"opclassDefaults": [
true
]
}
],
"engine": "<string>",
"collation": "<string>",
"charset": "<string>",
"rowCount": "<string>",
"dataSize": "<string>",
"indexSize": "<string>",
"dataFree": "<string>",
"createOptions": "<string>",
"comment": "<string>",
"foreignKeys": [
{
"name": "<string>",
"columns": [
"<string>"
],
"referencedSchema": "<string>",
"referencedTable": "<string>",
"referencedColumns": [
"<string>"
],
"onDelete": "<string>",
"onUpdate": "<string>",
"matchType": "<string>"
}
],
"partitions": [
{
"name": "<string>",
"type": "TYPE_UNSPECIFIED",
"expression": "<string>",
"value": "<string>",
"useDefault": "<string>",
"subpartitions": "<array>",
"indexes": [
{
"name": "<string>",
"expressions": [
"<string>"
],
"keyLength": [
"<string>"
],
"descending": [
true
],
"type": "<string>",
"unique": true,
"primary": true,
"visible": true,
"comment": "<string>",
"definition": "<string>",
"parentIndexSchema": "<string>",
"parentIndexName": "<string>",
"granularity": "<string>",
"isConstraint": true,
"spatialConfig": {
"method": "<string>",
"tessellation": {
"scheme": "<string>",
"gridLevels": [
{
"level": 123,
"density": "<string>"
}
],
"cellsPerObject": 123,
"boundingBox": {
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123
}
},
"storage": {
"fillfactor": 123,
"buffering": "<string>",
"tablespace": "<string>",
"workTablespace": "<string>",
"sdoLevel": 123,
"commitInterval": 123,
"padIndex": true,
"sortInTempdb": "<string>",
"dropExisting": true,
"online": true,
"allowRowLocks": true,
"allowPageLocks": true,
"maxdop": 123,
"dataCompression": "<string>"
},
"dimensional": {
"dimensions": 123,
"dataType": "<string>",
"srid": 123,
"constraints": [
{
"dimension": "<string>",
"minValue": 123,
"maxValue": 123,
"tolerance": 123
}
]
}
},
"opclassNames": [
"<string>"
],
"opclassDefaults": [
true
]
}
],
"checkConstraints": [
{
"name": "<string>",
"expression": "<string>"
}
]
}
],
"checkConstraints": [
{
"name": "<string>",
"expression": "<string>"
}
],
"owner": "<string>",
"sortingKeys": [
"<string>"
],
"triggers": [
{
"name": "<string>",
"event": "<string>",
"timing": "<string>",
"body": "<string>",
"sqlMode": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"comment": "<string>",
"skipDump": true
}
],
"skipDump": true,
"shardingInfo": "<string>",
"primaryKeyType": "<string>"
}
],
"externalTables": [
{
"name": "<string>",
"externalServerName": "<string>",
"externalDatabaseName": "<string>",
"columns": [
{
"name": "<string>",
"position": 123,
"hasDefault": true,
"default": "<string>",
"defaultOnNull": true,
"onUpdate": "<string>",
"nullable": true,
"type": "<string>",
"characterSet": "<string>",
"collation": "<string>",
"comment": "<string>",
"generation": {
"type": "TYPE_UNSPECIFIED",
"expression": "<string>"
},
"isIdentity": true,
"identityGeneration": "IDENTITY_GENERATION_UNSPECIFIED",
"identitySeed": "<string>",
"identityIncrement": "<string>",
"defaultConstraintName": "<string>"
}
]
}
],
"views": [
{
"name": "<string>",
"definition": "<string>",
"comment": "<string>",
"dependencyColumns": [
{
"schema": "<string>",
"table": "<string>",
"column": "<string>"
}
],
"columns": [
{
"name": "<string>",
"position": 123,
"hasDefault": true,
"default": "<string>",
"defaultOnNull": true,
"onUpdate": "<string>",
"nullable": true,
"type": "<string>",
"characterSet": "<string>",
"collation": "<string>",
"comment": "<string>",
"generation": {
"type": "TYPE_UNSPECIFIED",
"expression": "<string>"
},
"isIdentity": true,
"identityGeneration": "IDENTITY_GENERATION_UNSPECIFIED",
"identitySeed": "<string>",
"identityIncrement": "<string>",
"defaultConstraintName": "<string>"
}
],
"triggers": [
{
"name": "<string>",
"event": "<string>",
"timing": "<string>",
"body": "<string>",
"sqlMode": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"comment": "<string>",
"skipDump": true
}
],
"skipDump": true
}
],
"functions": [
{
"name": "<string>",
"definition": "<string>",
"signature": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"databaseCollation": "<string>",
"sqlMode": "<string>",
"comment": "<string>",
"dependencyTables": [
{
"schema": "<string>",
"table": "<string>"
}
],
"skipDump": true
}
],
"procedures": [
{
"name": "<string>",
"definition": "<string>",
"signature": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"databaseCollation": "<string>",
"sqlMode": "<string>",
"comment": "<string>",
"skipDump": true
}
],
"streams": [
{
"name": "<string>",
"tableName": "<string>",
"owner": "<string>",
"comment": "<string>",
"type": "TYPE_UNSPECIFIED",
"stale": true,
"mode": "MODE_UNSPECIFIED",
"definition": "<string>"
}
],
"tasks": [
{
"name": "<string>",
"id": "<string>",
"owner": "<string>",
"comment": "<string>",
"warehouse": "<string>",
"schedule": "<string>",
"predecessors": [
"<string>"
],
"state": "STATE_UNSPECIFIED",
"condition": "<string>",
"definition": "<string>"
}
],
"materializedViews": [
{
"name": "<string>",
"definition": "<string>",
"comment": "<string>",
"dependencyColumns": [
{
"schema": "<string>",
"table": "<string>",
"column": "<string>"
}
],
"triggers": [
{
"name": "<string>",
"event": "<string>",
"timing": "<string>",
"body": "<string>",
"sqlMode": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"comment": "<string>",
"skipDump": true
}
],
"indexes": [
{
"name": "<string>",
"expressions": [
"<string>"
],
"keyLength": [
"<string>"
],
"descending": [
true
],
"type": "<string>",
"unique": true,
"primary": true,
"visible": true,
"comment": "<string>",
"definition": "<string>",
"parentIndexSchema": "<string>",
"parentIndexName": "<string>",
"granularity": "<string>",
"isConstraint": true,
"spatialConfig": {
"method": "<string>",
"tessellation": {
"scheme": "<string>",
"gridLevels": [
{
"level": 123,
"density": "<string>"
}
],
"cellsPerObject": 123,
"boundingBox": {
"xmin": 123,
"ymin": 123,
"xmax": 123,
"ymax": 123
}
},
"storage": {
"fillfactor": 123,
"buffering": "<string>",
"tablespace": "<string>",
"workTablespace": "<string>",
"sdoLevel": 123,
"commitInterval": 123,
"padIndex": true,
"sortInTempdb": "<string>",
"dropExisting": true,
"online": true,
"allowRowLocks": true,
"allowPageLocks": true,
"maxdop": 123,
"dataCompression": "<string>"
},
"dimensional": {
"dimensions": 123,
"dataType": "<string>",
"srid": 123,
"constraints": [
{
"dimension": "<string>",
"minValue": 123,
"maxValue": 123,
"tolerance": 123
}
]
}
},
"opclassNames": [
"<string>"
],
"opclassDefaults": [
true
]
}
],
"skipDump": true
}
],
"packages": [
{
"name": "<string>",
"definition": "<string>"
}
],
"owner": "<string>",
"sequences": [
{
"name": "<string>",
"dataType": "<string>",
"start": "<string>",
"minValue": "<string>",
"maxValue": "<string>",
"increment": "<string>",
"cycle": true,
"cacheSize": "<string>",
"lastValue": "<string>",
"ownerTable": "<string>",
"ownerColumn": "<string>",
"comment": "<string>",
"skipDump": true
}
],
"events": [
{
"name": "<string>",
"definition": "<string>",
"timeZone": "<string>",
"sqlMode": "<string>",
"characterSetClient": "<string>",
"collationConnection": "<string>",
"comment": "<string>"
}
],
"enumTypes": [
{
"name": "<string>",
"values": [
"<string>"
],
"comment": "<string>",
"skipDump": true
}
],
"skipDump": true,
"comment": "<string>"
}
],
"characterSet": "<string>",
"collation": "<string>",
"extensions": [
{
"name": "<string>",
"schema": "<string>",
"version": "<string>",
"description": "<string>"
}
],
"owner": "<string>",
"searchPath": "<string>"
}Filter is used to filter databases returned in the list. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Supported filter:
For example: schema == "schema-a" table == "table-a" table.matches("table-a") schema == "schema-a" && table.matches("sample") The filter used to search table with wildcard "sample" in the schema "schemas/schema-a". The column masking level will only be returned when a table filter is used.
Limit the response size of returned table metadata per schema. For example, if the database has 3 schemas, and each schema has 100 tables, if limit is 20, then only 20 tables will be returned for each schema, total 60 tables. Default 0, means no limit.
OK
DatabaseMetadata is the metadata for databases.
The database metadata name.
Format: instances/{instance}/databases/{database}/metadata
The schemas is the list of schemas in a database.
Show child attributes
The character_set is the character set of a database.
The collation is the collation of a database.
The extensions is the list of extensions in a database.
Show child attributes
The owner of the database.
The search_path is the search path of a PostgreSQL database.
Was this page helpful?