> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://docs.ampdb.io/api/mcp` to find what you need.

# Registry Reference

:::note
The registry client has no service to talk to right now.
:::

The registry client is in the `amp.registry` package.

## `RegistryClient`

```python
from amp.registry import RegistryClient

RegistryClient(
    base_url: str = 'https://api.registry.amp.staging.thegraph.com',
    auth_token: str | None = None,
    auth: bool = False,
)
```

`auth_token` and `auth` work as they do for a [`Client`](/sdks/python/reference/client#client). `datasets` is its
[`RegistryDatasetsClient`](/sdks/python/reference/registry#registrydatasetsclient), and `close()` closes its connections. It's also a context manager,
which closes them at the end of its `with` block.

A `Client` has one as `client.registry`, for the URL in its `registry_url` argument. Pass `registry_url=None` for a
`Client` without one: `client.registry` then raises `ValueError: Registry API not configured. …`.

## `RegistryDatasetsClient`

`registry.datasets` has these methods:

```python
list(limit: int = 50, page: int = 1, sort_by: str | None = None, direction: str | None = None) -> DatasetListResponse
search(query: str, limit: int = 50, page: int = 1) -> DatasetSearchResponse
ai_search(query: str, limit: int = 50) -> list[DatasetWithScore]
get(namespace: str, name: str) -> Dataset
list_versions(namespace: str, name: str) -> list[DatasetVersion]
get_version(namespace: str, name: str, version: str) -> DatasetVersion
get_manifest(namespace: str, name: str, version: str) -> dict
describe(namespace: str, name: str, version: str = 'latest') -> dict[str, list[dict]]
inspect(namespace: str, name: str, version: str = 'latest') -> None
publish(
    namespace: str,
    name: str,
    version: str,
    manifest: dict,
    visibility: str = 'public',
    description: str | None = None,
    tags: list[str] | None = None,
    chains: list[str] | None = None,
    sources: list[str] | None = None,
) -> Dataset
publish_version(namespace: str, name: str, version: str, manifest: dict, description: str | None = None) -> DatasetVersion
update(
    namespace: str,
    name: str,
    description: str | None = None,
    tags: list[str] | None = None,
    chains: list[str] | None = None,
    sources: list[str] | None = None,
) -> Dataset
update_visibility(namespace: str, name: str, visibility: str) -> Dataset
update_version_status(namespace: str, name: str, version: str, status: str) -> DatasetVersion
delete_version(namespace: str, name: str, version: str) -> ArchiveDatasetVersionResponse
```

The types they return are in `amp.registry.models`.

## Errors

The methods raise `RegistryError`, or one of its subclasses, from `amp.registry.errors`: `DatasetNotFoundError`,
`DatasetVersionNotFoundError`, `UnauthorizedError`, `ForbiddenError`, `ValidationError`, and `RegistryDatabaseError`.
