export_datahub_dataset_records
Ingest third-party cost, usage, and metric-based data for analysis. Returns one page of the live records of a DataHub dataset, as CSV (default) or as newline-delimited JSON in the same shape as the /datahub/v1/events payload. A time window is required: startTime is inclusive, endTime is exclusive...
This record as markdown: /tools/doit/export-datahub-dataset-records.md
What export_datahub_dataset_records does on Doit
AI agents use export_datahub_dataset_records to create or update resources in Doit, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Doit environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
format | string | — | |
endTime | string | Yes | |
pageToken | string | — | |
startTime | string | Yes | |
maxResults | number | — | |
customerContext | string | — | Scope the request to a specific customer by ID. Required for DoiT employees (whose token isn't tied to a single customer); omit for direct customer users. |
Parameters from the server's own tool schema.
Why export_datahub_dataset_records is rated Medium
An AI agent can call export_datahub_dataset_records faster than any human can review: one bad instruction and it creates or modifies resources in Doit by the hundred, each call as confident as the last.
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs export_datahub_dataset_records safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Doit, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For export_datahub_dataset_records, this is the rule to start with:
export_datahub_dataset_records stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Doit, apply this rule, and every export_datahub_dataset_records call is checked against it from then on.
Questions about export_datahub_dataset_records
Ingest third-party cost, usage, and metric-based data for analysis. Returns one page of the live records of a DataHub dataset, as CSV (default) or as newline-delimited JSON in the same shape as the /datahub/v1/events payload. A time window is required: startTime is inclusive, endTime is exclusive, and the window must not exceed 366 days. Rows are ordered by their event time and event id, and pages never overlap: read the X-Next-Page-Token response header and pass it back as pageToken until the header is absent. X-Row-Count carries the number of rows in the page. Only live rows are returned; rows deleted through the console or the delete endpoints are excluded. Every row starts with five provenance columns (event_id, batch, source, export_time, updated_by) followed by the dataset's business columns in the CSV ingest vocabulary (usage_date, fixed.<key>, label.<key>, project_label.<key>, system_label.<key>, metric.<type>). The business columns are computed from the rows of each page, so consecutive pages can have different label and metric columns; union the headers when concatenating pages. Datasets created with the FOCUS schema template use the FOCUS column names instead and can only be exported as CSV. To re-import an export into another dataset, drop the batch, source, export_time and updated_by columns, and either drop event_id or rename it to id. This tool returns a JSON envelope with data (the unchanged CSV or JSONL page body) and pageToken (from X-Next-Page-Token). Pass a non-empty pageToken back as pageToken to advance; null means the final page. MCP does not expose the HTTP headers directly. It is categorised as a Write tool in the Doit MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
export_datahub_dataset_records accepts 7 parameters: name, format, endTime, pageToken, startTime, maxResults, customerContext. Required: name, endTime, startTime. The full parameter table on this page comes from the server's own tool schema.
Register the Doit MCP server in PolicyLayer and add a rule for export_datahub_dataset_records: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Doit. Nothing to install.
export_datahub_dataset_records is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the export_datahub_dataset_records rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for export_datahub_dataset_records. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
export_datahub_dataset_records is provided by the Doit MCP server (@doitintl/doit-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Doit, and thousands of servers like it.
This server
Across the catalogue