Read a version's rows back, one page at a time
Reads a published version's rows back, one bounded page at a time, in the version's own stable row order. Only a published version can be exported.
GET /v1/dataset/{name}/export
| Address | https://api.hanzo.ai/v1/dataset/{name}/export |
| Method | GET |
| Operation | riskExportDataset |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Reads a published version's rows back, one bounded page at a time, in the version's own stable row order.
Only a published version can be exported. Rows written by an attempt that never completed are inert — no register row names them — and they are disposed of with the dataset.
Request
5 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | Name is the dataset, from the path. |
version | query | integer | — | Version is the version to read. |
split | query | string | — | Split narrows to train, val or test. |
offset | query | integer | — | Offset is where the page starts, in the version's own row order (by id, which is derived from the row and therefore stable forever). |
limit | query | integer | — | Limit is how many rows to return. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | riskDatasetRows | ok |
200 body — 13 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
dataset | body | string | — | Dataset is the dataset the page was read from. |
digest | body | string | — | Digest is the version's fingerprint. |
dims | body | string[] | — | Dims names what each coordinate of Point means, in Point's own order. |
limit | body | integer | — | Limit is the page size actually served: the one asked for, clamped to the plane's own bound of 5000. |
offset | body | integer | — | Offset is where this page starts in the version's own row order, which is by row id and therefore stable forever. |
rows | body | riskDatasetRow[] | — | Rows is the page. |
rows[].at | body | string | — | At is the row's instant. |
rows[].id | body | string | — | ID names the row forever. It is DERIVED from the row's own subject and instant, not allocated, so two materialisations of the same fact agree on it without… |
rows[].kind | body | string | — | Kind is the subject kind: person, session or account. |
rows[].point | body | number[] | — | Point is the coordinates, in the order the version's spec names its dims. |
rows[].split | body | string | — | Split is train, val or test. |
rows[].subject | body | string | — | Subject is the identity within that kind — whose row this is. |
version | body | integer | — | Version is which published version it was read from — the one asked for, or the newest published one when the request named none. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, DatasetApi } from 'hanzoai';
const api = new DatasetApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.riskExportDataset({ name: 'name' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import DatasetApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DatasetApi(client).risk_export_dataset(name='name')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.DatasetAPI.RiskExportDataset(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, dataset_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = dataset_api::risk_export_dataset(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DatasetApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new DatasetApi(client).riskExportDataset();curl https://api.hanzo.ai/v1/dataset/<name>/export \
-H "Authorization: Bearer $HANZO_API_KEY"Tool dataset, op riskExportDataset — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "dataset",
"arguments": {
"op": "riskExportDataset",
"input": {
"name": "<name>"
}
}
}
}'How is this guide?