> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a Database Service

> Get a database service by ID or fully qualified name

# Retrieve a Database Service

Get a single database service by its unique ID or fully qualified name.

## Get by ID

**id** `string` *required*

UUID of the database service to retrieve.

**fields** `string`

Comma-separated list of fields to include. Valid fields: `pipelines`, `owners`, `tags`, `domains`, `followers`.

**include** `string` (default: non-deleted)

Include `all`, `deleted`, or `non-deleted` entities.

## Get by Fully Qualified Name

Use `GET /v1/services/databaseServices/name/{fqn}` to retrieve by fully qualified name.

**fqn** `string` *required*

Fully qualified name of the database service, for example `snowflake_prod`.

**fields** `string`

Comma-separated list of fields to include. Valid fields: `pipelines`, `owners`, `tags`, `domains`, `followers`.

**include** `string` (default: non-deleted)

Include `all`, `deleted`, or `non-deleted` entities.

```python GET /v1/services/databaseServices/{id} theme={null}
from metadata.sdk import configure
from metadata.sdk.entities import DatabaseServices

configure(
    host="https://your-company.open-metadata.org/api",
    jwt_token="your-jwt-token"
)

# Get by ID
service = DatabaseServices.retrieve("a1b2c3d4-e5f6-7890-abcd-ef1234567890")
print(f"{service.fullyQualifiedName.root}: {service.serviceType}")

# Get by ID with fields
service = DatabaseServices.retrieve(
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    fields=["owners", "tags"]
)

# Get by fully qualified name
service = DatabaseServices.retrieve_by_name("snowflake_prod")

# Get by name with fields
service = DatabaseServices.retrieve_by_name(
    "snowflake_prod",
    fields=["owners", "tags", "domains"]
)
```

```java GET /v1/services/databaseServices/{id} theme={null}
import org.openmetadata.schema.entity.services.DatabaseService;
import org.openmetadata.sdk.fluent.DatabaseServices;

// Get by ID
DatabaseService service = DatabaseServices.retrieve("a1b2c3d4-e5f6-7890-abcd-ef1234567890");

// Get by fully qualified name
DatabaseService serviceByName = DatabaseServices.retrieveByName("snowflake_prod");
```

```bash GET /v1/services/databaseServices/{id} theme={null}
# Get by ID
curl "{base_url}/api/v1/services/databaseServices/fd2193af-fe09-4366-92b7-1e0d01cd8c09" \
  -H "Authorization: Bearer {access_token}"

# Get by ID with fields
curl "{base_url}/api/v1/services/databaseServices/fd2193af-fe09-4366-92b7-1e0d01cd8c09?fields=owners,tags" \
  -H "Authorization: Bearer {access_token}"

# Get by fully qualified name
curl "{base_url}/api/v1/services/databaseServices/name/sample_data" \
  -H "Authorization: Bearer {access_token}"

# Get by name with fields
curl "{base_url}/api/v1/services/databaseServices/name/sample_data?fields=owners,tags,domains" \
  -H "Authorization: Bearer {access_token}"
```

```json Response theme={null}
{
  "id": "fd2193af-fe09-4366-92b7-1e0d01cd8c09",
  "name": "sample_data",
  "fullyQualifiedName": "sample_data",
  "serviceType": "BigQuery",
  "description": "Sample data service for BigQuery",
  "version": 0.1,
  "updatedAt": 1769982650000,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/services/databaseServices/fd2193af-fe09-4366-92b7-1e0d01cd8c09",
  "connection": {
    "config": {
      "type": "BigQuery",
      "scheme": "bigquery",
      "hostPort": "bigquery.googleapis.com",
      "taxonomyProjectID": [],
      "taxonomyLocation": "us",
      "usageLocation": "us",
      "supportsMetadataExtraction": true,
      "supportsUsageExtraction": true,
      "supportsLineageExtraction": true,
      "supportsDBTExtraction": true,
      "supportsProfiler": true,
      "supportsQueryComment": true
    }
  },
  "owners": [],
  "tags": [],
  "deleted": false,
  "domains": [],
  "entityStatus": "Unprocessed"
}
```

***

## Returns

Returns a database service object with all requested fields populated.

## Response

**id** `string`

Unique identifier for the database service (UUID format).

**name** `string`

Database service name.

**fullyQualifiedName** `string`

Fully qualified name of the service.

**displayName** `string`

Human-readable display name.

**description** `string`

Description of the database service in Markdown format.

**serviceType** `string`

Type of database service, for example Snowflake, BigQuery, PostgreSQL.

**connection** `object`

Connection configuration for the service.

**properties**

**config** `object`

Service-specific connection configuration.

**version** `number`

Version number for the entity.

**owners** `array`

List of owners. Only included when `fields` contains `owners`.

**tags** `array`

Classification tags. Only included when `fields` contains `tags`.

**domains** `array`

Domain assignments. Only included when `fields` contains `domains`.

**followers** `array`

Users following this service. Only included when `fields` contains `followers`.

**pipelines** `array`

Ingestion pipelines associated with this service. Only included when `fields` contains `pipelines`.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to view this database service |
| `404` | `NOT_FOUND` | Database service with given ID or FQN does not exist |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.