Export dataset

Reads a published version's rows back, one bounded page at a time, in the version's own stable row order.

GET /v1/dataset/{name}/export

Addresshttps://api.hanzo.ai/v1/dataset/{name}/export
MethodGET
OperationriskExportDataset
AuthAuthorization: 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.

FieldInTypeRequiredDescription
namepathstringyesName is the dataset, from the path.
versionqueryinteger—Version is the version to read.
splitquerystring—Split narrows to train, val or test.
offsetqueryinteger—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).
limitqueryinteger—Limit is how many rows to return.

Response

StatusBodyMeaning
200dataset.riskDatasetRowsok
defaultproblem-detailsrefused

200 body — 13 fields.

FieldInTypeAlwaysDescription
datasetbodystring—Dataset is the dataset the page was read from.
digestbodystring—Digest is the version's fingerprint.
dimsbodystring[]—Dims names what each coordinate of Point means, in Point's own order.
limitbodyinteger (int64)—Limit is the page size actually served: the one asked for, clamped to the plane's own bound of 5000.
offsetbodyinteger (int64)—Offset is where this page starts in the version's own row order, which is by row id and therefore stable forever.
rowsbodydataset.riskDatasetRow[]—Rows is the page.
rows[].atbodystring—At is the row's instant.
rows[].idbodystring—ID names the row forever.
rows[].kindbodystring—Kind is the subject kind: person, session or account.
rows[].pointbodynumber (double)[]—Point is the coordinates, in the order the version's spec names its dims.
rows[].splitbodystring—Split is train, val or test.
rows[].subjectbodystring—Subject is the identity within that kind — whose row this is.
versionbodyinteger (int64)—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 dataset export <name>
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 := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.DatasetAPI.RiskExportDataset(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::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.setBearerToken(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>"
           }
         }
       }
     }'

Dataset API · All Hanzo APIs · Interactive reference

Was this page useful?