# Read signal data (https://docs.pulsarml.com/v1/api-reference/signals/get-machines-machine_uuid-signals-public_id)

Return aggregated raw sensor points for one signal.

Samples are bucketed before they are returned. The bucket width is
`agg_period` x `agg_unit` (`agg_period=15`, `agg_unit=m` is a 15-minute bucket) and
`agg_function` is how samples inside a bucket are reduced.

By default points are returned as a `data` list of `{timestamp, value}` objects. Pass
`transpose=true` to get two arrays of equal length instead, `timestamps` and `values`,
where `values[i]` belongs to `timestamps[i]`. It carries the same points in a smaller body.

Two limits are enforced and both reject the request rather than truncating the
response: the window between `start_time` and `end_time` may not exceed **14 days**,
and a query may not produce more than **10,000 points**. The defaults
(`agg_unit=s`, `agg_period=1`) reach the point ceiling after under three hours, so
most callers set them explicitly.

## `GET /v1/machines/{machine_uuid}/signals/{public_id}`

Base URLs:
- `https://draco.prod.pulsarml.com` — Production
- `https://draco.dev.pulsarml.com` — Development (sandbox)

Authentication: send your API key in the `x-api-key` header.

### Path parameters

- `machine_uuid` (string (uuid), required) — The machine's `uuid`, as returned by `GET /v1/machines`.
- `public_id` (string (uuid), required) — The public ID.

### Query parameters

- `start_time` (string (date-time), required) — Filter by start time.
- `end_time` (string (date-time), required) — Filter by end time.
- `agg_unit` ("s" | "m" | "h" | "d", optional, default `"s"`) — Filter by agg unit.
- `agg_period` (integer, optional, default `1`, >= 1) — Filter by agg period.
- `agg_function` ("avg" | "max" | "min" | "sum" | "count", optional, default `"avg"`) — Filter by agg function.
- `transpose` (boolean, optional, default `false`) — Return parallel `timestamps` and `values` arrays instead of a list of `{timestamp, value}` points.

### Responses

#### 200 — Aggregated points for the requested window: a `data` list of `{timestamp, value}` points, or parallel `timestamps` and `values` arrays when `transpose=true`

One of 2 shapes — shape 1: object (`GetSignalDataResponseV1`)

- `machine_uuid` (string (uuid), required, e.g. `"01748f7c-9688-7abc-8def-0123456789ab"`) — The machine's `uuid`, as returned by `GET /v1/machines`.
- `public_id` (string (uuid), required)
- `name` (string, required)
- `agg_unit` ("s" | "m" | "h" | "d", required)
- `agg_period` (integer, required)
- `agg_function` ("avg" | "max" | "min" | "sum" | "count", required)
- `data` (array of object, required)
  - `timestamp` (string (date-time), required)
  - `value` (number, required)

One of 2 shapes — shape 2: object (`GetTransposedSignalDataResponseV1`)

- `machine_uuid` (string (uuid), required, e.g. `"01748f7c-9688-7abc-8def-0123456789ab"`) — The machine's `uuid`, as returned by `GET /v1/machines`.
- `public_id` (string (uuid), required)
- `name` (string, required)
- `agg_unit` ("s" | "m" | "h" | "d", required)
- `agg_period` (integer, required)
- `agg_function` ("avg" | "max" | "min" | "sum" | "count", required)
- `timestamps` (array of string (date-time), required) — Bucket start times, in ascending order.
- `values` (array of number, required) — Aggregated value of each bucket; `values[i]` belongs to `timestamps[i]`.

#### 422 — Validation Error

Type: object (`HTTPValidationError`)

- `detail` (array of object, optional)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)

### Example request

```bash
curl -X GET 'https://draco.prod.pulsarml.com/v1/machines/<machine_uuid>/signals/<public_id>?start_time=2026-01-01T00%3A00%3A00Z&end_time=2026-01-02T00%3A00%3A00Z' \
  -H 'x-api-key: <YOUR_API_KEY>'
```