Litmus Edge Manager 3.0.x - Edge Lifecycle: Jobs
Device Jobs
GET {{LEM_URL}}/api/v1/batchdm/jobs?projectId={{project_id}}
Device Jobs
Returns the device-job records for the project. A job is a batched set of commands[] (e.g. GENERATE_LICENSE, REBOOT) applied across deviceIds[] or tags[].
Endpoint
GET {{LEM_URL}}/api/v1/batchdm/jobs?projectId={{project_id}}
Authentication
API key in a request header (case sensitive). The value is the LEM admin API token.
| URL prefix | Auth header |
|---|---|
{{LEM_URL}}/api/v1/... (main fleet API) |
X-AuthToken: <token> |
{{LEM_adminURL}}/admin/v1/... (admin console, port 8446) |
X-AuthToken: <token> |
{{LEM_URL}}/mpcs/... (Marketplace Catalog) |
Authorization: <token> (3.0.x also accepts X-AuthToken) |
| ## 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
[
{
"projectId": "462j1mq70mph31wa100t1yuxa",
"jobId": "1eqkvep9i2uc63jfnenl9lkbl",
"tags": [],
"deviceIds": [
"1a5wiavluwxuhwai5leb1v0hc"
],
"commands": [
{
"projectId": "462j1mq70mph31wa100t1yuxa",
"jobId": "1eqkvep9i2uc63jfnenl9lkbl",
"commandId": "sw792j23q6pfbbux49e6tleb",
"type": "GENERATE_LICENSE",
"object": 0,
"instance": null,
"resource": 0,
"action": "READ",
"value": null,
"rawPayload": "eyJyZXF1ZXN0RW50cnlJRCI6MywicHJvamVjdElkIjoiNDYyajFtcTcwbXBoMzF3YTEwMHQxeXV4YSIsImRldmljZUlkIjoiMWE1d2lhdmx1d3h1aHdhaTVsZWIxdjBoYyIsImxpY2Vuc2VLZXkiOiIxMDk1LTA1ODgtNjU2NC03ODY0IiwiaG9zdGlkIjoiOTRjNjkxMWI5Yzc3IiwidGVtcGxhdGVOYW1lcyI6bnVsbCwicHJvdmlzaW9uRGVmYXVsdFBhc3N3b3JkUG9saWN5Ijp0cnVlfQ==",
"name": "Generate license",
"descr": null,
"usingBy": [
{
"jobId": "1eqkvep9i2uc63jfnenl9lkbl",
"name": "Provision job for device `1a5wiavluwxuhwai5leb1v0hc`"
}
],
"qos": 1,
"num": 0
},
{
"projectId": "462j1mq70mph31wa100t1yuxa",
"jobId": "1eqkvep9i2uc63jfnenl9lkbl",
"commandId": "dpcuaumno4qn929jr1i8kv8qv",
"type": "PROVISION_LICENSE",
"object": 0,
"instance": null,
"resource": 0,
"action": "READ",
"value": null,
"rawPayload": "eyJyZXF1ZXN0RW50cnlJRCI6MywicHJvamVjdElkIjoiNDYyajFtcTcwbXBoMzF3YTEwMHQxeXV4YSIsImRldmljZUlkIjoiMWE1d2lhdmx1d3h1aHdhaTVsZWIxdjBoYyIsImxpY2Vuc2VLZXkiOiIxMDk1LTA1ODgtNjU2NC03ODY0IiwiaG9zdGlkIjoiOTRjNjkxMWI5Yzc3IiwidGVtcGxhdGVOYW1lcyI6bnVsbCwicHJvdmlzaW9uRGVmYXVsdFBhc3N3b3JkUG9saWN5Ijp0cnVlfQ==",
"name": "Provision license",
"descr": null,
"usingBy": [
{
"jobId": "1eqkvep9i2uc63jfnenl9lkbl",
"name": "Provision job for device `1a5wiavluwxuhwai5leb1v0hc`"
}
],
"qos": 1,
"num": 1
}
],
"type": "RUN_ONCE",
"cronExpression": "",
"status": "ACTIVE",
"instanceCount": 1,
"lastExecTime": 1691104195000,
"nextExecTime": 0,
"name": "Provision job for device `1a5wiavluwxuhwai5leb1v0hc`",
"descr": ""
},
{
"projectId": "462j1mq70mph31wa100t1yuxa",
"jobId": "da9oe1q42grsdpb9azw12kxuk",
"tags": [],
"deviceIds": [
"1a5wiavluwxuhwai5leb1v0hc"
],
"commands": [],
"type": "RUN_ONCE",
"cronExpression": "",
"status": "NOT_ACTIVE",
"instanceCount": 0,
"lastExecTime": 0,
"nextExecTime": 1691104195000,
"name": "Provision job for device `1a5wiavluwxuhwai5leb1v0hc`",
"descr": ""
}
]
List Tasks
GET {{LEM_URL}}/api/v1/async-task/tasks?companyName={{company_name}}&requestedPage=0&pageSize=10
List Tasks
Pages through async tasks (application launches, firmware upgrades, model deploys, ...) for a company or a project. Each task's per-device progress is in GET {{LEM_URL}}/api/v1/async-task/{{task_id}}/subtasks.
Endpoint
GET {{LEM_URL}}/api/v1/async-task/tasks?companyName={{company_name}}&requestedPage=0&pageSize=10
Authentication
API key in a request header (case sensitive). The value is the LEM admin API token.
| URL prefix | Auth header |
|---|---|
{{LEM_URL}}/api/v1/... (main fleet API) |
X-AuthToken: <token> |
{{LEM_adminURL}}/admin/v1/... (admin console, port 8446) |
X-AuthToken: <token> |
{{LEM_URL}}/mpcs/... (Marketplace Catalog) |
Authorization: <token> (3.0.x also accepts X-AuthToken) |
Query parameters
Give companyName or projectId; everything else is an optional filter.
| Parameter | Type | Required | Description |
|---|---|---|---|
companyName |
string | No | Company slug. |
projectId |
string | No | Project ID. |
taskType |
string | No | e.g. MARKETPLACE_APPLICATION_LAUNCH, FIRMWARE_UPGRADE. |
taskStatus |
string | No | e.g. ERROR, DONE. |
subtaskStatus |
string | No | Filter on subtask status. |
createdOnFrom / createdOnTo |
integer | No | Epoch ms window on creation. |
updatedOnFrom / updatedOnTo |
integer | No | Epoch ms window on last update. |
requestedPage |
integer | No | Zero-based page. |
pageSize |
integer | No | Page size. |
Response
200 OK. A page: pageNum, pagesCount, size, totalSize, elements[]. Each task has id, projectId, companyName, name, type, params, status, createdOn, updatedOn, createdBy and retry settings. The OpenAPI spec says a bare array.
Errors
| HTTP status | When it happens |
|---|---|
401 |
Missing or invalid X-AuthToken. |
409 |
Either company name or project ID must be specified. |
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": 0,
"size": 0,
"totalSize": 0,
"elements": []
}
Get all task types
GET {{LEM_URL}}/api/v1/async-task/task-types
Get all task types
Lists the available asynchronous task types, for use as a taskType filter when querying jobs/tasks.
Endpoint
GET {{LEM_URL}}/api/v1/async-task/task-types
Authentication
API key in a request header (case sensitive). The value is the LEM admin API token.
| URL prefix | Auth header |
|---|---|
{{LEM_URL}}/api/v1/... (main fleet API) |
X-AuthToken: <token> |
{{LEM_adminURL}}/admin/v1/... (admin console, port 8446) |
X-AuthToken: <token> |
{{LEM_URL}}/mpcs/... (Marketplace Catalog) |
Authorization: <token> (3.0.x also accepts X-AuthToken) |
| ## Response |
[TaskTypeInfo].
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
[
{
"code": "ANALYTICS_ML_MODEL_UPLOAD",
"name": "Upload AI/ML Models"
},
{
"code": "DIGITAL_TWINS_INSTANCES_UPGRADE",
"name": "Update DT instances"
},
{
"code": "DIGITAL_TWINS_INSTANCE_CREATE",
"name": "Create DT instance"
},
{
"code": "DIGITAL_TWINS_INSTANCE_CREATE_WITH_PARAMETERS",
"name": "Create DT instance with parameters"
},
{
"code": "DIGITAL_TWINS_MODEL_DEPLOY",
"name": "Deploy DT models"
},
{
"code": "EDGE_ACTIVATION_URL_UPDATE",
"name": "Update edge activation URL"
},
{
"code": "EDGE_BACKUP_CREATE",
"name": "Create Edge Device backup"
},
{
"code": "EDGE_CA_CERTIFICATE_DELETE",
"name": "Delete edge CA certificate"
},
{
"code": "EDGE_CA_CERTIFICATE_UPDATE",
"name": "Update edge CA certificate"
},
{
"code": "EDGE_CERTIFICATE_ISSUE",
"name": "Issue a new certificate"
},
{
"code": "EDGE_CERTIFICATE_RESET",
"name": "Reset to Edge Device default certificate"
},
{
"code": "EDGE_LOG_FORWARDING",
"name": "Change log forwarding status"
},
{
"code": "FIRMWARE_UPGRADE",
"name": "Software update"
},
{
"code": "FIRMWARE_UPGRADE_DOWNLOAD",
"name": "Download software update"
},
{
"code": "FIRMWARE_UPGRADE_EXECUTE",
"name": "Install software update"
},
{
"code": "GCP_SA_KEY_ROTATION",
"name": "Rotate GCP Service Account keys"
},
{
"code": "GIT_SYNC_PROJECT",
"name": "Git project synchronization"
},
{
"code": "LICENSE_APPLY",
"name": "Apply Edge Device license"
},
{
"code": "MARKETPLACE_APPLICATION_CACHE_REFRESH",
"name": "Refresh Marketplace application cache"
},
{
"code": "MARKETPLACE_APPLICATION_DELETE",
"name": "Delete Marketplace application"
},
{
"code": "MARKETPLACE_APPLICATION_LAUNCH",
"name": "Launch Marketplace application"
},
{
"code": "MARKETPLACE_APPLICATION_START",
"name": "Start Marketplace application"
},
{
"code": "MARKETPLACE_APPLICATION_STOP",
"name": "Stop Marketplace application"
},
{
"code": "MARKETPLACE_APPLICATION_UPGRADE",
"name": "Upgrade Marketplace application"
},
{
"code": "MARKETPLACE_SYNC",
"name": "Sync Marketplace"
},
{
"code": "PROVISION",
"name": "Provision device after activation"
},
{
"code": "PROVISION_AWS_SITEWISE_CONNECTOR",
"name": "Provision: AWS SiteWise connector"
},
{
"code": "PROVISION_DEFAULT_PASSWORD_POLICY",
"name": "Provision: apply default password policy"
},
{
"code": "PROVISION_FLOATING_LICENSE_SERVER",
"name": "Provision: configure floating license server"
},
{
"code": "PROVISION_GENERATE_LICENSE",
"name": "Provision: generate device license"
},
{
"code": "PROVISION_GOOGLE_PUBSUB_CONNECTOR",
"name": "Provision: Google Pub/Sub connector"
},
{
"code": "PROVISION_LICENSE",
"name": "Provision: apply device license"
},
{
"code": "PROVISION_SIMULATOR_DEVICE",
"name": "Provision: configure simulator device"
},
{
"code": "PROVISION_TEMPLATE",
"name": "Provision: apply templates"
},
{
"code": "TEMPLATE_APPLY",
"name": "Apply template"
},
{
"code": "ZT_FILE_GENERATE",
"name": "Generate ZeroTouch bundle file"
}
]