---
title: Workflows
slug: api-docs/workflows
description: 47 worked examples chaining Litmus APIs end to end: device provisioning, app deployment, OPC server config, alerts, and backup/restore. Each shows the trigger, ordered steps, and responses.
docTags: 
createdAt: 2026-05-11T22:10:15.399Z
---

# Workflows

The 15 multi-step API chains that the Litmus UI orchestrates behind a single user action. This is the most valuable section of the docs - none of these workflows can be reconstructed from a single endpoint reference.

:::BlockQuote
**Run any workflow live:** all 47 chains are in the [How-to folder on api.litmus.io](https://api.litmus.io/view/2s9Y5R1RvG#e7f328dd-c01f-496b-8f61-927ac6d619e8).
:::

Each workflow page includes:

- The UI action that triggers it
- A step-by-step table (method, endpoint, body, output)
- Auth notes per step (which header, which token)
- Variants and cleanup steps

## All workflows

| #  | Workflow                                            | Product | Steps | Protocol  |
| -- | --------------------------------------------------- | ------- | ----- | --------- |
| 1  | [Apply / Upload Template](#)                        | LE      | 3     | REST      |
| 2  | [Restore Backup](#)                                 | LE      | 3     | REST      |
| 3  | [Upload Custom CA Certificate](#)                   | LE      | 2     | REST      |
| 4  | [Upload Analytics / TensorFlow Model](#)            | LE      | 3     | REST      |
| 5  | [Upload AI/ML Model to LEM](#)                      | LEM     | 3     | REST + S3 |
| 6  | [Create DeviceHub Device + Tags](#)                 | LE      | 5     | GraphQL   |
| 7  | [DeviceHub Browse (Bulk Tag Discovery)](#)          | LE      | 7     | GraphQL   |
| 8  | [Deploy Edge Application](#)                        | LE      | 4     | REST      |
| 9  | [Configure OPC UA Server with Tags](#)              | LE      | 4     | GraphQL   |
| 10 | [Create Integration Instance](#)                    | LE      | 4     | GraphQL   |
| 11 | [Provision New Edge Device (Zero-Touch)](#)         | LEM     | 5     | REST      |
| 12 | [Deploy Application to Edge Device (Async-Task)](#) | LEM     | 5     | REST      |
| 13 | [Backup and Restore an Edge Device from LEM](#)     | LEM     | 5     | REST + S3 |
| 14 | [Create LEM Project Alert (Trigger + Action)](#)    | LEM     | 4     | REST      |
| 15 | [Provision a UNS MQTT Account](#)                   | LUNS    | 5     | GraphQL   |

## Pattern: Resumable Upload Sessions

Workflows 1-4 share the same resumable upload pattern:

| Phase             | Method   | What it does                        |
| ----------------- | -------- | ----------------------------------- |
| 0. Clear          | `DELETE` | Remove any stale upload session     |
| 1. Create session | `POST`   | Declare file size, get a session ID |
| 2. Upload         | `PUT`    | Stream the bytes                    |

See [Resumable Uploads](#).

## Pattern: LEM Async-Task

Workflows 11-13 use the LEM async-task envelope:

```javascript
POST .../async-task/task-with-subtasks  ->  { taskId }
GET  .../async-task/{taskId}/subtasks   ->  poll until SUCCESS
```

