GET /v1/databaseSchemas/{id}
from metadata.sdk import configure
from metadata.sdk.entities import DatabaseSchemas
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# Get by ID
schema = DatabaseSchemas.retrieve("770e8400-e29b-41d4-a716-446655440000")
print(f"{schema.fullyQualifiedName.root}: {schema.name.root}")
# Get by ID with fields
schema = DatabaseSchemas.retrieve(
"770e8400-e29b-41d4-a716-446655440000",
fields=["owners", "tags", "usageSummary"]
)
# Get by fully qualified name
schema = DatabaseSchemas.retrieve_by_name("snowflake_prod.analytics.public")
# Get by name with fields
schema = DatabaseSchemas.retrieve_by_name(
"snowflake_prod.analytics.public",
fields=["owners", "tags", "domains"]
)
import org.openmetadata.schema.entity.data.DatabaseSchema;
// client is an initialized OpenMetadataClient.
// Get by ID
DatabaseSchema schema = client.databaseSchemas().get("770e8400-e29b-41d4-a716-446655440000");
// Get by fully qualified name
DatabaseSchema schemaByName = client.databaseSchemas().getByName("snowflake_prod.analytics.public");
# Get by ID
curl "{base_url}/api/v1/databaseSchemas/f681432b-e66c-4096-a1cd-7771358c5323" \
-H "Authorization: Bearer {access_token}"
# Get by ID with fields
curl "{base_url}/api/v1/databaseSchemas/f681432b-e66c-4096-a1cd-7771358c5323?fields=owners,tables,tags,usageSummary" \
-H "Authorization: Bearer {access_token}"
# Get by fully qualified name
curl "{base_url}/api/v1/databaseSchemas/name/Glue.default.information_schema" \
-H "Authorization: Bearer {access_token}"
# Get by name with fields
curl "{base_url}/api/v1/databaseSchemas/name/Glue.default.information_schema?fields=owners,tables,tags,domains" \
-H "Authorization: Bearer {access_token}"
{
"id": "f681432b-e66c-4096-a1cd-7771358c5323",
"name": "information_schema",
"fullyQualifiedName": "Glue.default.information_schema",
"description": "This **mock** database contains tables related to the Glue service",
"version": 0.1,
"updatedAt": 1769982658171,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/databaseSchemas/f681432b-e66c-4096-a1cd-7771358c5323",
"owners": [],
"service": {
"id": "0fab117a-4c58-4ebb-9d42-beab0768fa8e",
"type": "databaseService",
"name": "Glue",
"fullyQualifiedName": "Glue",
"displayName": "Glue",
"deleted": false,
"href": "http://localhost:8585/api/v1/services/databaseServices/0fab117a-4c58-4ebb-9d42-beab0768fa8e"
},
"serviceType": "Glue",
"database": {
"id": "9655ba5b-b8d7-419c-98f4-16b976692ad8",
"type": "database",
"name": "default",
"fullyQualifiedName": "Glue.default",
"description": "This **mock** database contains tables related to the Glue service",
"displayName": "default",
"deleted": false,
"href": "http://localhost:8585/api/v1/databases/9655ba5b-b8d7-419c-98f4-16b976692ad8"
},
"tables": [
{
"id": "49cae725-62e6-48b4-b604-7ea915659d9a",
"type": "table",
"name": "sales",
"fullyQualifiedName": "Glue.default.information_schema.sales",
"description": "Sales data",
"displayName": "sales",
"deleted": false,
"href": "http://localhost:8585/api/v1/tables/49cae725-62e6-48b4-b604-7ea915659d9a"
},
{
"id": "b9988329-cb3e-469b-8d10-d6a21de8b0b9",
"type": "table",
"name": "marketing",
"fullyQualifiedName": "Glue.default.information_schema.marketing",
"description": "Marketing data",
"displayName": "marketing",
"deleted": false,
"href": "http://localhost:8585/api/v1/tables/b9988329-cb3e-469b-8d10-d6a21de8b0b9"
}
],
"tags": [],
"deleted": false,
"sourceUrl": "https://www.glue.com/information_schema",
"domains": [],
"entityStatus": "Unprocessed"
}
Retrieve a Database Schema
Retrieve a database schema entity by UUID or fully qualified name with optional field expansion for tables, owners, tags, and custom properties using the Collate REST API.
GET
/
v1
/
databaseSchemas
/
{id}
GET /v1/databaseSchemas/{id}
from metadata.sdk import configure
from metadata.sdk.entities import DatabaseSchemas
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# Get by ID
schema = DatabaseSchemas.retrieve("770e8400-e29b-41d4-a716-446655440000")
print(f"{schema.fullyQualifiedName.root}: {schema.name.root}")
# Get by ID with fields
schema = DatabaseSchemas.retrieve(
"770e8400-e29b-41d4-a716-446655440000",
fields=["owners", "tags", "usageSummary"]
)
# Get by fully qualified name
schema = DatabaseSchemas.retrieve_by_name("snowflake_prod.analytics.public")
# Get by name with fields
schema = DatabaseSchemas.retrieve_by_name(
"snowflake_prod.analytics.public",
fields=["owners", "tags", "domains"]
)
import org.openmetadata.schema.entity.data.DatabaseSchema;
// client is an initialized OpenMetadataClient.
// Get by ID
DatabaseSchema schema = client.databaseSchemas().get("770e8400-e29b-41d4-a716-446655440000");
// Get by fully qualified name
DatabaseSchema schemaByName = client.databaseSchemas().getByName("snowflake_prod.analytics.public");
# Get by ID
curl "{base_url}/api/v1/databaseSchemas/f681432b-e66c-4096-a1cd-7771358c5323" \
-H "Authorization: Bearer {access_token}"
# Get by ID with fields
curl "{base_url}/api/v1/databaseSchemas/f681432b-e66c-4096-a1cd-7771358c5323?fields=owners,tables,tags,usageSummary" \
-H "Authorization: Bearer {access_token}"
# Get by fully qualified name
curl "{base_url}/api/v1/databaseSchemas/name/Glue.default.information_schema" \
-H "Authorization: Bearer {access_token}"
# Get by name with fields
curl "{base_url}/api/v1/databaseSchemas/name/Glue.default.information_schema?fields=owners,tables,tags,domains" \
-H "Authorization: Bearer {access_token}"
{
"id": "f681432b-e66c-4096-a1cd-7771358c5323",
"name": "information_schema",
"fullyQualifiedName": "Glue.default.information_schema",
"description": "This **mock** database contains tables related to the Glue service",
"version": 0.1,
"updatedAt": 1769982658171,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/databaseSchemas/f681432b-e66c-4096-a1cd-7771358c5323",
"owners": [],
"service": {
"id": "0fab117a-4c58-4ebb-9d42-beab0768fa8e",
"type": "databaseService",
"name": "Glue",
"fullyQualifiedName": "Glue",
"displayName": "Glue",
"deleted": false,
"href": "http://localhost:8585/api/v1/services/databaseServices/0fab117a-4c58-4ebb-9d42-beab0768fa8e"
},
"serviceType": "Glue",
"database": {
"id": "9655ba5b-b8d7-419c-98f4-16b976692ad8",
"type": "database",
"name": "default",
"fullyQualifiedName": "Glue.default",
"description": "This **mock** database contains tables related to the Glue service",
"displayName": "default",
"deleted": false,
"href": "http://localhost:8585/api/v1/databases/9655ba5b-b8d7-419c-98f4-16b976692ad8"
},
"tables": [
{
"id": "49cae725-62e6-48b4-b604-7ea915659d9a",
"type": "table",
"name": "sales",
"fullyQualifiedName": "Glue.default.information_schema.sales",
"description": "Sales data",
"displayName": "sales",
"deleted": false,
"href": "http://localhost:8585/api/v1/tables/49cae725-62e6-48b4-b604-7ea915659d9a"
},
{
"id": "b9988329-cb3e-469b-8d10-d6a21de8b0b9",
"type": "table",
"name": "marketing",
"fullyQualifiedName": "Glue.default.information_schema.marketing",
"description": "Marketing data",
"displayName": "marketing",
"deleted": false,
"href": "http://localhost:8585/api/v1/tables/b9988329-cb3e-469b-8d10-d6a21de8b0b9"
}
],
"tags": [],
"deleted": false,
"sourceUrl": "https://www.glue.com/information_schema",
"domains": [],
"entityStatus": "Unprocessed"
}
Retrieve a Database Schema
Get a single database schema by its unique ID or fully qualified name.Get by ID
Comma-separated list of fields to include:
owners, tables, usageSummary, tags, certification, extension, domains, sourceHash, followers.Get by Fully Qualified Name
UseGET /v1/databaseSchemas/name/{fqn} to retrieve by fully qualified name.
Comma-separated list of fields to include:
owners, tables, usageSummary, tags, certification, extension, domains, sourceHash, followers.GET /v1/databaseSchemas/{id}
from metadata.sdk import configure
from metadata.sdk.entities import DatabaseSchemas
configure(
host="https://your-company.getcollate.io/api",
jwt_token="your-jwt-token"
)
# Get by ID
schema = DatabaseSchemas.retrieve("770e8400-e29b-41d4-a716-446655440000")
print(f"{schema.fullyQualifiedName.root}: {schema.name.root}")
# Get by ID with fields
schema = DatabaseSchemas.retrieve(
"770e8400-e29b-41d4-a716-446655440000",
fields=["owners", "tags", "usageSummary"]
)
# Get by fully qualified name
schema = DatabaseSchemas.retrieve_by_name("snowflake_prod.analytics.public")
# Get by name with fields
schema = DatabaseSchemas.retrieve_by_name(
"snowflake_prod.analytics.public",
fields=["owners", "tags", "domains"]
)
import org.openmetadata.schema.entity.data.DatabaseSchema;
// client is an initialized OpenMetadataClient.
// Get by ID
DatabaseSchema schema = client.databaseSchemas().get("770e8400-e29b-41d4-a716-446655440000");
// Get by fully qualified name
DatabaseSchema schemaByName = client.databaseSchemas().getByName("snowflake_prod.analytics.public");
# Get by ID
curl "{base_url}/api/v1/databaseSchemas/f681432b-e66c-4096-a1cd-7771358c5323" \
-H "Authorization: Bearer {access_token}"
# Get by ID with fields
curl "{base_url}/api/v1/databaseSchemas/f681432b-e66c-4096-a1cd-7771358c5323?fields=owners,tables,tags,usageSummary" \
-H "Authorization: Bearer {access_token}"
# Get by fully qualified name
curl "{base_url}/api/v1/databaseSchemas/name/Glue.default.information_schema" \
-H "Authorization: Bearer {access_token}"
# Get by name with fields
curl "{base_url}/api/v1/databaseSchemas/name/Glue.default.information_schema?fields=owners,tables,tags,domains" \
-H "Authorization: Bearer {access_token}"
{
"id": "f681432b-e66c-4096-a1cd-7771358c5323",
"name": "information_schema",
"fullyQualifiedName": "Glue.default.information_schema",
"description": "This **mock** database contains tables related to the Glue service",
"version": 0.1,
"updatedAt": 1769982658171,
"updatedBy": "admin",
"href": "http://localhost:8585/api/v1/databaseSchemas/f681432b-e66c-4096-a1cd-7771358c5323",
"owners": [],
"service": {
"id": "0fab117a-4c58-4ebb-9d42-beab0768fa8e",
"type": "databaseService",
"name": "Glue",
"fullyQualifiedName": "Glue",
"displayName": "Glue",
"deleted": false,
"href": "http://localhost:8585/api/v1/services/databaseServices/0fab117a-4c58-4ebb-9d42-beab0768fa8e"
},
"serviceType": "Glue",
"database": {
"id": "9655ba5b-b8d7-419c-98f4-16b976692ad8",
"type": "database",
"name": "default",
"fullyQualifiedName": "Glue.default",
"description": "This **mock** database contains tables related to the Glue service",
"displayName": "default",
"deleted": false,
"href": "http://localhost:8585/api/v1/databases/9655ba5b-b8d7-419c-98f4-16b976692ad8"
},
"tables": [
{
"id": "49cae725-62e6-48b4-b604-7ea915659d9a",
"type": "table",
"name": "sales",
"fullyQualifiedName": "Glue.default.information_schema.sales",
"description": "Sales data",
"displayName": "sales",
"deleted": false,
"href": "http://localhost:8585/api/v1/tables/49cae725-62e6-48b4-b604-7ea915659d9a"
},
{
"id": "b9988329-cb3e-469b-8d10-d6a21de8b0b9",
"type": "table",
"name": "marketing",
"fullyQualifiedName": "Glue.default.information_schema.marketing",
"description": "Marketing data",
"displayName": "marketing",
"deleted": false,
"href": "http://localhost:8585/api/v1/tables/b9988329-cb3e-469b-8d10-d6a21de8b0b9"
}
],
"tags": [],
"deleted": false,
"sourceUrl": "https://www.glue.com/information_schema",
"domains": [],
"entityStatus": "Unprocessed"
}
Returns
Returns a database schema object with all requested fields populated.Response
Error Handling
| Code | Error Type | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to view this schema |
404 | NOT_FOUND | Schema with given ID or FQN does not exist |
Was this page helpful?