> For the complete documentation index, see [llms.txt](https://docs.opendatadiscovery.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opendatadiscovery.org/developer-guides/api-reference/directory.md).

# Directory

The Directory is backed by four `GET` endpoints in `DirectoryController.java`. Every level on the UI maps to one call; the display names and entity counts surfaced at level 1 are derived at request time by parsing the [ODDRN](/introduction/main-concepts.md#oddrn) of every registered data source through `oddrn-generator`'s `Generator.parse(...)`. For the level-by-level walkthrough and the relationship to the Catalog Overview surface, see the [Directory](/features/data-discovery/directory.md) page.

{% hint style="info" %}
**A data source whose ODDRN cannot be parsed is silently bucketed under "Other".** When `Generator.parse(...)` throws or yields no prefix for a given ODDRN, the failure is logged server-side and swallowed — the request still succeeds, and the source is folded into the level-1 `other` group (display name "Other") rather than surfaced under its own type or returned as an error. A source that disappears from its expected type and reappears under "Other" is the signal that its ODDRN does not match a generator-known prefix; check the platform logs for the parse error rather than expecting an error from the endpoint.
{% endhint %}

| Method | Path                                                                              | Operation ID                 | Purpose                                                                                                                                             |
| ------ | --------------------------------------------------------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET`  | `/api/directory`                                                                  | `getDataSourceTypes`         | Level 1 — list every ODDRN-prefix that has at least one registered data source, with display name and entity count.                                 |
| `GET`  | `/api/directory/datasources?prefix={type-prefix}`                                 | `getDirectoryDatasourceList` | Level 2 — list registered data sources for the given prefix; each result carries the source's ODDRN-derived properties and per-source entity count. |
| `GET`  | `/api/directory/datasources/{data_source_id}/types`                               | `getDatasourceEntityTypes`   | Level 3 — list `DataEntityType` values present in the given data source.                                                                            |
| `GET`  | `/api/directory/datasources/{data_source_id}?type_id={type-id}&page={n}&size={m}` | `getDatasourceEntities`      | Level 4 — paged list of entities of the chosen type within the chosen data source. Delegates to `DataEntityService`.                                |

## See also

* [API Reference hub](/developer-guides/api-reference.md) — the full per-feature index.
* [Directory](/features/data-discovery/directory.md) — feature description, four-level walkthrough, UI entry points.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.opendatadiscovery.org/developer-guides/api-reference/directory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
