---
title: Deploy App to Edge Device
slug: api-docs/deploy-app-to-edge-device
docTags: 
createdAt: 2026-05-11T22:13:27.987Z
---

# Deploy Application to Edge Device (LEM Async-Task)

**UI trigger**: LEM -> Edge Lifecycle Management -> Applications -> *Launch Application*.

LEM long-running operations (app launch, ML deploy, software update) are wrapped in an async-task envelope. The client POSTs a task description, gets a `taskId`, and polls subtask status until `SUCCESS`. The same pattern underlies several LEM ops.

## Step table

| Step | Name in Collection                       | Method | Endpoint                                             | Body / Notes                                                                                    | Output                                                   |
| ---- | ---------------------------------------- | ------ | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| 1    | Catalogs                                 | `GET`  | `{{LEM_URL}}/mpcs/catalogs`                          | Header: `Authorization: {{LEM_AdminApiToken}}` (NOT `X-AuthToken`)                              | `catalogId`                                              |
| 2    | Catalog Applications                     | `GET`  | `{{LEM_URL}}/mpcs/catalogs/{catalogId}/applications` | Same `Authorization` header                                                                     | `applicationId`, `applicationName`, `applicationVersion` |
| 3    | Launch Application to Edge Device        | `POST` | `{{LEM_URL}}/api/v1/async-task/task-with-subtasks`   | Header: `X-AuthToken: {{LEM_AdminApiToken}}`. Body: see below.                                  | `{ taskId }`                                             |
| 4    | Verify If Deploy Task is Complete (poll) | `GET`  | `{{LEM_URL}}/api/v1/async-task/{{task_id}}/subtasks` | Poll until each subtask `status == "SUCCESS"`. Other states: `PENDING`, `IN_PROGRESS`, `FAILED` | Subtask list with status                                 |
| 5    | Apps List for Device                     | `GET`  | `{{LEM_URL}}/api/v1/marketplace/app/plain?...`       | --                                                                                              | Confirm app installed on device                          |

## Step 3 body

```json
{
  "name": "<task name>",
  "companyName": "...",
  "projectId": "...",
  "type": "MARKETPLACE_APPLICATION_LAUNCH",
  "subtasks": [{
    "deviceId": "...",
    "type": "MARKETPLACE_APPLICATION_LAUNCH",
    "params": {
      "applicationId": "...",
      "applicationName": "...",
      "applicationVersion": "...",
      "catalogId": "...",
      "catalogName": "...",
      "catalogUrl": "...",
      "applicationParameters": { ... }
    }
  }]
}
```

## Same async-task wrapper is used by

- ML model deploy (`type: "ANALYTICS_ML_MODEL_UPLOAD"`)
- Software updates (`type: "FIRMWARE_UPDATE"`)
- Other long-running fleet ops

`Software Update History` endpoint at `/api/v1/async-task/subtasks` reads recent runs across all task types.

## Auth nuance

- Steps 1 and 2 hit `/mpcs/` and require `Authorization: {{LEM_AdminApiToken}}` (no `Bearer` prefix).
- Steps 3-5 hit `/api/v1/` and require `X-AuthToken: {{LEM_AdminApiToken}}`.
- Sending the wrong header returns 401.
