Get documents

Reads one of the caller org's documents — its name, opaque storage key, content type, page count, size and timestamps.

GET /v1/dataroom/documents/{id}

Addresshttps://api.hanzo.ai/v1/dataroom/documents/{id}
MethodGET
Operationget_dataroom_documents_by_id
AuthAuthorization: Bearer $HANZO_API_KEY

Reads one of the caller org's documents — its name, opaque storage key, content type, page count, size and timestamps.

The lookup runs in the caller's own tenant store, so an id belonging to another org is not found exactly like one that never existed. Metadata only: the bytes are a separate read.

Request

1 field.

FieldInTypeRequiredDescription
idpathstringyesID is the document to read.

Response

StatusBodyMeaning
200dataroom.dataroomDocumentOneok
defaultproblem-detailsrefused

200 body — 10 fields.

FieldInTypeAlwaysDescription
documentbodydataroom.dataroomDocument—
document.contentTypebodystring—ContentType is the mime type recorded at upload, null when none was sent.
document.createdAtbodyinteger (int64)—CreatedAt is when the document was uploaded, in unix milliseconds.
document.fileKeybodystring—FileKey is the opaque object-storage key the bytes are stored under.
document.fileSizebodyinteger (int64)—FileSize is the stored byte count, null when it was not recorded.
document.idbodystring—ID is the document id.
document.namebodystring—Name is the document's display name.
document.numPagesbodyinteger (int64)—NumPages is the page count, null when it was not supplied at upload.
document.typebodystring—Type is the document's kind, null when it was not recorded.
document.updatedAtbodyinteger (int64)—UpdatedAt is when the document row last changed, in unix milliseconds.

Failure carries the platform error shape — see Errors.

Examples

hanzo dataroom documents get <id>
import { Configuration, DataroomApi } from 'hanzoai';

const api = new DataroomApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDataroomDocumentsById({ id: 'id' });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import DataroomApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DataroomApi(client).get_dataroom_documents_by_id(id='id')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.DataroomAPI.GetDataroomDocumentsById(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, dataroom_api};

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

let result = dataroom_api::get_dataroom_documents_by_id(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DataroomApi;

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

var result = new DataroomApi(client).getDataroomDocumentsById();
curl https://api.hanzo.ai/v1/dataroom/documents/<id> \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches dataroom through the dataroom tool, which names its 19 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_dataroom_analytic_dataroom"
         }
       }
     }'

Dataroom API · All Hanzo APIs · Interactive reference

Was this page useful?