# Litmus Workflow Chains - Index

> You are at https://api.litmus.io/workflows/agents.md.
> Parent: https://api.litmus.io/agents.md
> Each workflow file documents one multi-step API chain that a single UI action triggers.

---

## When to use a workflow file vs a component file

Use a **workflow file** when your task is described by a verb-phrase: "create a device", "deploy an app", "back up an edge". Workflow files give the ordered chain of API calls.

Use a **component file** (under /le/, /lem/, /luns/) when your task is described by a noun: "list devices", "get tag value". Component files give per-endpoint detail.

If both could match: try the workflow file first.

---

## All workflows

| # | Workflow | Product | Steps | Fetch |
|---|---|---|---|---|
| 1 | Apply / Upload Template | LE | 3 | /workflows/apply-upload-template.md |
| 2 | Restore Backup | LE | 3 | /workflows/restore-backup.md |
| 3 | Upload Custom CA Certificate | LE | 2 | /workflows/upload-ca-cert.md |
| 4 | Upload Analytics / TensorFlow Model | LE | 3 | /workflows/upload-analytics-model.md |
| 5 | Upload AI/ML Model to LEM | LEM | 3 | /workflows/upload-ml-model-lem.md |
| 6 | Create DeviceHub Device + Tags | LE | 5 | /workflows/create-device-with-tags.md |
| 7 | DeviceHub Browse (Bulk Tag Discovery) | LE | 7 | /workflows/browse-bulk-tags.md |
| 8 | Deploy Edge Application | LE | 4 | /workflows/deploy-app.md |
| 9 | Configure OPC UA Server with Tags | LE | 4 | /workflows/configure-opcua-server.md |
| 10 | Create Integration Instance | LE | 4 | /workflows/create-integration-instance.md |
| 11 | Provision New Edge Device (Zero-Touch) | LEM | 5 | /workflows/provision-zero-touch.md |
| 12 | Deploy Application to Edge Device (Async-Task) | LEM | 5 | /workflows/deploy-app-lem.md |
| 13 | Backup and Restore an Edge Device from LEM | LEM | 5 | /workflows/backup-restore-edge.md |
| 14 | Create LEM Project Alert (Trigger + Action) | LEM | 4 | /workflows/create-project-alert.md |
| 15 | Provision a UNS MQTT Account | LUNS | 5 | /workflows/provision-mqtt-account.md |

---

## Pattern: Resumable Upload Sessions

Workflows 1-4 share the same **resumable upload** pattern used throughout the LE REST API:

| Phase | Method | What it does | Key output |
|---|---|---|---|
| **Clear** (Step 0) | `DELETE` | Remove any incomplete/stale upload session | - |
| **Create Session** (Step 1) | `POST` | Declare file size, get a session ID back | `{id: "..."}` |
| **Upload** (Step 2/3) | `PUT` | Stream the actual file bytes to the session endpoint | 200 OK |

If a previous upload was interrupted, the session persists on the server - that is why workflows 1, 2, and 4 start with a DELETE.

---

## Quick keyword routing

| Task contains | Fetch |
|---|---|
| "create device", "add tags to device" | /workflows/create-device-with-tags.md |
| "browse for tags", "discover tags", "import all tags" | /workflows/browse-bulk-tags.md |
| "OPC UA server", "expose tags", "import tags into OPC UA" | /workflows/configure-opcua-server.md |
| "create integration", "Kafka sink", "Azure IoT sink", "connector" | /workflows/create-integration-instance.md |
| "deploy app on edge" | /workflows/deploy-app.md |
| "deploy app to edge from LEM", "launch app via LEM" | /workflows/deploy-app-lem.md |
| "back up edge", "restore from LEM" | /workflows/backup-restore-edge.md |
| "zero touch", "self-register edge", "activation config" | /workflows/provision-zero-touch.md |
| "alert", "trigger action", "incident" | /workflows/create-project-alert.md |
| "MQTT account", "create UNS user" | /workflows/provision-mqtt-account.md |
| "upload template", "apply template" | /workflows/apply-upload-template.md |
| "restore backup" | /workflows/restore-backup.md |
| "upload CA cert", "trust certificate" | /workflows/upload-ca-cert.md |
| "upload tensorflow", "upload AI model" (LE) | /workflows/upload-analytics-model.md |
| "upload ML model" (LEM, S3) | /workflows/upload-ml-model-lem.md |

---

## When to back out

If your task is not a chain but a single endpoint call -> fetch the appropriate product router (/le, /lem, /luns).
