Datasets Attach Dataset
datasets_attach_datasetAttach an existing DataSource row to a revision.
For a fresh file upload, POST .../datasets/upload creates the
DataSource + link in one shot. A client that can only send JSON — every
MCP client — uploads with POST /uploads/presign, sends the file the
way its method says, calls POST /uploads/confirm and attaches the
result here, with the file's role. The upload is checked after
confirm answers: until it is confirmed this answers 409 with
details.reason upload_pending and Retry-After (also as
details.retry_after_s) — ask again then. An upload that was refused,
could not be checked or was cancelled answers 409 upload_rejected,
upload_failed or upload_cancelled, which waiting does not change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | Role of the file on the revision (e.g. cad_3d for a 3D CAD model, drawing_2d for a 2D drawing). | other |
| part_id | Yes | ||
| attributes | No | Free-form metadata for the attachment, as a JSON object. | |
| is_primary | No | Whether this dataset is the primary one for the revision. | |
| revision_id | Yes | ||
| data_source_id | Yes | Identifier of the uploaded data source to attach to the revision. |