Litmus Edge Manager 3.0.x - Digital Twins: Asset Management
DigitalTwin Model Details
GET {{LEM_URL}}/api/v1/dt2/model/{{LEM_DT_Model_ID}}
DigitalTwin Model Details
Returns the top-level fields for one model. Same shape as one entry of Get DigitalTwin Models but addressed by model ID instead of company name.
Endpoint
GET {{LEM_URL}}/api/v1/dt2/model/{{LEM_DT_Model_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) |
Path parameters
| Location | Name | Required | Description |
|---|---|---|---|
| Path | {{LEM_DT_Model_ID}} |
Yes | Model UUID. |
Response
200 OK -- application/json. See Get DigitalTwin Models for the field reference.
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
{
"hasImage": true,
"ID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"Name": "PlantModel",
"CompanyName": "solutions",
"Description": "",
"Assets": "ASSET",
"ImagePreviewUrl": "https://10.17.10.247:443/api/v1/image/dt2-model-image-preview-2f00a759-96d8-4b2c-acd6-6861542f65b2",
"ImageUrl": "https://10.17.10.247:443/api/v1/image/dt2-model-image-2f00a759-96d8-4b2c-acd6-6861542f65b2",
"RootNodeID": "5fdfd55f-38ff-4406-ab57-9c41c8f92ab6",
"Version": 0
}
DigitalTwin Model Static Attributes
GET {{LEM_URL}}/api/v1/dt2/static-attributes/{{LEM_DT_Model_ID}}
DigitalTwin Model Static Attributes
Returns the static (constant) attributes attached to one model. Each attribute is a typed key/value pair.
Endpoint
GET {{LEM_URL}}/api/v1/dt2/static-attributes/{{LEM_DT_Model_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) |
Response
200 OK -- application/json
| Field | Type | Description |
|---|---|---|
ID |
string | Attribute UUID. |
ModelID |
string | Parent model UUID. |
InstanceID |
string | null for model-level attributes; UUID for per-instance overrides (not applicable at LEM scope). |
Key |
string | Attribute name (e.g. Manufacturer). |
Value |
string | Attribute value. |
[
{ "ID": "362e4c6c-f3ba-4e55-b759-0d07c18b1879", "ModelID": "2f00a759-...", "InstanceID": null, "Key": "Type", "Value": "Manufacturing" },
{ "ID": "6f4374ad-ec7a-40a4-8dcd-89cce0bf8943", "ModelID": "2f00a759-...", "InstanceID": null, "Key": "Location", "Value": "Los Angeles, CA, USA" }
]
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
[
{
"ID": "362e4c6c-f3ba-4e55-b759-0d07c18b1879",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"Key": "Type",
"Value": "Manufacturing"
},
{
"ID": "6f4374ad-ec7a-40a4-8dcd-89cce0bf8943",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"Key": "Location",
"Value": "Los Angeles, CA, USA"
},
{
"ID": "f11c264c-c206-4070-bb97-fcf6cd707562",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"Key": "Plant Code",
"Value": " "
},
{
"ID": "f30b7800-c644-4161-83e8-7791f822ff3f",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"Key": "Business Group",
"Value": "Automotive"
}
]
DigitalTwin Dynamic Attributes
GET {{LEM_URL}}/api/v1/dt2/dynamic-attributes/{{LEM_DT_Model_ID}}
DigitalTwin Dynamic Attributes
Returns the dynamic (live-signal) attributes attached to one model. Each dynamic attribute carries name, data type, unit, and an optional topic + transformation schema binding.
Endpoint
GET {{LEM_URL}}/api/v1/dt2/dynamic-attributes/{{LEM_DT_Model_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) |
Response
200 OK -- application/json
| Field | Type | Description |
|---|---|---|
ID |
string | Attribute UUID. |
Name |
string | Attribute name. |
DataType |
string | OPC UA-style type (int, float, bool, ...). Empty for unspecified. |
Unit |
string | Engineering unit. |
ModelID |
string | Parent model. |
InstanceID |
string | null at LEM scope. |
SchemaID |
string | UUID of an attached transformation, or null. |
Topic |
string | Source MQTT topic when the attribute is bound to a live data source. |
SkipParentKey |
boolean | If true, omit the parent hierarchy node's name from the published payload key. |
[
{
"ID": "2583268f-4816-4fce-9769-c5db7a781987",
"Name": "Equipment_7",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
}
]
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
[
{
"ID": "2583268f-4816-4fce-9769-c5db7a781987",
"Name": "Equipment_7",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
{
"ID": "4440a44d-8947-4d03-8c12-3f4a7d72f269",
"Name": "Equipment_3",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
{
"ID": "674bc555-f4b8-4cb3-8fcf-5564ebd439f3",
"Name": "Equipment_4",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
{
"ID": "80f8ce9b-14fa-4612-9166-c4fa890e02cb",
"Name": "Equipment_2",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
{
"ID": "87099aba-6d49-4d32-947e-9ab3f59bb434",
"Name": "Equipment_1",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
{
"ID": "a4ac30fe-a5d1-4e6d-94e6-42ddba583d66",
"Name": "Equipment_6",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
{
"ID": "fc1d0f09-b090-431e-9dbc-796cb4edac92",
"Name": "Equipment_5",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
}
]
DigitalTwin Transformations
GET {{LEM_URL}}/api/v1/dt2/transformations/{{LEM_DT_Model_ID}}
DigitalTwin Transformations
Returns the transformations (named JSON Schemas) defined for one model. Dynamic attributes reference transformations via their SchemaID to validate / shape payloads before publishing.
Endpoint
GET {{LEM_URL}}/api/v1/dt2/transformations/{{LEM_DT_Model_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) |
Response
200 OK -- application/json
| Field | Type | Description |
|---|---|---|
ID |
string | Transformation UUID. Used as SchemaID from dynamic attributes. |
Name |
string | Display name. |
ModelID |
string | Parent model. |
Schema |
string | JSON Schema (or JSONPath mapping) as a string. Decode client-side. |
SchemaType |
string | json for JSON Schema, other values reserved. |
[
{ "ID": "28099054-40b7-4fa4-930d-5696779f628c", "Name": "plant", "ModelID": "2f00a759-...", "Schema": "{\"plant\":\"$.metadata.plant\"}", "SchemaType": "json" }
]
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
[
{
"ID": "28099054-40b7-4fa4-930d-5696779f628c",
"Name": "plant",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"Schema": "{\"plant\":\"$.metadata.plant\"}",
"SchemaType": "json"
},
{
"ID": "776eab7e-caa0-4ee3-b28d-6add7197b8a3",
"Name": "OEE",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"Schema": "{\"OEE\":\"$.OEE\"}",
"SchemaType": "json"
}
]
DigitalTwin Get Heirarchy
GET {{LEM_URL}}/api/v1/dt2/model/node/{{LEM_DT_Model_RootNodeID}}
DigitalTwin Get Hierarchy
Returns the full hierarchical node tree for one model, starting at the root node. Each node carries an Object reference and an array of ChildNodes.
Despite the Postman name's misspelling ("Heirarchy"), the underlying field is Hierarchy. The path takes the root node ID (not the model ID): obtain it from Get DigitalTwin Models > RootNodeID.
Endpoint
GET {{LEM_URL}}/api/v1/dt2/model/node/{{LEM_DT_Model_RootNodeID}}
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) |
Path parameters
| Location | Name | Required | Description |
|---|---|---|---|
| Path | {{LEM_DT_Model_RootNodeID}} |
Yes | Root node UUID (from RootNodeID). |
Response
200 OK -- application/json
| Field | Type | Description |
|---|---|---|
ID |
string | Node UUID. |
Name |
string | Node display name. |
NodeType |
string | MODEL, FOLDER, STATIC_ATTRIBUTE, DYNAMIC_ATTRIBUTE. |
Object |
object | Embedded entity record (the model itself for the root; an attribute / folder for children). |
ChildNodes |
object[] | Recursive nested nodes. |
{
"ID": "5fdfd55f-38ff-4406-ab57-9c41c8f92ab6",
"Name": "root",
"Object": {
"hasImage": true,
"ID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"Name": "PlantModel",
"CompanyName": "solutions",
"Description": "",
"Assets": "ASSET",
"RootNodeID": "5fdfd55f-38ff-4406-ab57-9c41c8f92ab6",
"Version": 1
},
"NodeType": "MODEL",
"ChildNodes": [
{
"ID": "cd9f0df5-88f9-415e-8ffc-31067ea59461",
"Name": "Plant",
"Object": {}
}
]
}
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
{
"ID": "5fdfd55f-38ff-4406-ab57-9c41c8f92ab6",
"Name": "root",
"Object": {
"hasImage": true,
"ID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"Name": "PlantModel",
"CompanyName": "solutions",
"Description": "",
"Assets": "ASSET",
"ImagePreviewUrl": null,
"ImageUrl": null,
"RootNodeID": "5fdfd55f-38ff-4406-ab57-9c41c8f92ab6",
"Version": 1
},
"NodeType": "MODEL",
"ChildNodes": [
{
"ID": "cd9f0df5-88f9-415e-8ffc-31067ea59461",
"Name": "Plant",
"Object": null,
"NodeType": "FOLDER",
"ChildNodes": [
{
"ID": "aa5f0924-e7c3-4182-a3b6-cd06d890f81a",
"Name": "Area_1",
"Object": null,
"NodeType": "FOLDER",
"ChildNodes": [
{
"ID": "20cb18cd-1b26-45df-bb46-70e77d664f3e",
"Name": "Line_1",
"Object": null,
"NodeType": "FOLDER",
"ChildNodes": [
{
"ID": "d1418fae-dd3c-41fb-9fdf-29c047b1edf5",
"Name": "Equipment",
"Object": null,
"NodeType": "FOLDER",
"ChildNodes": [
{
"ID": "73e24a5e-9b0d-42a0-a0e8-cd073bf22902",
"Name": "Equipment_1",
"Object": {
"ID": "87099aba-6d49-4d32-947e-9ab3f59bb434",
"Name": "Equipment_1",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
"NodeType": "DYNAMIC_ATTRIBUTE",
"ChildNodes": [],
"CompanyName": null,
"Position": 0
},
{
"ID": "b724b712-b39b-4906-a69b-e35befe75a01",
"Name": "Equipment_2",
"Object": {
"ID": "80f8ce9b-14fa-4612-9166-c4fa890e02cb",
"Name": "Equipment_2",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
"NodeType": "DYNAMIC_ATTRIBUTE",
"ChildNodes": [],
"CompanyName": null,
"Position": 1
}
],
"CompanyName": null,
"Position": 0
}
],
"CompanyName": null,
"Position": 0
},
{
"ID": "6ec2d6c9-0658-4ccc-bdcb-f873ddc45c6e",
"Name": "Line_2",
"Object": null,
"NodeType": "FOLDER",
"ChildNodes": [
{
"ID": "9796a912-547b-4461-8570-8e2f26d77751",
"Name": "Equipment",
"Object": null,
"NodeType": "FOLDER",
"ChildNodes": [
{
"ID": "b950f2cf-054e-40ea-a8d6-2aa62c99e93a",
"Name": "Equipment_3",
"Object": {
"ID": "4440a44d-8947-4d03-8c12-3f4a7d72f269",
"Name": "Equipment_3",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
"NodeType": "DYNAMIC_ATTRIBUTE",
"ChildNodes": [],
"CompanyName": null,
"Position": 0
},
{
"ID": "5f797d31-3c48-45e9-b5f5-686a4aa87267",
"Name": "Equipment_4",
"Object": {
"ID": "674bc555-f4b8-4cb3-8fcf-5564ebd439f3",
"Name": "Equipment_4",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
"NodeType": "DYNAMIC_ATTRIBUTE",
"ChildNodes": [],
"CompanyName": null,
"Position": 1
}
],
"CompanyName": null,
"Position": 0
}
],
"CompanyName": null,
"Position": 1
}
],
"CompanyName": null,
"Position": 0
},
{
"ID": "b46e88b5-141e-40c2-9219-4bb260801624",
"Name": "Area_2",
"Object": null,
"NodeType": "FOLDER",
"ChildNodes": [
{
"ID": "06c8ba1e-97d4-48ee-a954-34b08c7cd1da",
"Name": "Line_1",
"Object": null,
"NodeType": "FOLDER",
"ChildNodes": [
{
"ID": "f3a30960-5a82-4970-94c6-ae5b535b9774",
"Name": "Equipment",
"Object": null,
"NodeType": "FOLDER",
"ChildNodes": [
{
"ID": "812d1584-5ee9-4df5-97a6-d034cc711151",
"Name": "Equipment_5",
"Object": {
"ID": "fc1d0f09-b090-431e-9dbc-796cb4edac92",
"Name": "Equipment_5",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
"NodeType": "DYNAMIC_ATTRIBUTE",
"ChildNodes": [],
"CompanyName": null,
"Position": 0
}
],
"CompanyName": null,
"Position": 0
}
],
"CompanyName": null,
"Position": 0
},
{
"ID": "a7992c75-d485-46e9-9626-cedc8482b8a3",
"Name": "Line_2",
"Object": null,
"NodeType": "FOLDER",
"ChildNodes": [
{
"ID": "24dda06e-808f-439f-8fcd-4249cc580ee6",
"Name": "Equipment",
"Object": null,
"NodeType": "FOLDER",
"ChildNodes": [
{
"ID": "0b3e9d27-32b6-497f-abe6-f973cb043a07",
"Name": "Equipment_6",
"Object": {
"ID": "a4ac30fe-a5d1-4e6d-94e6-42ddba583d66",
"Name": "Equipment_6",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
"NodeType": "DYNAMIC_ATTRIBUTE",
"ChildNodes": [],
"CompanyName": null,
"Position": 0
},
{
"ID": "ad070e43-67db-4ffa-b92a-a4510975914e",
"Name": "Equipment_7",
"Object": {
"ID": "2583268f-4816-4fce-9769-c5db7a781987",
"Name": "Equipment_7",
"DataType": "",
"Unit": "",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"SchemaID": null,
"Topic": "",
"SkipParentKey": false
},
"NodeType": "DYNAMIC_ATTRIBUTE",
"ChildNodes": [],
"CompanyName": null,
"Position": 1
}
],
"CompanyName": null,
"Position": 0
}
],
"CompanyName": null,
"Position": 1
}
],
"CompanyName": null,
"Position": 1
},
{
"ID": "bb2199dd-d557-418f-91a9-537e9d540f06",
"Name": "Type",
"Object": {
"ID": "362e4c6c-f3ba-4e55-b759-0d07c18b1879",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"Key": "Type",
"Value": "Manufacturing"
},
"NodeType": "STATIC_ATTRIBUTE",
"ChildNodes": [],
"CompanyName": null,
"Position": 2
},
{
"ID": "7d344e61-750e-42ef-832b-b74b91feaf71",
"Name": "Plant Code",
"Object": {
"ID": "f11c264c-c206-4070-bb97-fcf6cd707562",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"Key": "Plant Code",
"Value": " "
},
"NodeType": "STATIC_ATTRIBUTE",
"ChildNodes": [],
"CompanyName": null,
"Position": 3
},
{
"ID": "92d7422e-48c6-4210-8706-76b50e10ece2",
"Name": "Location",
"Object": {
"ID": "6f4374ad-ec7a-40a4-8dcd-89cce0bf8943",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"Key": "Location",
"Value": "Los Angeles, CA, USA"
},
"NodeType": "STATIC_ATTRIBUTE",
"ChildNodes": [],
"CompanyName": null,
"Position": 4
},
{
"ID": "119f4d46-39e5-42d3-9ba5-dd5f829534c5",
"Name": "Business Group",
"Object": {
"ID": "f30b7800-c644-4161-83e8-7791f822ff3f",
"ModelID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"InstanceID": null,
"Key": "Business Group",
"Value": "Automotive"
},
"NodeType": "STATIC_ATTRIBUTE",
"ChildNodes": [],
"CompanyName": null,
"Position": 5
}
],
"CompanyName": null,
"Position": 0
}
],
"CompanyName": "solutions",
"Position": 0
}
Save Changes to DigitalTwin Model
POST {{LEM_URL}}/api/v1/dt2/model/complete/{{company_name}}
Save Changes to DigitalTwin Model (transactional)
Applies a batch of edits to one model atomically: create / update / delete static and dynamic attributes in a single transaction. Used by the LEM UI to commit every edit in the model editor in one round trip.
The request envelope groups changes by kind (createStaticAttributes[], updateStaticAttributes[], delStaticAttributes[], createDynamicAttributes[], updateDynamicAttributes[], delDynamicAttributes[]). Pass empty arrays for any kind you don't need.
Updated in 3.0. New optional request fields:
NestedInstanceID,NestedInstanceName,NestedModelID,NestedModelName.
Endpoint
POST {{LEM_URL}}/api/v1/dt2/model/complete/{{company_name}}
Content-Type: application/json
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) |
Request body
{
"modelId": "{{LEM_DT_Model_ID}}",
"createStaticAttributes": [
{
"ID": "eed5f265-a24b-4856-a5c1-0b3683506b9c",
"ModelID": "{{LEM_DT_Model_ID}}",
"InstanceID": null,
"Key": "Serial",
"Value": "$EDGE_DT_MODEL_NAME",
"$isNew": true
}
],
"updateStaticAttributes": [],
"delStaticAttributes": [],
"createDynamicAttributes": [],
"updateDynamicAttributes": [],
"delDynamicAttributes": []
}
| Field | Type | Required | Description |
|---|---|---|---|
modelId |
string | Yes | Target model UUID. |
createStaticAttributes[] |
object[] | No | Static attrs to create. Each item carries ID (caller-generated), Key, Value, plus $isNew: true. |
updateStaticAttributes[] |
object[] | No | Static attrs to update. Each item has ID, Key, Value. |
delStaticAttributes[] |
object[] | No | Static attrs to delete. Each item has just {ID}. |
createDynamicAttributes[] / updateDynamicAttributes[] / delDynamicAttributes[] |
object[] | No | Same shape, for dynamic attrs. |
Response
200 OK -- application/json. Returns the post-edit model record with bumped Version.
{
"hasImage": true,
"ID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"Name": "PlantModel",
"CompanyName": "solutions",
"RootNodeID": "5fdfd55f-38ff-4406-ab57-9c41c8f92ab6",
"Version": 4
}
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.
Request Body
{
"modelId": "{{LEM_DT_Model_ID}}",
"createStaticAttributes": [
{
"ID": "eed5f265-a24b-4856-a5c1-0b3683506b9c",
"ModelID": "{{LEM_DT_Model_ID}}",
"InstanceID": null,
"Key": "Serial",
"Value": "$EDGE_DT_MODEL_NAME",
"$isNew": true
}
],
"updateStaticAttributes": [],
"delStaticAttributes": [],
"createDynamicAttributes": [],
"updateDynamicAttributes": [],
"delDynamicAttributes": [],
"createTransformations": [],
"updateTransformations": [],
"deleteTransformations": [],
"saveHierarchy": null
}
Response
Status: 200 OK
{
"hasImage": true,
"ID": "2f00a759-96d8-4b2c-acd6-6861542f65b2",
"Name": "PlantModel",
"CompanyName": "solutions",
"Description": "",
"Assets": "ASSET",
"ImagePreviewUrl": null,
"ImageUrl": null,
"RootNodeID": "5fdfd55f-38ff-4406-ab57-9c41c8f92ab6",
"Version": 4
}
Get Attribute Parameters
GET {{LEM_URL}}/api/v1/dt2/attribute-parameters/{{LEM_DT_Model_ID}}
Get Attribute Parameters
Returns the list of attribute parameters for a model. Parameters are free-form (Name, Value) pairs attached to an owner (ownerType: 0 = model, other values reserved). They behave like static attributes for templated bindings.
Endpoint
GET {{LEM_URL}}/api/v1/dt2/attribute-parameters/{{LEM_DT_Model_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) |
Response
200 OK -- application/json
| Field | Type | Description |
|---|---|---|
ID |
string | Parameter UUID. |
ModelID |
string | Parent model UUID (echo of path parameter). |
ownerId |
string | UUID of the parameter's owner (model or attribute). |
ownerType |
integer | 0 = model. Other values reserved for future owner kinds. |
Name / Value |
string | Parameter key/value. |
[
{
"ownerId": "e75dc5b0-2dec-4d1a-b45c-ec01884875d4",
"ownerType": 0,
"ID": "e5027b6f-423a-4af2-a9bf-f4f20b3d8aab",
"ModelID": "e75dc5b0-2dec-4d1a-b45c-ec01884875d4",
"Name": "test",
"Value": "value"
}
]
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
[
{
"ownerId": "e75dc5b0-2dec-4d1a-b45c-ec01884875d4",
"ownerType": 0,
"ID": "e5027b6f-423a-4af2-a9bf-f4f20b3d8aab",
"ModelID": "e75dc5b0-2dec-4d1a-b45c-ec01884875d4",
"Name": "test",
"Value": "value"
}
]
Parse instances CSV and return as list
POST {{LEM_URL}}/api/v1/dt2/{{company_name}}/instances/parse-csv?modelId=
Parse instances CSV and return as list
Parses a Digital Twin instances CSV against a given model and returns the parsed instances as a list, without persisting them. Use to validate an instances CSV before creating the instances.
Endpoint
POST {{LEM_URL}}/api/v1/dt2/{{company_name}}/instances/parse-csv
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
modelId |
query | Required. The Digital Twin model to parse against. |
| ## Request body |
The instances CSV content.
Response
ParsedCsvInstanceResponse (the parsed instances and any parse errors).
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.
Request Body
{
"file": "string"
}
List hierarchy templates for a company
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template
Changed in 2.35. Fields removed:
code.
List hierarchy templates for a company
Lists every hierarchy template defined for a company, optionally filtered by status. Each company is seeded with built-in templates (isBuiltIn: true), for example ISA-95 (Standard) (ACTIVE, 7 levels from Enterprise to Work Unit) and Compact (No Region) (DRAFT, 6 levels).
Endpoint
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
status |
query | Filter by status: DRAFT, ACTIVE or LOCKED. An unknown value answers 400. |
| ## Response |
[HierarchyTemplate]. HierarchyTemplate: id, name, description, companyName, status (DRAFT / ACTIVE / LOCKED), isBuiltIn, levels[], createdAt, updatedAt. Each level has id, templateId, name, description, icon, required and position (0 = root). Timestamps come back as epoch milliseconds.
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
[
{
"id": "d279964a-4eac-48a1-850d-02821aba2016",
"name": "Compact (No Region)",
"description": "Simplified 6-level hierarchy without Region - for single-region tenants.",
"companyName": "test",
"status": "DRAFT",
"isBuiltIn": true,
"levels": [
{
"id": "aab0b992-edce-4be1-9d6c-167dc3c3ca79",
"templateId": "d279964a-4eac-48a1-850d-02821aba2016",
"name": "Enterprise",
"description": "Top-level organization (the company itself).",
"icon": "business",
"required": true,
"position": 0,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "a4082b46-b3a6-47a5-8674-aeb6f6ccd3e5",
"templateId": "d279964a-4eac-48a1-850d-02821aba2016",
"name": "Site",
"description": "Physical location (factory campus or facility).",
"icon": "place",
"required": false,
"position": 1,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "6c7c2fe6-f6e6-40be-b30a-5b7c93a4697c",
"templateId": "d279964a-4eac-48a1-850d-02821aba2016",
"name": "Plant",
"description": "Manufacturing plant within a site.",
"icon": "factory",
"required": false,
"position": 2,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "72302755-abb2-4c9f-80a5-172f2b913d0d",
"templateId": "d279964a-4eac-48a1-850d-02821aba2016",
"name": "Area",
"description": "Functional production area within a plant.",
"icon": "grid_view",
"required": false,
"position": 3,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "b1db730a-7cb5-4fc3-bcc4-eae30c5b0aa5",
"templateId": "d279964a-4eac-48a1-850d-02821aba2016",
"name": "Work Center",
"description": "Group of related work units.",
"icon": "hub",
"required": false,
"position": 4,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "5cae6562-c008-4139-a8ea-2dfd8cb1ea84",
"templateId": "d279964a-4eac-48a1-850d-02821aba2016",
"name": "Work Unit",
"description": "Individual machine or asset.",
"icon": "precision_manufacturing",
"required": false,
"position": 5,
"createdAt": 1791829268000,
"updatedAt": null
}
],
"createdAt": 1791829268000,
"updatedAt": 1791829268000
},
{
"id": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "ISA-95 (Standard)",
"description": "Industry-standard 7-level hierarchy: Enterprise to Work Unit.",
"companyName": "test",
"status": "ACTIVE",
"isBuiltIn": true,
"levels": [
{
"id": "67baaa51-6f57-434c-92bc-c192ed02d916",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Enterprise",
"description": "Top-level organization (the company itself).",
"icon": "business",
"required": true,
"position": 0,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "27ea580c-1399-4c4b-9a69-5cf68143e02c",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Region",
"description": "Geographic grouping of sites.",
"icon": "public",
"required": false,
"position": 1,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "a742d8a1-b4eb-40a2-b962-e1fed7b47487",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Site",
"description": "Physical location (factory campus or facility).",
"icon": "place",
"required": false,
"position": 2,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "b81d34e6-2473-4961-bc1c-f5ddb005af82",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Plant",
"description": "Manufacturing plant within a site.",
"icon": "factory",
"required": false,
"position": 3,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "dca2de97-9822-4b9b-b333-c7970965546b",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Area",
"description": "Functional production area within a plant.",
"icon": "grid_view",
"required": false,
"position": 4,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "98036d7b-c103-49f8-a52d-4436343a70a4",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Work Center",
"description": "Group of related work units.",
"icon": "hub",
"required": false,
"position": 5,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "394e2224-3339-40db-879a-8314de023d87",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Work Unit",
"description": "Individual machine or asset.",
"icon": "precision_manufacturing",
"required": false,
"position": 6,
"createdAt": 1791829268000,
"updatedAt": null
}
],
"createdAt": 1791829268000,
"updatedAt": 1791829268000
}
]
Return the single active hierarchy template for a company
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/active
Changed in 2.35. Fields removed:
code.
Return the single active hierarchy template for a company
Returns the one ACTIVE hierarchy template for the company. Nodes are built against this template, so its levels[].id values are the levelIds to use when creating nodes.
Endpoint
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/active
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
| ## Response |
A single HierarchyTemplate. HierarchyTemplate: id, name, description, companyName, status (DRAFT / ACTIVE / LOCKED), isBuiltIn, levels[], createdAt, updatedAt. Each level has id, templateId, name, description, icon, required and position (0 = root). Timestamps come back as epoch milliseconds.
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
{
"id": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "ISA-95 (Standard)",
"description": "Industry-standard 7-level hierarchy: Enterprise to Work Unit.",
"companyName": "test",
"status": "ACTIVE",
"isBuiltIn": true,
"levels": [
{
"id": "67baaa51-6f57-434c-92bc-c192ed02d916",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Enterprise",
"description": "Top-level organization (the company itself).",
"icon": "business",
"required": true,
"position": 0,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "27ea580c-1399-4c4b-9a69-5cf68143e02c",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Region",
"description": "Geographic grouping of sites.",
"icon": "public",
"required": false,
"position": 1,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "a742d8a1-b4eb-40a2-b962-e1fed7b47487",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Site",
"description": "Physical location (factory campus or facility).",
"icon": "place",
"required": false,
"position": 2,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "b81d34e6-2473-4961-bc1c-f5ddb005af82",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Plant",
"description": "Manufacturing plant within a site.",
"icon": "factory",
"required": false,
"position": 3,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "dca2de97-9822-4b9b-b333-c7970965546b",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Area",
"description": "Functional production area within a plant.",
"icon": "grid_view",
"required": false,
"position": 4,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "98036d7b-c103-49f8-a52d-4436343a70a4",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Work Center",
"description": "Group of related work units.",
"icon": "hub",
"required": false,
"position": 5,
"createdAt": 1791829268000,
"updatedAt": null
},
{
"id": "394e2224-3339-40db-879a-8314de023d87",
"templateId": "046f03e5-8b34-423a-9888-8a528e21d102",
"name": "Work Unit",
"description": "Individual machine or asset.",
"icon": "precision_manufacturing",
"required": false,
"position": 6,
"createdAt": 1791829268000,
"updatedAt": null
}
],
"createdAt": 1791829268000,
"updatedAt": 1791829268000
}
Return a hierarchy template by ID
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{{id}}
Changed in 2.35. Fields removed:
code.
Return a hierarchy template by ID
Returns a single hierarchy template by id, including its ordered levels.
Endpoint
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Template id. |
| ## Response |
A single HierarchyTemplate. HierarchyTemplate: id, name, description, companyName, status (DRAFT / ACTIVE / LOCKED), isBuiltIn, levels[], createdAt, updatedAt. Each level has id, templateId, name, description, icon, required and position (0 = root). Timestamps come back as epoch milliseconds.
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
{
"id": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Docs Example Hierarchy",
"description": "API docs sample",
"companyName": "heartbeat",
"status": "DRAFT",
"isBuiltIn": false,
"levels": [
{
"id": "a70a94b2-7ad0-4266-a0a0-6cab23cb6bfe",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Enterprise",
"description": "Top-level organization (the company itself).",
"icon": "business",
"required": true,
"position": 0,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d3d36a70-b0ba-4035-969f-e332470eb8a8",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Region",
"description": "Geographic grouping of sites.",
"icon": "public",
"required": false,
"position": 1,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "72a38f1f-7420-41c0-84ad-e90c31b941f5",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Site",
"description": "Physical location (factory campus or facility).",
"icon": "place",
"required": false,
"position": 2,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "dd78c10b-9778-4de8-9442-431a72eabf19",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Plant",
"description": "Manufacturing plant within a site.",
"icon": "factory",
"required": false,
"position": 3,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d2477ca3-49cb-4e0c-b28d-17d9cc738b2b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Area",
"description": "Functional production area within a plant.",
"icon": "grid_view",
"required": false,
"position": 4,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "60a9a176-0fd3-4874-8deb-f0651804357b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Work Center",
"description": "Group of related work units.",
"icon": "hub",
"required": false,
"position": 5,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "bb8e6207-726f-4327-bdc9-81fc364aa59b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Work Unit",
"description": "Leaf - individual machine or asset.",
"icon": "precision_manufacturing",
"required": true,
"position": 6,
"createdAt": 1781642616000,
"updatedAt": null
}
],
"createdAt": 1781642616000,
"updatedAt": 1781642616000
}
Create a new hierarchy template
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template
Changed in 2.35. Fields removed:
code.Updated in 2.35. Newly documented responses:
422.
Create a new hierarchy template
Creates a new DRAFT hierarchy template for the company. Add levels with the level endpoints, then activate it.
Endpoint
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
| ## Request body |
{ name, description?, levels? }. name must be unique in the company. Since 2.35 the hierarchy has no code or levelCode fields. Sending code is rejected with 422 (legacy code field supplied).
Response
201 Created with the new HierarchyTemplate (status DRAFT). 409 when the name is taken.
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.
Request Body
{
"deviceId": "deviceId",
"templateDescription": "Description",
"friendlyName": "Siemens S7-1500 Base",
"creationOptions": {},
"userEncryptionKey": "mySecretKey"
}
Update a template's meta fields (name, description)
PATCH {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{{id}}
Changed in 2.35. Fields removed:
code.
Update a template's meta fields (name, description)
Updates a template's name and/or description. Level changes use the level endpoints.
Endpoint
PATCH {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Template id. |
| ## Request body |
PatchTemplateRequest { name?, description? }. name must stay unique in the company.
Response
The updated HierarchyTemplate. 409 for a duplicate name or a LOCKED template; 422 when the change violates a built-in template's lock or includes a code field.
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.
Request Body
{
"name": "string",
"description": "string"
}
Response
Status: 200 OK
{
"id": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Docs Example Hierarchy",
"description": "Updated by API docs",
"companyName": "heartbeat",
"status": "DRAFT",
"isBuiltIn": false,
"levels": [
{
"id": "a70a94b2-7ad0-4266-a0a0-6cab23cb6bfe",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Enterprise",
"description": "Top-level organization (the company itself).",
"icon": "business",
"required": true,
"position": 0,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d3d36a70-b0ba-4035-969f-e332470eb8a8",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Region",
"description": "Geographic grouping of sites.",
"icon": "public",
"required": false,
"position": 1,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "72a38f1f-7420-41c0-84ad-e90c31b941f5",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Site",
"description": "Physical location (factory campus or facility).",
"icon": "place",
"required": false,
"position": 2,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "dd78c10b-9778-4de8-9442-431a72eabf19",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Plant",
"description": "Manufacturing plant within a site.",
"icon": "factory",
"required": false,
"position": 3,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d2477ca3-49cb-4e0c-b28d-17d9cc738b2b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Area",
"description": "Functional production area within a plant.",
"icon": "grid_view",
"required": false,
"position": 4,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "60a9a176-0fd3-4874-8deb-f0651804357b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Work Center",
"description": "Group of related work units.",
"icon": "hub",
"required": false,
"position": 5,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "bb8e6207-726f-4327-bdc9-81fc364aa59b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Work Unit",
"description": "Leaf - individual machine or asset.",
"icon": "precision_manufacturing",
"required": true,
"position": 6,
"createdAt": 1781642616000,
"updatedAt": null
}
],
"createdAt": 1781642616000,
"updatedAt": 1781642616009
}
Delete a DRAFT template that has no node references
DELETE {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{{id}}
Delete a DRAFT template that has no node references
Deletes a DRAFT template. Only DRAFT templates with no nodes built against them can be deleted; the ACTIVE template and referenced templates cannot.
Endpoint
DELETE {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Template id. |
| ## Response |
204 No Content on success.
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.
Duplicate a template as a new DRAFT with a different name
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{{id}}/duplicate
Changed in 2.35. Fields removed:
code.Updated in 2.35. Newly documented responses:
422.
Duplicate a template as a new DRAFT with a different name
Copies an existing template (and its levels) into a new DRAFT under a different name. Handy for iterating on a hierarchy design, or for customizing a built-in template, without touching the ACTIVE one.
Endpoint
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{id}/duplicate
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Source template id. |
| ## Request body |
DuplicateTemplateRequest { name, description? }. name is required and must be unique in the company; description defaults to the source's.
Response
201 Created with the new DRAFT HierarchyTemplate. 409 for a duplicate name.
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.
Request Body
{
"name": "string",
"description": "string"
}
Response
Status: 200 OK
{
"id": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Docs Example Hierarchy",
"description": "API docs sample",
"companyName": "heartbeat",
"status": "DRAFT",
"isBuiltIn": false,
"levels": [
{
"id": "a70a94b2-7ad0-4266-a0a0-6cab23cb6bfe",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Enterprise",
"description": "Top-level organization (the company itself).",
"icon": "business",
"required": true,
"position": 0,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d3d36a70-b0ba-4035-969f-e332470eb8a8",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Region",
"description": "Geographic grouping of sites.",
"icon": "public",
"required": false,
"position": 1,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "72a38f1f-7420-41c0-84ad-e90c31b941f5",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Site",
"description": "Physical location (factory campus or facility).",
"icon": "place",
"required": false,
"position": 2,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "dd78c10b-9778-4de8-9442-431a72eabf19",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Plant",
"description": "Manufacturing plant within a site.",
"icon": "factory",
"required": false,
"position": 3,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d2477ca3-49cb-4e0c-b28d-17d9cc738b2b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Area",
"description": "Functional production area within a plant.",
"icon": "grid_view",
"required": false,
"position": 4,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "60a9a176-0fd3-4874-8deb-f0651804357b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Work Center",
"description": "Group of related work units.",
"icon": "hub",
"required": false,
"position": 5,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "bb8e6207-726f-4327-bdc9-81fc364aa59b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Work Unit",
"description": "Leaf - individual machine or asset.",
"icon": "precision_manufacturing",
"required": true,
"position": 6,
"createdAt": 1781642616000,
"updatedAt": null
}
],
"createdAt": 1781642615899,
"updatedAt": 1781642615899
}
Activate a DRAFT template, making it the single ACTIVE template
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{{id}}/activate
Changed in 2.35. Fields removed:
code.
Activate a DRAFT template, making it the single ACTIVE template
Promotes a DRAFT template to ACTIVE. Because a company has exactly one ACTIVE template, the previously active one is demoted.
Endpoint
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{id}/activate
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Template id to activate. |
| ## Response |
The now-ACTIVE HierarchyTemplate. 409 when the target is LOCKED or the status transition is not allowed. 422 with a HierarchyValidationError body (errors[] of field, levelId, nodeId, reason, ...) when the template's topology is invalid, for example fewer than 2 levels or a gap in positions.
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
{
"errors": [
{
"field": "levels[7].required",
"levelId": "d10d1554-62a7-4725-94ef-9a9cf6269fd9",
"nodeId": null,
"reason": "LEVEL_MISMATCH",
"currentLevelCode": null,
"expectedLevelCode": null,
"depth": null,
"message": null
}
]
}
Add a level to a DRAFT template
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{{id}}/level
Changed in 2.35. Fields removed:
code.
Add a level to a DRAFT template
Inserts a level (a tier such as Site or Area) into a DRAFT template. By default the level is appended; afterPosition inserts it after a given position.
Endpoint
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{id}/level
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Template id. |
| ## Request body |
CreateTemplateLevelRequest { name, description?, icon?, required?, afterPosition? }. name is required and unique within the template; icon is a Material icon name; afterPosition is zero-based, and -1 or absent appends.
Response
201 Created with the updated HierarchyTemplate including the new level.
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.
Request Body
{
"afterPosition": 0,
"name": "string",
"description": "string",
"icon": "string",
"required": true
}
Response
Status: 200 OK
{
"id": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Docs Example Hierarchy",
"description": "Updated by API docs",
"companyName": "heartbeat",
"status": "DRAFT",
"isBuiltIn": false,
"levels": [
{
"id": "a70a94b2-7ad0-4266-a0a0-6cab23cb6bfe",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Enterprise",
"description": "Top-level organization (the company itself).",
"icon": "business",
"required": true,
"position": 0,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d3d36a70-b0ba-4035-969f-e332470eb8a8",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Region",
"description": "Geographic grouping of sites.",
"icon": "public",
"required": false,
"position": 1,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "72a38f1f-7420-41c0-84ad-e90c31b941f5",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Site",
"description": "Physical location (factory campus or facility).",
"icon": "place",
"required": false,
"position": 2,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "dd78c10b-9778-4de8-9442-431a72eabf19",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Plant",
"description": "Manufacturing plant within a site.",
"icon": "factory",
"required": false,
"position": 3,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d2477ca3-49cb-4e0c-b28d-17d9cc738b2b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Area",
"description": "Functional production area within a plant.",
"icon": "grid_view",
"required": false,
"position": 4,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "60a9a176-0fd3-4874-8deb-f0651804357b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Work Center",
"description": "Group of related work units.",
"icon": "hub",
"required": false,
"position": 5,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "bb8e6207-726f-4327-bdc9-81fc364aa59b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Work Unit",
"description": "Leaf - individual machine or asset.",
"icon": "precision_manufacturing",
"required": true,
"position": 6,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d10d1554-62a7-4725-94ef-9a9cf6269fd9",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Docs Level",
"description": "sample level",
"icon": null,
"required": false,
"position": 7,
"createdAt": 1781642616000,
"updatedAt": null
}
],
"createdAt": 1781642616000,
"updatedAt": 1781642616000
}
Update a level's display fields (name, description, icon, required)
PATCH {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{{id}}/level/{{level_id}}
Changed in 2.35. Fields removed:
code.
Update a level's display fields (name, description, icon, required)
Updates a single level's display fields on a template.
Endpoint
PATCH {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{id}/level/{levelId}
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Template id. |
levelId |
path | Level id (from the template's levels[].id). |
| ## Request body |
PatchTemplateLevelRequest { name?, description?, icon?, required? }. A null required keeps the current value.
Response
The updated HierarchyTemplate. 409 for a duplicate level name; 422 when renaming a level of a built-in template or changing the root's required flag.
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.
Request Body
{
"name": "string",
"description": "string",
"icon": "string",
"required": true
}
Response
Status: 200 OK
{
"id": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Docs Example Hierarchy",
"description": "Updated by API docs",
"companyName": "heartbeat",
"status": "DRAFT",
"isBuiltIn": false,
"levels": [
{
"id": "a70a94b2-7ad0-4266-a0a0-6cab23cb6bfe",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Enterprise",
"description": "Top-level organization (the company itself).",
"icon": "business",
"required": true,
"position": 0,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d3d36a70-b0ba-4035-969f-e332470eb8a8",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Region",
"description": "Geographic grouping of sites.",
"icon": "public",
"required": false,
"position": 1,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "72a38f1f-7420-41c0-84ad-e90c31b941f5",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Site",
"description": "Physical location (factory campus or facility).",
"icon": "place",
"required": false,
"position": 2,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "dd78c10b-9778-4de8-9442-431a72eabf19",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Plant",
"description": "Manufacturing plant within a site.",
"icon": "factory",
"required": false,
"position": 3,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d2477ca3-49cb-4e0c-b28d-17d9cc738b2b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Area",
"description": "Functional production area within a plant.",
"icon": "grid_view",
"required": false,
"position": 4,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "60a9a176-0fd3-4874-8deb-f0651804357b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Work Center",
"description": "Group of related work units.",
"icon": "hub",
"required": false,
"position": 5,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "bb8e6207-726f-4327-bdc9-81fc364aa59b",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Work Unit",
"description": "Leaf - individual machine or asset.",
"icon": "precision_manufacturing",
"required": true,
"position": 6,
"createdAt": 1781642616000,
"updatedAt": null
},
{
"id": "d10d1554-62a7-4725-94ef-9a9cf6269fd9",
"templateId": "d7b0436e-3190-4c80-98d0-b1f44707a74b",
"name": "Docs Level (renamed)",
"description": "edited",
"icon": null,
"required": false,
"position": 7,
"createdAt": 1781642616000,
"updatedAt": 1781642616131
}
],
"createdAt": 1781642616000,
"updatedAt": 1781642616000
}
Remove a level from a DRAFT template
DELETE {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{{id}}/level/{{level_id}}
Changed in 2.35. Fields removed:
code.Updated in 2.35. Newly documented responses:
409.
Remove a level from a DRAFT template
Removes a level from a DRAFT template.
Endpoint
DELETE {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{id}/level/{levelId}
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Template id. |
levelId |
path | Level id (from the template's levels[].id). |
| ## Response |
The updated HierarchyTemplate. 409 when nodes exist at this level; 422 for the root level, a template already at the 2-level minimum, or a built-in template.
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
{
"errors": [
{
"field": "levels[7]",
"levelId": null,
"nodeId": "d10d1554-62a7-4725-94ef-9a9cf6269fd9",
"reason": "LEVEL_MISMATCH",
"currentLevelCode": null,
"expectedLevelCode": null,
"depth": null,
"message": null
}
]
}
Move a level one slot UP or DOWN within a DRAFT template
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{{id}}/level/{{level_id}}/move
Changed in 2.35. Fields removed:
code.
Move a level one slot UP or DOWN within a DRAFT template
Reorders a level by one position within a DRAFT template. UP moves it towards the root, DOWN towards the leaf.
Endpoint
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{id}/level/{levelId}/move
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Template id. |
levelId |
path | Level id (from the template's levels[].id). |
| ## Request body |
MoveLevelRequest { direction: UP | DOWN }.
Response
The updated HierarchyTemplate with the new level order. 422 when the root or leaf would move, or the template has 2 or fewer levels.
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.
Request Body
{
"direction": "UP"
}
Response
Status: 200 OK
{
"errors": [
{
"field": "levels[7]",
"levelId": null,
"nodeId": "d10d1554-62a7-4725-94ef-9a9cf6269fd9",
"reason": "LEVEL_MISMATCH",
"currentLevelCode": null,
"expectedLevelCode": null,
"depth": null,
"message": null
}
]
}
Bulk-update a template's levels (add / update / delete / move atomically)
PUT {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{{id}}/levels
Changed in 2.35. Fields removed:
code.
Bulk-update a template's levels (add / update / delete / move atomically)
Replaces a template's levels with a desired final state in one atomic call. Entries with an id update existing levels, entries without one are inserted, and existing levels missing from the list are deleted. Use this instead of many single-level calls when reworking a template's structure.
Endpoint
PUT {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/template/{id}/levels
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Template id. |
| ## Request body |
BulkUpdateLevelsRequest { levels: [ { id?, name, description?, icon?, required, position } ] }. Positions are zero-based, unique and contiguous; the root and leaf levels must be required: true.
Response
The updated HierarchyTemplate. 409 when the template is LOCKED, or when nodes reference it and the change is structural. 422 aggregates validation errors.
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.
Request Body
{
"levels": [
{
"id": "ee32d6a8-ff01-4af5-83c0-02d51055c791",
"name": "Enterprise",
"description": "Top-level organisation",
"icon": "business",
"required": true,
"position": 0
}
]
}
List root nodes for the company (flat, no children)
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node
Changed in 2.35. Fields removed:
code,levelCode.Updated in 2.35. New response fields:
levelId.
List root nodes for the company (flat, no children)
Lists the top-level hierarchy nodes for the company without expanding their children. Use the tree endpoints to fetch subtrees.
Endpoint
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
| ## Response |
[HierarchyNode] (root nodes only; an empty array when the company has none). HierarchyNode: id, templateId, parentId (null for a root), levelId, name, companyName, status (ACTIVE / INACTIVE), object and childNodes[] (only when expansion is requested), createdAt, updatedAt.
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
[]
Return all root nodes with fully-expanded subtrees
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/tree
Changed in 2.35. Fields removed:
code,levelCode.Updated in 2.35. New response fields:
levelId.
Return all root nodes with fully-expanded subtrees
Returns every root node with its full subtree expanded, i.e. the entire company hierarchy as a forest.
Endpoint
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/tree
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
| ## Response |
[HierarchyNode] with nested childNodes. HierarchyNode: id, templateId, parentId (null for a root), levelId, name, companyName, status (ACTIVE / INACTIVE), object and childNodes[] (only when expansion is requested), createdAt, updatedAt.
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
[]
Return a node with optional depth expansion
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{{id}}
Changed in 2.35. Fields removed:
code,levelCode.Updated in 2.35. New response fields:
levelId.
Return a node with optional depth expansion
Returns a single node, optionally expanding its descendants to a given depth.
Endpoint
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Node id. |
depth |
query | How many child levels to expand (0 = node only). |
| ## Response |
A single HierarchyNode. HierarchyNode: id, templateId, parentId (null for a root), levelId, name, companyName, status (ACTIVE / INACTIVE), object and childNodes[] (only when expansion is requested), createdAt, updatedAt.
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
{
"id": "5fbb2c49-1bbe-43eb-bdc6-7772ca23d163",
"templateId": "03be83b2-4324-4721-962a-9063e828f361",
"parentId": null,
"name": "Docs Example Node",
"companyName": "heartbeat",
"status": "ACTIVE",
"childNodes": null,
"object": {
"_subtype": "container",
"id": "5fbb2c49-1bbe-43eb-bdc6-7772ca23d163",
"companyName": "heartbeat",
"name": "Docs Example Node",
"status": "ACTIVE"
},
"createdAt": 1781642616000,
"updatedAt": null
}
Return the full subtree rooted at a single node
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{{id}}/tree
Changed in 2.35. Fields removed:
code,levelCode.Updated in 2.35. New response fields:
levelId.
Return the full subtree rooted at a single node
Returns a node with its complete subtree expanded.
Endpoint
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{id}/tree
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Root node id. |
| ## Response |
A single HierarchyNode with nested childNodes. HierarchyNode: id, templateId, parentId (null for a root), levelId, name, companyName, status (ACTIVE / INACTIVE), object and childNodes[] (only when expansion is requested), createdAt, updatedAt.
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
{
"id": "5fbb2c49-1bbe-43eb-bdc6-7772ca23d163",
"templateId": "03be83b2-4324-4721-962a-9063e828f361",
"parentId": null,
"name": "Docs Example Node",
"companyName": "heartbeat",
"status": "ACTIVE",
"childNodes": null,
"object": {
"_subtype": "container",
"id": "5fbb2c49-1bbe-43eb-bdc6-7772ca23d163",
"companyName": "heartbeat",
"name": "Docs Example Node",
"status": "ACTIVE"
},
"createdAt": 1781642616000,
"updatedAt": null
}
Create a new hierarchy node
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node
Changed in 2.35. Fields removed:
code,levelCode. Now required in the request body:levelId,name.Updated in 2.35. New response fields:
levelId.
Create a new hierarchy node
Creates a hierarchy node against the company's ACTIVE template. The node's level and parent determine where it sits in the tree.
Endpoint
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
| ## Request body |
CreateNodeRequest:
| Field | Required | Notes |
|---|---|---|
levelId |
yes | A level id from the ACTIVE template (Return the single active hierarchy template). |
name |
yes | Display name, unique among siblings. |
parentId |
no | Parent node id; omit or null for a root node. |
status |
no | ACTIVE (default) or INACTIVE. |
object |
no | Container or leaf payload, see below. |
object is polymorphic on _subtype: a container payload for non-leaf nodes, or a leaf payload that binds a Digital Twin (dtModelId, dtInstanceId; dtModelName, dtModelVersion and dtInstanceStatus are server-derived and read-only). Since 2.35 the hierarchy has no code or levelCode fields. Sending code is rejected with 422 (legacy code field supplied).
Response
201 Created with the new HierarchyNode. 409 for a sibling name collision; 422 for a level mismatch, a missing or malformed name, a code field, or a Digital Twin binding error.
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.
Request Body
{
"parentId": "string",
"name": "string",
"status": "ACTIVE",
"object": {
"id": "string",
"companyName": "string",
"name": "string",
"status": "ACTIVE",
"_subtype": "string"
},
"levelId": "{{level_id}}"
}
Response
Status: 200 OK
{
"id": "5fbb2c49-1bbe-43eb-bdc6-7772ca23d163",
"templateId": "03be83b2-4324-4721-962a-9063e828f361",
"parentId": null,
"name": "Docs Example Node",
"companyName": "heartbeat",
"status": "ACTIVE",
"childNodes": null,
"object": {
"_subtype": "container",
"id": "5fbb2c49-1bbe-43eb-bdc6-7772ca23d163",
"companyName": "heartbeat",
"name": "Docs Example Node",
"status": "ACTIVE"
},
"createdAt": 1781642616424,
"updatedAt": null
}
Update a node's name, status, and/or object payload
PATCH {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{{id}}
Changed in 2.35. Fields removed:
code,levelCode.Updated in 2.35. New optional request fields:
levelId. New response fields:levelId.
Update a node's name, status, and/or object payload
Updates a hierarchy node's name and status and/or its attached object payload. parentId, levelId and templateId are immutable after create; use Move a node under a new parent to re-parent a Digital Twin instance node.
Endpoint
PATCH {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Node id. |
| ## Request body |
PatchNodeRequest { name?, status?, object? }. Sending parentId, levelId, templateId or code is rejected with 422.
Response
The updated HierarchyNode. 409 for a sibling name collision.
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.
Request Body
{
"parentId": "string",
"templateId": "string",
"name": "string",
"status": "ACTIVE",
"object": {
"id": "string",
"companyName": "string",
"name": "string",
"status": "ACTIVE",
"_subtype": "string"
},
"levelId": "string"
}
Response
Status: 200 OK
{
"id": "5fbb2c49-1bbe-43eb-bdc6-7772ca23d163",
"templateId": "03be83b2-4324-4721-962a-9063e828f361",
"parentId": null,
"name": "Docs Example Node (edited)",
"companyName": "heartbeat",
"status": "ACTIVE",
"childNodes": null,
"object": {
"_subtype": "container",
"id": "5fbb2c49-1bbe-43eb-bdc6-7772ca23d163",
"companyName": "heartbeat",
"name": "Docs Example Node (edited)",
"status": "ACTIVE"
},
"createdAt": 1781642616000,
"updatedAt": 1781642616709
}
Delete a hierarchy node; force=true required when children exist
DELETE {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{{id}}
Delete a hierarchy node; force=true required when children exist
Deletes a hierarchy node. If the node has children, the deletion is rejected unless force=true is supplied, which deletes the node and its whole subtree.
Endpoint
DELETE {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Node id. |
force |
query | Set true to delete a node that has children (cascades). |
| ## Response |
204 No Content on success.
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.
Export the company's hierarchy as CSV
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/export
Export the company's hierarchy as CSV
Exports the company's entire node hierarchy as a CSV file, suitable for editing and re-importing with Import a CSV into the company's hierarchy.
Endpoint
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/export
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
| ## Response |
text/csv attachment. Columns: name, levelName, parentName, status, dtInstanceId, assetId, sourceSystem, nodeId, parentNodeId. A company with no nodes returns the header row only.
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,name,levelCode,parentCode,status,dtInstanceId,assetId,sourceSystem
DOCS_NODE,Docs Example Node (edited),ENTERPRISE,,ACTIVE,,,
Import a CSV into the company's hierarchy
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/import?mode=
Changed in 2.35. Fields removed:
code.Updated in 2.35. New response fields:
name.
Import a CSV into the company's hierarchy
Imports a CSV (in the shape produced by Export) into the company's hierarchy. Rows refer to levels by levelName and to parents by parentName; missing intermediate nodes are created.
Endpoint
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/import
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
mode |
query | Required. MERGE (update matching nodes, add the rest) or REPLACE. |
| ## Request body |
multipart/form-data with the CSV as the file part.
Response
HierarchyImportResult { createdCount, updatedCount, skippedCount, errors[] }. Each error has row (1-based), name, field and reason (for example UNKNOWN_LEVEL_NAME). 400 for a malformed or oversized CSV, a missing column or a bad mode; 409 NO_ACTIVE_TEMPLATE; 422 with per-row errors and empty counts.
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.
Move a node under a new parent
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{{id}}/move
New in 2.35.
Move a node under a new parent
Re-parents a Digital Twin instance node (a leaf bound to a DT instance). A null parentId moves it to the root.
Endpoint
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{id}/move
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Node id. |
| ## Request body |
MoveNodeRequest { parentId }. The body is required (400 without it).
Response
The moved HierarchyNode. 409 for a sibling name collision. 422 when the node is not a DT-instance leaf, has children, would become its own parent, the template is inactive, or the new parent sits at the last level.
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.
Request Body
{
"parentId": "string"
}
Get Node Permissions
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{{id}}/permissions
New in 3.0.
Get Node Permissions
Returns whether the caller may edit a node and, for admins, who else can. Branch edit access lets a user holding the asset hierarchy operator role edit one node and its whole subtree.
Endpoint
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{id}/permissions
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Node id. |
includeUsers |
query | false skips the access list and returns canEdit only. |
| ## Response |
NodePermissionsResponse { canEdit, users[] }. users is returned to admins only; each entry has grantId (the revoke target), userId, username, sourceNodeId, sourcePath (node names from the root) and inherited (true when the grant sits on an ancestor).
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.
Grant Branch Edit Access
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{{id}}/permissions
New in 3.0.
Grant Branch Edit Access
Grants a user edit access to a node and its subtree. The grantee must hold the asset hierarchy operator role (see List Hierarchy Operators) and must not be an admin.
Endpoint
POST {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/node/{id}/permissions
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
id |
path | Node id. |
| ## Request body |
GrantPermissionRequest { userId }: the grantee's Keycloak user id.
Response
201 Created with the HierarchyPermission { id, nodeId, userRef, grantedBy, createdOn }. 422 when the grantee lacks the operator role or is an admin.
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.
Request Body
{
"userId": "string"
}
Revoke Branch Edit Access
DELETE {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/permissions/{{grant_id}}
New in 3.0.
Revoke Branch Edit Access
Revokes a branch edit grant. The grant id is users[].grantId from Get Node Permissions, or id from Grant Branch Edit Access.
Endpoint
DELETE {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/permissions/{grantId}
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
grantId |
path | Required. Grant id. |
| ## Response |
Empty on success.
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.
List Hierarchy Operators
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/operators
New in 3.0.
List Hierarchy Operators
Lists the users who hold the asset hierarchy operator role in the company, i.e. the users that branch edit access can be granted to.
Endpoint
GET {{LEM_URL}}/api/v1/assets/hierarchy/{{company_name}}/operators
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
first |
query | Zero-based offset. |
max |
query | Page size, 1 to 100. |
| ## Response |
[OperatorEntry] { userId, username }; an empty array when nobody holds the role.
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
[]
Get Asset Hub Status
GET {{LEM_URL}}/api/v1/asset-hub/status
New in 3.0.
Get Asset Hub Status
Reports whether this LEM is connected to the Asset Hub, the central catalog of published Digital Twin asset models that companies can import. The result is cached; live=true probes again.
Endpoint
GET {{LEM_URL}}/api/v1/asset-hub/status
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
live |
query | true bypasses the cached probe. |
| ## Response |
{ configured, state, checkedAt }. An instance without Asset Hub credentials answers { "configured": false, "state": "NOT_CONFIGURED" }.
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
{
"configured": false,
"state": "NOT_CONFIGURED",
"checkedAt": 1791917895708
}
Browse Asset Hub Catalog
GET {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/catalog?page=0
New in 3.0.
Browse Asset Hub Catalog
Pages through the Asset Hub catalog, enriched with what the company has already imported. This is the list the LEM UI's Asset Hub import dialog shows.
Endpoint
GET {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/catalog
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
page |
query | Page number. |
page_size |
query | Page size. |
q |
query | Free-text search. |
tag, label, arch, os, edge_version |
query | Filters. |
| ## Response |
{ data[], total }; each data[] entry is a catalog asset whose id is the centralUid used by the other Asset Hub calls. Asset Hub must be configured first (Admin Console APIs > Asset Hub > Save Asset Hub Settings). Until then, catalog calls answer 409 ASSET_HUB_NOT_CONFIGURED.
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.
Get Catalog Asset
GET {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/catalog/{{asset_hub_central_uid}}
New in 3.0.
Get Catalog Asset
Returns one Asset Hub catalog asset with its details, enriched with the company's import state.
Endpoint
GET {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/catalog/{centralUid}
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
centralUid |
path | Required. Asset Hub catalog asset id. |
| ## Response |
The catalog asset document. Asset Hub must be configured first (Admin Console APIs > Asset Hub > Save Asset Hub Settings). Until then, catalog calls answer 409 ASSET_HUB_NOT_CONFIGURED.
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.
Get Catalog Asset Versions
GET {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/catalog/{{asset_hub_central_uid}}/versions
New in 3.0.
Get Catalog Asset Versions
Returns the published version history of one Asset Hub catalog asset.
Endpoint
GET {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/catalog/{centralUid}/versions
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
centralUid |
path | Required. Asset Hub catalog asset id. |
| ## Response |
The asset's version list. Asset Hub must be configured first (Admin Console APIs > Asset Hub > Save Asset Hub Settings). Until then, catalog calls answer 409 ASSET_HUB_NOT_CONFIGURED.
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.
List Imported Assets
GET {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/imported
New in 3.0.
List Imported Assets
Lists the Digital Twin models the company imported from the Asset Hub and compares them with the catalog's last known state. Reads local data only, so it works even when the Asset Hub is unreachable.
Endpoint
GET {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/imported
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
| ## Response |
{ portal, summary, models[] }. portal has state, checkedAt, lastCrawlAt and stale. Each models[] entry links a local model (localModelId) to its catalog asset (centralUid, centralAssetName, importedVersion, portalVersion) with a portalStatus such as UPDATE_AVAILABLE (a newer version is published) or DEPRECATED (the asset can no longer be downloaded; deprecation.replaced_by names its successor).
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
{
"portal": {
"state": "NOT_CONFIGURED",
"checkedAt": "1791917895708",
"lastCrawlAt": null,
"stale": true
},
"summary": {},
"models": []
}
Import Catalog Asset
POST {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/import
New in 3.0.
Import Catalog Asset
Imports an Asset Hub catalog asset into the company as Digital Twin models. One asset can bring in several models.
Endpoint
POST {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/import
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
| ## Request body |
{ "centralUid": "<catalog asset id>" }, as the LEM UI sends it.
Response
A status object. Use List Imported Assets to find the created models. Asset Hub must be configured first (Admin Console APIs > Asset Hub > Save Asset Hub Settings). Until then, catalog calls answer 409 ASSET_HUB_NOT_CONFIGURED.
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.
Request Body
{}
Update Imported Asset
POST {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/update
New in 3.0.
Update Imported Asset
Updates a previously imported asset to the version currently published on the Asset Hub (the UI's Update action on a model flagged UPDATE_AVAILABLE).
Endpoint
POST {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/update
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
| ## Request body |
{ "centralUid": "<catalog asset id>" }.
Response
A status object. Asset Hub must be configured first (Admin Console APIs > Asset Hub > Save Asset Hub Settings). Until then, catalog calls answer 409 ASSET_HUB_NOT_CONFIGURED.
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.
Request Body
{}
Delete Imported Asset
DELETE {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/imported/{{asset_hub_central_uid}}
New in 3.0.
Delete Imported Asset
Removes an imported Asset Hub asset from the company, deleting every local model that came with it.
Endpoint
DELETE {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/imported/{centralUid}
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
centralUid |
path | Required. Asset Hub catalog asset id. |
| ## Response |
A status object.
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.
Sync Asset Hub
POST {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/sync
New in 3.0.
Sync Asset Hub
Triggers a crawl of the Asset Hub so the company's imported models are compared with the latest published versions. List Imported Assets then reports the refreshed portalStatus values and portal.lastCrawlAt.
Endpoint
POST {{LEM_URL}}/api/v1/asset-hub/{{company_name}}/sync
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) |
| ## Parameters |
| Parameter | In | Notes |
|---|---|---|
companyName |
path | Required. The company. |
| ## Response |
A status object. Asset Hub must be configured first (Admin Console APIs > Asset Hub > Save Asset Hub Settings). Until then, catalog calls answer 409 ASSET_HUB_NOT_CONFIGURED.
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.
Deploy DigitalTwin Models to Edge Device
POST {{LEM_URL}}/api/v1/dt2/model/push/{{project_id}}/{{edge_device_id}}
Deploy DigitalTwin Models to Edge Device
Pushes one or more Digital Twin models from LEM to a single edge device. This is the direct, synchronous equivalent of the Deploy action in the LEM Digital Twins UI. Use it when you are deploying to one device and want the per-model result in the response.
To deploy to several devices in one operation, use Bulk Deploy DigitalTwin Models to Edge Devices instead.
Endpoint
POST {{LEM_URL}}/api/v1/dt2/model/push/{projectId}/{deviceId}
Content-Type: application/json
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | LEM project that owns the device. 25-character LEM ID, not a UUID. |
deviceId |
string | Yes | Target edge device. 25-character LEM ID, not a UUID. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
modelIds |
string[] |
Yes | Digital Twin model IDs to deploy. These are UUIDs, as returned by Get DigitalTwin Models in the ID field. |
{
"modelIds": ["{{LEM_DT_Model_ID}}"]
}
Note the ID mismatch: projectId and deviceId are LEM-format 25-character identifiers, while modelIds entries are UUIDs. Mixing them up is the most common cause of a 404 here.
Response
200 OK -- application/json
| Field | Type | Description |
|---|---|---|
responseItems |
array |
One entry per model ID you submitted. |
responseItems[].modelId |
string |
The model this result refers to. |
responseItems[].success |
boolean |
Whether that model deployed. |
responseItems[].message |
string |
Failure detail. null on success. |
Results are per model, so a 200 does not mean every model deployed. Always check each success flag.
Deploying a model that is already on the device succeeds and overwrites it, so this call is safe to repeat.
Errors
| HTTP status | When it happens |
|---|---|
401 |
Missing or invalid API token. |
404 |
Device not found in the given project. Body is {"code":"E","message":"Failed to push Digital Twin models: device <id> not found"}. |
TLS note: LEM installations commonly use a self-signed certificate. Either install the CA in your client trust store or disable certificate verification when calling these endpoints directly.
Request Body
{
"modelIds": [
"{{LEM_DT_Model_ID}}"
]
}
Response
Status: 200 OK
{
"responseItems": [
{
"modelId": "87647a08-d8ea-46f7-a8d6-0984936f0a16",
"success": true,
"message": null
}
]
}
Bulk Deploy DigitalTwin Models to Edge Devices
POST {{LEM_URL}}/api/v1/async-task/task-with-subtasks
Bulk Deploy DigitalTwin Models to Edge Devices
Deploys Digital Twin models to one or more edge devices as an asynchronous task. This is what the LEM UI issues for a multi-device Digital Twin deployment.
The request returns a taskId immediately; the deployment runs in the background. Poll Verify DigitalTwin Deploy Task to follow it to completion.
This endpoint is the generic LEM async-task entry point, shared with application launches and AI/ML model uploads. What makes it a Digital Twin deployment is the task type DIGITAL_TWINS_MODEL_DEPLOY.
Endpoint
POST {{LEM_URL}}/api/v1/async-task/task-with-subtasks
Content-Type: application/json
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Display name for the task, shown in the LEM task list. |
description |
string | No | Free-form description. |
params |
object | Yes | Task-level parameters. Empty for this task type. |
companyName |
string | Yes | Company that owns the models. |
projectId |
string | Yes | LEM project. 25-character LEM ID, not a UUID. |
type |
enum | Yes | DIGITAL_TWINS_MODEL_DEPLOY. |
waitForOnline |
boolean | No | If true, hold the subtask until the device comes online instead of failing it. |
subtasks |
array | Yes | One entry per target device. See below. |
Subtask
| Field | Type | Required | Description |
|---|---|---|---|
deviceId |
string | Yes | Target edge device. 25-character LEM ID, not a UUID. |
num |
integer | Yes | Zero-based index of this subtask within the task. |
type |
enum | Yes | DIGITAL_TWINS_MODEL_DEPLOY. Must match the task-level type. |
params.modelIds |
string[] | Yes | Digital Twin model UUIDs to deploy to this device. |
plannedExecTime |
integer | Yes | Unix ms for a scheduled run, or 0 to run immediately. |
To deploy to several devices, add one subtask per device and increment num.
Digital Twin task types
GET {{LEM_URL}}/api/v1/async-task/task-types returns every task type valid on your instance. DIGITAL_TWINS_MODEL_DEPLOY and DIGITAL_TWINS_INSTANCES_UPGRADE are present on all supported LEM versions; newer builds add DIGITAL_TWINS_INSTANCE_CREATE and DIGITAL_TWINS_INSTANCE_CREATE_WITH_PARAMETERS. Query the endpoint rather than hardcoding the list.
Response
200 OK -- application/json
| Field | Type | Description |
|---|---|---|
taskId |
string | UUID of the created task. Pass to Verify DigitalTwin Deploy Task. |
A 200 means the task was accepted, not that anything deployed. Per-device outcomes only appear on the subtasks.
Errors
| HTTP status | When it happens |
|---|---|
401 |
Missing or invalid API token. |
409 |
Malformed body, or an unrecognised type. The error message enumerates every valid task type. |
Passing a UUID where
deviceIdexpects a 25-character LEM ID returns a409carrying a raw SQL error rather than a validation message. If you seeData too long for column 'deviceId', you used the wrong ID format.TLS note: LEM installations commonly use a self-signed certificate. Either install the CA in your client trust store or disable certificate verification when calling these endpoints directly.
Request Body
{
"name": "Deploy DT models (1 edge device)",
"description": "",
"params": {},
"companyName": "{{company_name}}",
"projectId": "{{project_id}}",
"subtasks": [
{
"deviceId": "{{edge_device_id}}",
"num": 0,
"params": {
"modelIds": [
"{{LEM_DT_Model_ID}}"
]
},
"type": "DIGITAL_TWINS_MODEL_DEPLOY",
"plannedExecTime": 0
}
],
"type": "DIGITAL_TWINS_MODEL_DEPLOY",
"waitForOnline": false
}
Response
Status: 200 OK
{
"taskId": "f67436eb-1a20-45cb-ab23-3ef8831074bd"
}
Verify DigitalTwin Deploy Task
GET {{LEM_URL}}/api/v1/async-task/{{task_id}}/subtasks
Verify DigitalTwin Deploy Task
Returns the per-device subtasks of a deployment task created by Bulk Deploy DigitalTwin Models to Edge Devices. Poll this until every subtask reports done: true.
Endpoint
GET {{LEM_URL}}/api/v1/async-task/{taskId}/subtasks
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId |
string | Yes | UUID returned by the bulk deploy call. |
For a task-level rollup instead of per-device detail, use GET {{LEM_URL}}/api/v1/async-task/task/{taskId}, which returns the same status, progress, and done fields plus subtasksNum.
Response
200 OK -- application/json. An array with one object per target device.
| Field | Type | Description |
|---|---|---|
id |
string | Subtask UUID. |
taskId |
string | Parent task UUID. |
num |
integer | Subtask index within the task. |
deviceId |
string | Target edge device. |
devicePrettyName |
string | Device display name. null if the device was never resolved. |
type |
enum | DIGITAL_TWINS_MODEL_DEPLOY. |
params |
object | The parameters submitted for this device, echoed back. |
progress |
number | 0.0 to 1.0. |
status |
enum | NEW, WAITING, RUNNING, CANCELING, SUCCESS, ERROR, CANCEL. |
msg |
string | Failure detail when status is ERROR. null otherwise. |
startTime |
integer | Unix ms, 0 if not started. |
stopTime |
integer | Unix ms, 0 if not finished. |
createdBy |
string | Principal that created the task. API-token callers appear as token=<token-name>. |
done |
boolean | Terminal state reached. Poll until true. |
A successful deployment ends at status: "SUCCESS" with progress: 1.0. Note that done: true only means the subtask stopped; done: true with status: "ERROR" is a completed failure. Check status, not just done.
TLS note: LEM installations commonly use a self-signed certificate. Either install the CA in your client trust store or disable certificate verification when calling these endpoints directly.
Response
Status: 200 OK
[
{
"id": "30da9432-9d9b-48ac-b91b-9062633f59d1",
"taskId": "f67436eb-1a20-45cb-ab23-3ef8831074bd",
"num": 0,
"deviceId": "73rw480yh5ca3p8z3pfmt3g8y",
"devicePrettyName": "VM",
"type": "DIGITAL_TWINS_MODEL_DEPLOY",
"params": {
"modelIds": [
"87647a08-d8ea-46f7-a8d6-0984936f0a16"
]
},
"plannedExecTime": 0,
"progress": 1.0,
"status": "SUCCESS",
"msg": null,
"startTime": 1787942679000,
"stopTime": 1787942680000,
"context": null,
"createdOn": 1787942676000,
"updatedOn": 1787942680000,
"createdBy": "token=api-tests",
"updatedBy": "token=api-tests",
"companyName": "companyautotest-preset",
"projectId": "eknmwmp700amjhime0fudn60w",
"done": true
}
]
Get Deployed DigitalTwin Models
GET {{LEM_URL}}/api/v1/dt2/deployed-models?companyName={{company_name}}
Get Deployed DigitalTwin Models
Returns the Digital Twin models currently deployed to edge devices. Use this to confirm a deployment landed, or to audit which models are live on which devices.
Endpoint
GET {{LEM_URL}}/api/v1/dt2/deployed-models?companyName={{company_name}}
Query parameters
All are optional and combine as filters. With none supplied, the response covers everything the token can see.
| Parameter | Type | Description |
|---|---|---|
companyName |
string | Restrict to one company. |
deviceId |
string | Restrict to one edge device. |
modelId |
string | Restrict to one Digital Twin model UUID. |
isOnline |
boolean | Filter by whether the hosting device is currently online. |
isModifiable |
boolean | Filter by whether the deployed copy can be edited on the edge. |
Response
200 OK -- application/json. An array of deployed-model records.
| Field | Type | Description |
|---|---|---|
id |
string | Model UUID. Matches the ID from Get DigitalTwin Models. |
name |
string | Model name. |
companyName |
string | Owning company. |
deviceId |
string | Edge device hosting the model. |
devicePrettyName |
string | Device display name. |
version |
integer | Model version deployed. |
origin |
string | Where the deployed copy came from, e.g. external for a model pushed from LEM. |
modifiable |
boolean | Whether the copy can be edited on the edge. |
projectId |
string | Project that owns the device. |
projectName |
string | Project display name. |
online |
boolean | Whether the hosting device is currently online. |
createdOn |
integer | Unix ms of first deployment. |
updatedOn |
integer | Unix ms of last update. null if never updated since deployment. |
An empty array means nothing is deployed for the given filters.
TLS note: LEM installations commonly use a self-signed certificate. Either install the CA in your client trust store or disable certificate verification when calling these endpoints directly.
Response
Status: 200 OK
[
{
"id": "87647a08-d8ea-46f7-a8d6-0984936f0a16",
"name": "apidocs-dt-deploy",
"companyName": "companyautotest-preset",
"deviceId": "73rw480yh5ca3p8z3pfmt3g8y",
"version": 0,
"origin": "external",
"modifiable": true,
"createdOn": 1787942680000,
"updatedOn": null,
"projectId": "eknmwmp700amjhime0fudn60w",
"projectName": "AutoTestProject",
"devicePrettyName": "VM",
"online": true
}
]
Get DigitalTwin Models
GET {{LEM_URL}}/api/v1/dt2/models/{{company_name}}
Get DigitalTwin Models
Lists every digital twin model defined for one company.
Endpoint
GET {{LEM_URL}}/api/v1/dt2/models/{{company_name}}
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) |
Path parameters
| Location | Name | Required | Description |
|---|---|---|---|
| Path | {{company_name}} |
Yes | Company slug. |
Response
200 OK -- application/json. Array of model objects.
| Field | Type | Description |
|---|---|---|
ID |
string | Model UUID. Use as {{LEM_DT_Model_ID}} in subsequent calls. |
Name |
string | Display name. |
CompanyName |
string | Owning company (echo of path parameter). |
Description |
string | Free-form description. |
Assets |
string | Asset category (free-form grouping; default ASSET). |
hasImage |
boolean | Whether an image is attached. |
ImagePreviewUrl |
string | URL to a thumbnail of the model's image, or null. |
ImageUrl |
string | URL to the full-size image, or null. |
RootNodeID |
string | UUID of the model's root hierarchy node. |
Version |
integer | Schema version (increments on save). |
[
{
"hasImage": false,
"ID": "6e2976a8-1bd8-44c7-959d-27f18c006881",
"Name": "api-test",
"CompanyName": "solutions",
"Description": "Test DT model",
"Assets": "ASSET",
"ImagePreviewUrl": null,
"ImageUrl": null,
"RootNodeID": "5c48fd61-2237-42bc-b262-daf8cf79bfe0",
"Version": 0
}
]
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
[
{
"hasImage": false,
"ID": "6e2976a8-1bd8-44c7-959d-27f18c006881",
"Name": "api-test",
"CompanyName": "solutions",
"Description": "Test DT model",
"Assets": "ASSET",
"ImagePreviewUrl": null,
"ImageUrl": null,
"RootNodeID": "5c48fd61-2237-42bc-b262-daf8cf79bfe0",
"Version": 0
}
]
Create DigitalTwin Model
POST {{LEM_URL}}/api/v1/dt2/model/{{company_name}}
Create DigitalTwin Model
Creates a new digital twin model inside one company. The new model starts empty -- populate attributes and hierarchy via Digital Twin Model Details > Save Changes to DigitalTwin Model.
Endpoint
POST {{LEM_URL}}/api/v1/dt2/model/{{company_name}}
Content-Type: application/json
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) |
Path parameters
| Location | Name | Required | Description |
|---|---|---|---|
| Path | {{company_name}} |
Yes | Owning company slug. |
Request body
{
"ID": null,
"Name": "api-test",
"Description": "Test DT model",
"Assets": "ASSET"
}
| Field | Type | Required | Description |
|---|---|---|---|
ID |
string? | No | Pass null to let the server generate a UUID. Provide a UUID to use a specific one. |
Name |
string | Yes | Display name. Must be unique within the company. |
Description |
string | No | Free-form description. |
Assets |
string | No | Asset category (default ASSET). |
Response
200 OK -- application/json. Returns the newly created model with its server-assigned ID and RootNodeID.
{
"hasImage": false,
"ID": "6e2976a8-1bd8-44c7-959d-27f18c006881",
"Name": "api-test",
"CompanyName": "solutions",
"Description": "Test DT model",
"Assets": "ASSET",
"ImagePreviewUrl": null,
"ImageUrl": null,
"RootNodeID": "5c48fd61-2237-42bc-b262-daf8cf79bfe0",
"Version": 0
}
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.
Request Body
{
"Assets": "ASSET",
"Description": "Test DT model",
"ID": null,
"Name": "api-test"
}
Response
Status: 200 OK
{
"hasImage": false,
"ID": "6e2976a8-1bd8-44c7-959d-27f18c006881",
"Name": "api-test",
"CompanyName": "solutions",
"Description": "Test DT model",
"Assets": "ASSET",
"ImagePreviewUrl": null,
"ImageUrl": null,
"RootNodeID": "5c48fd61-2237-42bc-b262-daf8cf79bfe0",
"Version": 0
}
Get DigitalTwin Instances
GET {{LEM_URL}}/api/v1/dt2/instance?companyName={{company_name}}
Get DigitalTwin Instances
Lists the digital twin instances of a company across all its projects, with the model, device and project each one is bound to.
Endpoint
GET {{LEM_URL}}/api/v1/dt2/instance?companyName={{company_name}}
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
| Parameter | Type | Required | Description |
|---|---|---|---|
companyName |
string | Yes | Company slug. An unknown company returns []. |
modelId |
string | No | Only instances of this model. |
isOnline |
boolean | No | Only instances whose device is (or is not) online. |
isModifiable |
boolean | No | Filter on the model's modifiable flag. |
Response
200 OK. Array of instances: ID, Name, ModelID / ModelName / ModelVersion, Version, Interval (seconds), Topic (output topic), DeviceID / DevicePrettyName / Online, ProjectID / ProjectName, State (running), modifiable.
Errors
| HTTP status | When it happens |
|---|---|
401 Unauthorized |
Missing or invalid X-AuthToken. |
400 Bad Request |
companyName missing. |
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
[]
Clone DigitalTwin Model
POST {{LEM_URL}}/api/v1/dt2/model/clone/{{LEM_DT_Model_ID}}
Clone DigitalTwin Model
Copies a model (attributes, hierarchy, transformations) under a new name in the same company. The copy gets new IDs; instances are not copied.
Endpoint
POST {{LEM_URL}}/api/v1/dt2/model/clone/{{LEM_DT_Model_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) |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
LEM_DT_Model_ID |
string | Yes | ID of the model to copy. |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
Name |
string | Yes | Name of the copy. |
Description |
string | Yes | Description of the copy; may be empty. |
Response
200 OK. The new model, same shape as Create DigitalTwin Model.
Errors
| HTTP status | When it happens |
|---|---|
401 Unauthorized |
Missing or invalid X-AuthToken. |
409 Conflict |
Model with ID <id> not found. |
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.
Request Body
{
"Name": "Packaging Line (copy)",
"Description": "Clone of Packaging Line"
}
Response
Status: 200 OK
{
"hasImage": false,
"ID": "30819b07-4323-475b-8d79-ce31a59c3aeb",
"Name": "Packaging Line (copy)",
"CompanyName": "archie",
"Description": "Clone of Packaging Line",
"Assets": "ASSET",
"ImagePreviewUrl": null,
"ImageUrl": null,
"RootNodeID": "9ca391f5-c022-475f-b75b-17bcde4e9185",
"Version": 1
}
Export DigitalTwin Models
POST {{LEM_URL}}/api/v1/dt2/export
Export DigitalTwin Models
Exports one or more models as JSON: attributes, parameters, hierarchy nodes and transformation backup. Save the response body to a file to move the models to another company or LEM with Import DigitalTwin Models.
Endpoint
POST {{LEM_URL}}/api/v1/dt2/export
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) |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
modelIds |
string[] | Yes | Models to export. |
Response
200 OK. Array, one object per model, with the model's own id.
Errors
| HTTP status | When it happens |
|---|---|
401 Unauthorized |
Missing or invalid X-AuthToken. |
409 Conflict |
Model with ID <id> not found. |
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.
Request Body
{
"modelIds": [
"{{LEM_DT_Model_ID}}"
]
}
Response
Status: 200 OK
[
{
"source": null,
"parameters": [],
"id": "706c0feb-a048-488b-a157-e2425f5aa5a1",
"assets": "ASSET",
"name": "Packaging Line",
"version": 0,
"description": "Packaging line",
"image": null,
"dynamicAttributes": [],
"staticAttributes": [],
"hierarchyNodes": [],
"transformationBackup": []
}
]
Import DigitalTwin Models
POST {{LEM_URL}}/api/v1/dt2/import/{{company_name}}
Import DigitalTwin Models
Imports models from a file produced by Export DigitalTwin Models into a company. Models keep the IDs in the file, so importing into the company they came from conflicts unless force=true.
Endpoint
POST {{LEM_URL}}/api/v1/dt2/import/{{company_name}}
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) |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
company_name |
string | Yes | Target company slug. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
force |
boolean | No | Overwrite models whose ID already exists. Default false. |
Request body
multipart/form-data with one file part: the export JSON.
Response
200 OK with {"code": "S"}.
Errors
| HTTP status | When it happens |
|---|---|
401 Unauthorized |
Missing or invalid X-AuthToken. |
400 Bad Request |
Models already exist; messageDetails lists name (id) for each clash. Retry with force=true to overwrite. |
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.
Request Body
Response
Status: 200 OK
{
"code": "S",
"message": null,
"messageDetails": null
}
Delete DigitalTwin Model
DELETE {{LEM_URL}}/api/v1/dt2/model/{{LEM_DT_Model_ID}}
Delete DigitalTwin Model
Deletes a model.
Endpoint
DELETE {{LEM_URL}}/api/v1/dt2/model/{{LEM_DT_Model_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) |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
LEM_DT_Model_ID |
string | Yes | Model ID. |
Response
204 No Content, empty body.
Errors
| HTTP status | When it happens |
|---|---|
401 Unauthorized |
Missing or invalid X-AuthToken. |
409 Conflict |
Model with ID <id> not found (not 404). |
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: 204 No Content