# Get dataroom

URL: https://docs.hanzo.ai/docs/openapi/dataroom/get-dataroom-analytics-dataroom-by-dataroomid

> Rolls up every share link pointing at one data room: session and page-view totals for the room, plus the per-page breakdown for each link beneath it.

`GET /v1/dataroom/analytics/dataroom/{dataroomId}`

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

|               |                                                                    |
| ------------- | ------------------------------------------------------------------ |
| **Address**   | `https://api.hanzo.ai/v1/dataroom/analytics/dataroom/{dataroomId}` |
| **Method**    | `GET`                                                              |
| **Operation** | `get_dataroom_analytics_dataroom_by_dataroomid`                    |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`                             |

Rolls up every share link pointing at one data room:
session and page-view totals for the room, plus the per-page breakdown for each
link beneath it.

A room id outside the caller's own tenant store is not found. Only links that
NAME the room are counted — a link created over a single document contributes
nothing here, even when that document also sits in the room.

## Request

1 field.

| Field        | In   | Type   | Required | Description                          |
| ------------ | ---- | ------ | -------- | ------------------------------------ |
| `dataroomId` | path | string | yes      | DataroomID is the room to report on. |

## Response

| Status    | Body                   | Meaning |
| --------- | ---------------------- | ------- |
| `200`     | dataroom.dataroomStats | ok      |
| `default` | problem-details        | refused |

`200` body — 12 fields.

| Field                           | In   | Type                          | Always | Description                                                              |
| ------------------------------- | ---- | ----------------------------- | ------ | ------------------------------------------------------------------------ |
| `dataroomId`                    | body | string                        | —      | DataroomId is the room these counts are for.                             |
| `links`                         | body | dataroom.dataroomLinkStats\[] | —      | Links is the same per-page breakdown for each link into the room.        |
| `links[].linkId`                | body | string                        | —      | LinkId is the link these counts are for.                                 |
| `links[].pages`                 | body | dataroom.dataroomPageStat\[]  | —      | Pages is the per-page breakdown, in page order.                          |
| `links[].pages[].avgDuration`   | body | integer (int64)               | —      | AvgDuration is totalDuration divided by views, rounded; 0 when unviewed. |
| `links[].pages[].pageNumber`    | body | integer (int64)               | —      | PageNumber is the page these counts are for.                             |
| `links[].pages[].totalDuration` | body | integer (int64)               | —      | TotalDuration is the summed dwell measure reported for the page.         |
| `links[].pages[].views`         | body | integer (int64)               | —      | Views is how many times the page was viewed.                             |
| `links[].totalPageViews`        | body | integer (int64)               | —      | TotalPageViews is how many page views the link received.                 |
| `links[].totalViews`            | body | integer (int64)               | —      | TotalViews is how many viewing sessions the link opened.                 |
| `totalPageViews`                | body | integer (int64)               | —      | TotalPageViews is the room's page views across every link.               |
| `totalViews`                    | body | integer (int64)               | —      | TotalViews is the room's viewing sessions across every link.             |

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

## Examples

**CLI**

```bash
hanzo dataroom analytics dataroom get <dataroomId>
```

**SDK**

**.ts**

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

const api = new DataroomApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDataroomAnalyticsDataroomByDataroomid({ dataroomId: 'dataroomId' });
```

**.py**

```python
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_analytics_dataroom_by_dataroomid(dataroom_id='dataroomId')
```

**.go**

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

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

**.rs**

```rust
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_analytics_dataroom_by_dataroomid(&cfg, Default::default()).await?;
```

**.java**

```java
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).getDataroomAnalyticsDataroomByDataroomid();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/dataroom/analytics/dataroom/<dataroomId> \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

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:

```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_dataroom_analytic_dataroom"
         }
       }
     }'
```

---

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