Open app

Quickstart

1. Get an API key

In the dashboard go to API Keys and create a key. Copy it — you'll use it in every request. Keys start with plx_.

2. Send a metric

Install the SDK and send your first point:

pip install plexus-python
from plexus import Plexus

# source_id identifies your device — it auto-registers on first send.
px = Plexus(api_key="YOUR_API_KEY", source_id="robot-01")
px.send("battery.voltage", 12.4)

Not on Python? Any platform with an HTTP client can POST directly to the ingest endpoint — see HTTP (Microcontrollers).

source_id is the stable identity for a device within your org. Plexus routes all metrics and logs to whichever source name the device sends — so each device must use a unique name. Two devices sharing a source_id will silently merge their data. For fleet deployments, derive the name from something physically unique (hostname, serial number, or a UUID generated on first boot) rather than baking a static name into a shared image.

3. Read it back

curl https://api.plexus.company/v1/sources/robot-01/metrics/latest \
  -H "x-api-key: YOUR_API_KEY"
{ "metrics": { "battery.voltage": 12.4 } }

/metrics/latest only shows metrics reported in the last hour — a device that's been silent longer comes back empty.

4. Poll for updates

For API-key clients, the simplest live view is to poll /metrics/latest on a short interval:

async function tick() {
  const r = await fetch(
    "https://api.plexus.company/v1/sources/robot-01/metrics/latest",
    { headers: { "x-api-key": "YOUR_API_KEY" } },
  );
  const { metrics } = await r.json();
  console.log(metrics);
}

setInterval(tick, 5000);   // every 5 seconds

For sub-second push from the gateway, see Live streams.

Next steps