> ## 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 Domain

> Get a domain by ID or fully qualified name

# Retrieve a Domain

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

## Get by ID

**id** `string` *required*

UUID of the domain to retrieve.

**fields** `string`

Comma-separated list of fields to include, for example `owners,children,experts`.

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

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

## Get by Fully Qualified Name

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

**fqn** `string` *required*

Fully qualified name of the domain, for example `TestDomain` or `Engineering.DataPlatform`.

**fields** `string`

Comma-separated list of fields to include: `owners`, `children`, `experts`.

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

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

```python GET /v1/domains/{id} theme={null}
from metadata.sdk import configure
from metadata.sdk.entities import Domains

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

# Get by ID
domain = Domains.retrieve("a0729e98-e946-4e25-acde-10e8a2294ba1")
print(f"{domain.fullyQualifiedName.root}: {domain.domainType}")

# Get by ID with fields
domain = Domains.retrieve(
    "a0729e98-e946-4e25-acde-10e8a2294ba1",
    fields=["owners", "children", "experts"]
)

# Get by fully qualified name
domain = Domains.retrieve_by_name("TestDomain")

# Get by name with fields
domain = Domains.retrieve_by_name(
    "TestDomain",
    fields=["owners", "children", "experts"]
)
```

```java GET /v1/domains/{id} theme={null}
// client is an initialized OpenMetadataClient.
var domain = client.domains().get("a0729e98-e946-4e25-acde-10e8a2294ba1");

// Get by ID with fields
var domainWithFields = client.domains().get(
    "a0729e98-e946-4e25-acde-10e8a2294ba1",
    "owners,children,experts");

// Get by fully qualified name
var domainByName = client.domains().getByName("TestDomain");

// Get by name with fields
var domainByNameWithFields = client.domains().getByName(
    "TestDomain",
    "owners,children,experts");
```

```bash GET /v1/domains/{id} theme={null}
# Get by ID
curl "{base_url}/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1" \
  -H "Authorization: Bearer {access_token}"

# Get by ID with fields
curl "{base_url}/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1?fields=owners,children,experts" \
  -H "Authorization: Bearer {access_token}"

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

# Get by name with fields
curl "{base_url}/api/v1/domains/name/TestDomain?fields=owners,children,experts" \
  -H "Authorization: Bearer {access_token}"
```

```json Response theme={null}
{
  "id": "a0729e98-e946-4e25-acde-10e8a2294ba1",
  "domainType": "Aggregate",
  "name": "TestDomain",
  "fullyQualifiedName": "TestDomain",
  "description": "Lorem ipsum...",
  "version": 0.1,
  "updatedAt": 1769984330261,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1",
  "deleted": false,
  "owners": [],
  "children": []
}
```

***

## Returns

Returns a domain object with all requested fields populated.

## Response

**id** `string`

Unique identifier for the domain (UUID format).

**name** `string`

Domain name.

**fullyQualifiedName** `string`

Fully qualified name of the domain.

**displayName** `string`

Human-readable display name.

**description** `string`

Description of the domain in Markdown format.

**domainType** `string`

Type of domain: `Source-aligned`, `Consumer-aligned`, or `Aggregate`.

**owners** `array`

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

**children** `array`

Child domain references. Only included when `fields` contains `children`.

**experts** `array`

Subject matter experts. Only included when `fields` contains `experts`.

**version** `number`

Version number for the entity.

***

## Error Handling

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


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