> ## Documentation Index
> Fetch the complete documentation index at: https://quantura.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish Canvas datasets

> Administrator API and MCP access to Quantura’s shared SageMaker Canvas library.

Canvas publication is restricted to currently verified Quantura platform administrators. Organization administrators and ordinary Pro subscribers cannot publish to the shared library. Authentication uses the same OAuth connection or personal API key as the rest of Quantura. Personal keys also need `sagemaker:publish`.

## Preview first

`POST https://quantura.studio/api/v1/admin/sagemaker/datasets/preview`

Send JSON containing the original `csv` string. This validates dates, numeric values, quantile ordering and file limits without writing to GitHub. The response includes the original headers, detected quantiles, row count and preview.

```json theme={null}
{
  "csv": "date,P01,P50,P99\n2026-10-29,80,100,120\n"
}
```

Use `Authorization: Bearer YOUR_SECURELY_STORED_TOKEN` and `Content-Type: application/json`. Keep tokens in your agent’s credential store; never include them in datasets or committed examples.

## Publish an authorized dataset

`POST https://quantura.studio/api/v1/admin/sagemaker/datasets`

```json theme={null}
{
  "name": "SPY Canvas forecast",
  "ticker": "SPY",
  "csv": "date,P01,P50,P99\n2026-10-29,80,100,120\n",
  "metrics": {"rmse": 1.2, "smape": 0.05},
  "metrics_basis": "Canvas holdout evaluation"
}
```

Only include metrics measured for this dataset; they are optional. `smape` uses a fraction from 0 to 2. Each request accepts at most 3,000,000 UTF-8 CSV bytes. The CSV must satisfy the parser’s 100,000-row limit and supported timestamp/column rules. See the preview error before retrying a rejected file.

Publication commits `sagemaker/uploads/<SHA-256>.csv` and `sagemaker/catalog.json` together on the configured GitHub branch. A non-force reference update protects concurrent changes. The response contains the dataset identity, Git commit and viewer URL. GitHub remains the source of the shared Canvas catalog; no duplicate database or model-training job is created.

The same catalog supplies Search, original-column previews, quantile charts and original CSV downloads. Catalog caches refresh within roughly one minute. **Published contents are available to other Quantura users.** Upload only data you are authorized to distribute. A private source repository does not make a published dataset private.

Saved forecast quantiles remain Download resources. They cannot be used as historical observations for a new forecast. Historical datasets with observed values retain their separate Search/download/forecast behavior.

## MCP tools

Connect to `https://quantura.studio/mcp`, then use:

1. `quantura_admin_preview_canvas` with `csv`.
2. `quantura_admin_publish_canvas` with `csv`, `name`, `ticker` and optional metrics.

The publication tool is a mutation and creates a Git commit. Preview is read-only. Both recheck current administrator identity server-side. OAuth uses the existing identity scopes; an editable profile field or supplied email cannot grant this role.

## Errors

| Status | Meaning |
| - | - |
| 401 | Missing or invalid authentication |
| 403 | Current platform-admin identity or publish scope is missing |
| 422 | CSV or metadata validation failed |
| 503 | GitHub/catalog access is unavailable; do not assume publication succeeded |

After an ambiguous network failure, inspect Search or the catalog for the CSV’s content identity before repeating a publication. This endpoint does not delete or overwrite arbitrary GitHub files.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.