LitmusEdgeManager 2.31.x API Documentation/Edge Lifecycle Management/Software Update - LE, LEM, LUNS API Docs

Software Update History

GET {{LEM_URL}}/api/v1/async-task/subtasks?companyName={{company_name}}&createdOnFrom=1694550548720&pageSize=1000&projectId={{project_id}}&requestedPage=0&taskType=FIRMWARE_UPGRADE

Software Update History

Returns the async-task history for firmware-upgrade jobs in the project. Use to audit which devices were upgraded when, and to debug failed upgrades.

Endpoint

GET {{LEM_URL}}/api/v1/async-task/subtasks?companyName={{company_name}}&createdOnFrom=1694550548720&pageSize=1000&projectId={{project_id}}&requestedPage=0&taskType=FIRMWARE_UPGRADE

Authentication

HTTP Basic Auth. Username is your API token, password is empty. Tokens are managed under System > Access Control > Tokens.

Parameters

Parameter Type Required Description
taskType string Yes Fixed to FIRMWARE_UPGRADE.
companyName string Yes Company slug.
projectId string Yes Project UUID.
createdOnFrom integer No Unix epoch ms lower bound.
pageSize integer No Page size.
requestedPage integer No 0-indexed page number.

Errors

HTTP status When it happens
400 Bad Request Missing or malformed query/body parameter.
401 Unauthorized Missing or invalid credentials.
403 Forbidden Token lacks permission for this operation.
404 Not Found Target entity does not exist.
5xx Service is unreachable, restarting, or internally errored. Inspect device logs under System > Support.

TLS note: edge devices use a self-signed certificate by default. Either install the device CA in your client trust store or disable certificate verification when calling this endpoint directly.

Response

Status: 200 OK

{
    "pageNum": 0,
    "pagesCount": 1,
    "size": 1,
    "totalSize": 1,
    "elements": [
        {
            "task": {
                "id": "62c0f2d9-8ad6-4061-ab08-7e2f2a653621",
                "projectId": "462j1mq70mph31wa100t1yuxa",
                "name": "Software update (1 edge device)",
                "description": "",
                "type": "FIRMWARE_UPGRADE",
                "params": {},
                "waitForOnline": true,
                "plannedExecTime": 0,
                "status": "SUCCESS",
                "workersNum": 10,
                "retriesNum": 1,
                "maxSecondsToWait": 60,
                "createdOn": 1694726802000,
                "updatedOn": 1694727058000,
                "createdBy": "username",
                "updatedBy": "username",
                "progress": 1,
                "subtasksNum": 1,
                "context": null,
                "done": true
            },
            "subtask": {
                "id": "6ca33d0f-0ea7-4e24-b7b3-1bd67396b41e",
                "taskId": "62c0f2d9-8ad6-4061-ab08-7e2f2a653621",
                "num": 0,
                "deviceId": "1a5wiavluwxuhwai5leb1v0hc",
                "devicePrettyName": "Litmus Edge (94:c6:91:1b:9c:77)- SJ office sensor",
                "type": "FIRMWARE_UPGRADE",
                "params": {
                    "versionName": "LoopEdge/STD/3.8.0/AMD64/litmusedge-std_3.8.0-amd64.upd",
                    "deviceVersion": "3.5.6"
                },
                "progress": 1,
                "status": "SUCCESS",
                "msg": null,
                "startTime": 1694726802000,
                "stopTime": 1694727058000,
                "context": "{\"requestId\":\"56feaff7-e037-4f56-b031-09cf4ee2c736\",\"started\":true,\"lastCheckTime\":1694727058186,\"lastTimeProgressIncreased\":1694726838088,\"errorsCount\":0,\"fwFileName\":\"litmusedge-std_3.8.0-amd64.upd\",\"upgradeInitiated\":true,\"downloadRunning\":true,\"dm2DownloadErrNum\":0,\"dm2LastDownloadErrTime\":0}",
                "createdOn": 1694726802000,
                "updatedOn": 1694727058000,
                "createdBy": "username",
                "updatedBy": "username"
            }
        }
    ]
}

View this page as Markdown