Datasets are the core data containers in PrintHeritage — each one represents a named sensor channel attached to a structural monitoring project. The two endpoints below let you ingest time-series readings into a project (creating a new dataset or updating an existing one in place) and permanently remove a dataset by its ID. All requests must carry a valid Bearer token, and the requesting user must already have access to the target project.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/joaomonteir0/printheritage/llms.txt
Use this file to discover all available pages before exploring further.
Dataset schema
A dataset object is stored as a JSON document inside the project’sdatasets array. Every field shown below may be present in both request payloads and responses.
PATCH /projects//data
Adds a new dataset to a project or, if a dataset with the sameid or label already exists, updates its readings and merges the supplied metadata over the stored metadata. On success the endpoint returns the canonical dataset_id regardless of whether a create or an update occurred.
This endpoint accepts a free-form JSON body. All fields other than
data are optional, but omitting label causes the dataset to be stored under the default name “Novo Sensor”.Path parameters
UUID of the project to which the dataset belongs.
Request body fields
Human-readable name for the sensor or dataset channel. If a dataset with this
label already exists in the project, its data will be overwritten rather than
a new dataset being created.
Array of time-series reading objects. Each object must contain a
date field
(ISO 8601 string) plus one or more numeric measurement columns.Optional metadata describing display and sensor characteristics.
Optional client-supplied dataset ID. When provided and a dataset with this
exact ID already exists in the project, that dataset is updated rather than a
new one being created.
Response
Always
true on success.The ID of the dataset that was created or updated.
Example — add a temperature sensor with 3 readings
A side-effect audit log entry with action
PROJECT_DATA_ADD is written on every successful call, recording the acting user and the target project ID.DELETE /projects//datasets/
Permanently removes a single dataset from a project. The caller must hold at least thePROJECT_ADMIN role on the project — users with the VISUALIZER role will receive a 403 error.
Path parameters
UUID of the project that owns the dataset.
ID of the dataset to delete, as returned by
PATCH /projects/{project_id}/data.Response
true when the dataset was found and deleted, or when the project has no
datasets at all (idempotent).Error responses
| Status | Condition |
|---|---|
403 | Caller’s role is VISUALIZER — insufficient permissions to delete datasets. |
401 | Missing or invalid Bearer token. |
Example
A side-effect audit log entry with action
PROJECT_DATA_DELETE is written on every successful deletion, recording the acting user and the target project ID.