List documents
Pages through the documents in an index. Answers the org's stored documents in insertion order, whole, with the page's bounds and the index's total.
GET /v1/index/indexes/{uid}/documents
| Address | https://api.hanzo.ai/v1/index/indexes/{uid}/documents |
| Method | GET |
| Operation | get_index_indexes_by_uid_documents |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Pages through the documents in an index.
Answers the org's stored documents in insertion order, whole, with the page's bounds and the index's total. It is the enumeration surface — search ranks by relevance and cannot walk a corpus — so a caller reconciling what it has written reads it here.
An index this org does not hold answers 404 carrying the dialect's
index_not_found.
Request
3 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
uid | path | string | yes | |
limit | query | string | — | |
offset | query | string | — |
Response
| Status | Body | Meaning |
|---|---|---|
200 | indexDocuments | ok |
200 body — 4 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
limit | body | integer | — | Limit is how many documents this page could hold. |
offset | body | integer | — | Offset is where this page starts. |
results | body | any[] | — | Results are the documents themselves, exactly as they were stored. |
total | body | integer | — | Total is how many documents the index holds altogether. |
Failure carries the platform error shape — see Errors.
Examples
hanzo index indexes documents list <uid>import { Configuration, IndexApi } from 'hanzoai';
const api = new IndexApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getIndexIndexesByUidDocuments({ uid: 'uid' });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_documents(uid='uid')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.IndexAPI.GetIndexIndexesByUidDocuments(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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_documents(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.IndexApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new IndexApi(client).getIndexIndexesByUidDocuments();curl https://api.hanzo.ai/v1/index/indexes/<uid>/documents \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches index through the index tool, which names its 17 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
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"
}
}
}'How is this guide?