---
title: Adding measurements to a REST API collector
slug: how-tos/erD7-adding-measurements-to
createdAt: 2025-09-24T12:32:17.908Z
---

Define what to extract from the API response and how to write it to Historian. A measurement maps value(s), timestamp(s), optional status, and tags from the JSON payload. Use JSONPath to point to the right fields, try: [jsonpath.com](https://jsonpath.com/).

## MeasurementPath

The json path that leads to a value, or a list of values in the message.
**Default**: `$.Value`

**Examples**

:::BlockQuote
$.data\[\*].reading
$.records\[0].fields.freeplaces
:::

## TimestampPath

The json path that leads to a timestamp, or a list of timestamps in the message
**Default**: `$.time`

**Examples**

:::BlockQuote
$.data\[\*].ts
$.records\[0].fields.timestamp
:::

Make sure your timestamps match the configured **TimestampLayout** (RFC3339 or UNIX\*). If the API uses epoch millis, set TimestampLayout = `"UNIXMILLIS"` (either at collector or measurement level).

## StatusPath (optional)

The json path that leads to a status, or a list of statuses in the message. If not set, status will default to **Good**

**Examples**

:::BlockQuote
$.points\[\*].quality
$.status
:::

## TagNamesAndTagValuePaths (optional)

Map of **tag name → JSONPath** to enrich points with context (site, line, sensor, batch, …).

**Examples**

:::CodeblockTabs
Example #1

```json
{ "siteId": "$.meta.siteId", "sensor": "$.records[0].fields.sensor_id" }
```

Example #2

```json
{ "station": "$.data[*].station", "line": "$.data[*].line" }
```
:::

A single-value tag applies to all points in the batch. If you provide tag lists, their length should match the number of values.

## TimestampLayout (override)

Optional per-measurement override of the parsing layout.
Use when a specific measurement’s timestamps differ from the collector default.

**Examples**

:::BlockQuote
"UNIX"
"2006-01-02 15:04:05"
:::

## URL / QueryParameters / Body / Method / Headers (overrides)

Optional per-measurement overrides. Unset fields fall back to the collector settings.

**Use cases**

- Point a subset of measurements to a different **endpoint** path.
- Add a small extra filter (e.g., tag=temperature) for this measurement only.
- Switch a measurement from GET to POST when it needs a complex body.

Keep overrides minimal: each **unique** combination (URL/Method/Headers/QueryParameters/Body) can create an additional API call path.

## Interval / IntervalOffset (overrides)

Per-measurement polling cadence and alignment.
&#x20;Use to slow down non-critical reads or to stagger calls across seconds.

**Examples**

:::BlockQuote
Interval: 30
IntervalOffset: 5
:::

## CollectionType

Defines **when** values are written.

- **polled** (default): fetch each interval and write every response.
- **monitored**: fetch each interval but write **only** when the value changes.

**Guidance**

- Use **polled** for numeric time series that change frequently.
- Use **monitored** for states/booleans/strings (e.g., valve open/closed) to reduce noise.

## Expected outcome

- Measurement appears in the list.
- Status changes to Good within \~10 seconds.
- Data preview shows live values.
