# LitmusEdge (LE) - Product Router

> You are at https://api.litmus.io/le/agents.md.
> Parent: https://api.litmus.io/agents.md
> Pick the component matching your task and fetch only that file.

---

## What LE is

Edge runtime deployed on industrial gateway hardware. Talks to industrial devices, stores data locally, runs containerized apps, publishes to cloud/MQTT/REST.

- Base URL variable: `{{edgeUrl}}` (typically `https://<edge-ip>:8443`)
- Default endpoint style: mix of REST and GraphQL (see per-component note below)
- Version: this tree documents LE 4.0.x. Earlier 3.16.x is not in the split tree; fetch /collections.json only if you must inspect a deprecated 3.16.x endpoint.

---

## Authentication

Every LE API call requires `Authorization: Bearer <token>`.

```
POST {{edgeUrl}}/auth/v3/oauth/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials&client_id=<id>&client_secret=<secret>
```

Response: `{"access_token": "...", "expires_in": 3600, ...}`

Use the `access_token` value as the Bearer token. Refresh before expiry. Do NOT call the Keycloak-style path; the path above is correct.

---

## Components

Each row is a single file that fully documents one component's endpoints. Pick one.

| Component | Style | Base path | Fetch |
|---|---|---|---|
| Dashboard | REST | multiple | /le/dashboard.md |
| DeviceHub (devices, drivers, tags, browse) | GraphQL | `POST /devicehub/v2` | /le/devicehub/agents.md |
| Digital Twins (models, instances) | GraphQL | `POST /digital-twins` | /le/digital-twins.md |
| DataHub (time-series storage) | REST | `/stats/...` | /le/datahub.md |
| Flows Manager (Node-RED) | REST | `/flows-manager/...` | /le/flows.md |
| Analytics (AI models, pipelines) | GraphQL | `POST /analytics/v3` | /le/analytics.md |
| Applications (Docker apps, marketplace) | REST | `/apps/...` | /le/applications.md |
| Integration (cloud + object connectors) | GraphQL | `POST /cc/v2` | /le/integration/agents.md |
| OPC UA Server (expose tags upstream) | GraphQL | `POST /opcua/v2` | /le/opcua.md |
| System (info, network, backup, certs, RBAC) | REST | `/dm/...` | /le/system/agents.md |

---

## Quick path - LE-specific keywords

| Keywords | Fetch |
|---|---|
| "device", "tag", "register", "Modbus", "OPC UA client" | /le/devicehub/agents.md |
| "expose tags via OPC UA", "OPC UA server" | /le/opcua.md (or /workflows/configure-opcua-server.md) |
| "Node-RED", "flow editor" | /le/flows.md |
| "Kafka", "Azure IoT", "InfluxDB", "S3", "cloud sink" | /le/integration/agents.md |
| "AI/ML inference", "TensorFlow model" | /le/analytics.md |
| "Docker container", "deploy app on edge" | /le/applications.md |
| "backup", "restore", "certificates", "network config" | /le/system/agents.md |
| "DataHub", "time series", "stats" | /le/datahub.md |

---

## Common workflow chains (start here for multi-step tasks)

| Workflow | Fetch |
|---|---|
| Create a device + its tags | /workflows/create-device-with-tags.md |
| Bulk-discover tags via Browse | /workflows/browse-bulk-tags.md |
| Configure OPC UA server | /workflows/configure-opcua-server.md |
| Create integration instance (Kafka/Azure/...) | /workflows/create-integration-instance.md |
| Deploy an edge app | /workflows/deploy-app.md |
| Apply template / restore backup / upload cert | /workflows/apply-upload-template.md, /workflows/restore-backup.md, /workflows/upload-ca-cert.md |
| Upload analytics/AI model | /workflows/upload-analytics-model.md |

---

## When to back out

If your task is actually about:

- Multiple edges, fleet operations -> back out to /lem/agents.md
- MQTT broker, topic namespace -> back out to /luns/agents.md
- Cross-product or unsure -> back out to /agents.md

---

## Reference dumps

For deep endpoint reference (every endpoint in a component with full schemas + response examples), fetch the file under the component path above. Files larger than ~500 KB are split into a folder of sub-files; see /le/devicehub/, /le/integration/, /le/system/.
