# Get indexes

URL: https://docs.hanzo.ai/docs/openapi/index/get-index-indexes-by-uid

> Reads one index's definition.

`GET /v1/index/indexes/{uid}`

> [Index →](https://docs.hanzo.ai/docs/openapi/index) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                               |
| ------------- | --------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/index/indexes/{uid}` |
| **Method**    | `GET`                                         |
| **Operation** | `get_index_indexes_by_uid`                    |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`        |

Reads one index's definition.

Answers the index's uid, primary key and timestamps. An index this org does
not hold answers 404 carrying the dialect's `index_not_found` — the code a
Meilisearch client reads as permission to create it, which is why this is a
refusal rather than an empty object.

The uid is scoped to the caller's own org, so another tenant's index is
indistinguishable from one that never existed: this surface is not an
existence oracle.

## Request

1 field.

| Field | In   | Type   | Required | Description |
| ----- | ---- | ------ | -------- | ----------- |
| `uid` | path | string | yes      |             |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | index.indexView | ok      |
| `default` | problem-details | refused |

`200` body — 4 fields.

| Field        | In   | Type   | Always | Description                                                                       |
| ------------ | ---- | ------ | ------ | --------------------------------------------------------------------------------- |
| `createdAt`  | body | string | —      | CreatedAt is when this org first created the index, RFC 3339.                     |
| `primaryKey` | body | string | —      | PrimaryKey is the document field that identifies a row; an upsert is keyed on it. |
| `uid`        | body | string | —      | UID is the index's name within the org.                                           |
| `updatedAt`  | body | string | —      | UpdatedAt is when the index or its settings last changed, RFC 3339.               |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo index indexes get <uid>
```

**SDK**

**.ts**

```ts
import { Configuration, IndexApi } from 'hanzoai';

const api = new IndexApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getIndexIndexesByUid({ uid: 'uid' });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import IndexApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = IndexApi(client).get_index_indexes_by_uid(uid='uid')
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.IndexAPI.GetIndexIndexesByUid(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, index_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = index_api::get_index_indexes_by_uid(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.IndexApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new IndexApi(client).getIndexIndexesByUid();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/index/indexes/<uid> \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **index** through the `index` tool, which names its 14 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "get_index_health"
         }
       }
     }'
```

---

[Index API](https://docs.hanzo.ai/docs/openapi/index) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
