Litmus Edge Manager 3.0.x - Companies

List Company with Basic Statistics

GET {{LEM_URL}}/api/v1/company/list/stats

List Company with Basic Statistics

Returns a flat summary of every company in the LEM installation with top-level counters. Used by the LEM home dashboard.

Endpoint

GET {{LEM_URL}}/api/v1/company/list/stats

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

None.

Response

200 OK -- application/json. Array of company-stat objects.

Field Type Description
companyName string Lowercase slug used in path parameters ({{company_name}}).
companyRealName string Display name shown in the LEM UI.
totalNumOfProjects integer Number of projects in the company.
totalNumOfDevices integer Number of edge devices registered to projects in this company.
totalNumOfModels integer Number of digital twin models defined.
[
  {
    "companyName": "production",
    "companyRealName": "Production",
    "totalNumOfProjects": 2,
    "totalNumOfDevices": 2,
    "totalNumOfModels": 1
  }
]

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

[
    {
        "companyName": "production",
        "companyRealName": "Production",
        "totalNumOfProjects": 2,
        "totalNumOfDevices": 2,
        "totalNumOfModels": 1
    },
    {
        "companyName": "solutions",
        "companyRealName": "Solutions",
        "totalNumOfProjects": 1,
        "totalNumOfDevices": 1,
        "totalNumOfModels": 0
    },
    {
        "companyName": "hardware",
        "companyRealName": "Hardware",
        "totalNumOfProjects": 2,
        "totalNumOfDevices": 5,
        "totalNumOfModels": 0
    },
    {
        "companyName": "trace-test",
        "companyRealName": "trace-test",
        "totalNumOfProjects": 1,
        "totalNumOfDevices": 0,
        "totalNumOfModels": 0
    },
    {
        "companyName": "ccsj",
        "companyRealName": "CCSJ",
        "totalNumOfProjects": 1,
        "totalNumOfDevices": 0,
        "totalNumOfModels": 0
    }
]

Company List with Details

GET {{LEM_URL}}/api/v1/company/list

Company List with Details

Returns every company with the full record: name, description, teams (with users), quotas, license, deletion flag, and company type (USER / RESELLER / etc.). Useful for company-admin UIs that need to render the org chart.

Endpoint

GET {{LEM_URL}}/api/v1/company/list

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. Array of company objects.

Field Type Description
name string Lowercase slug ({{company_name}}).
realName string Display name.
description string Free-form description.
teams object[] Teams with their users[] lists. Each user has username and attrs.
quotas object Resource quotas (null when unset).
license object License binding (null when unset).
deleted boolean true if the company has been soft-deleted.
companyType string USER, RESELLER, INTERNAL, ...
[
  {
    "name": "production",
    "realName": "Production",
    "description": "",
    "teams": [
      {
        "name": "OWNER",
        "users": [ { "username": "demo", "attrs": {} } ]
      }
    ],
    "quotas": null,
    "license": null,
    "deleted": false,
    "companyType": "USER"
  }
]

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

[
    {
        "name": "production",
        "realName": "Production",
        "description": "",
        "teams": [
            {
                "name": "OWNER",
                "users": [
                    {
                        "username": "demo",
                        "attrs": {}
                    }
                ]
            }
        ],
        "quotas": null,
        "license": null,
        "deleted": false,
        "companyType": "USER"
    },
    {
        "name": "solutions",
        "realName": "Solutions",
        "description": "",
        "teams": [
            {
                "name": "OWNER",
                "users": [
                    {
                        "username": "demo",
                        "attrs": {}
                    },
                    {
                        "username": "parthshah",
                        "attrs": {}
                    },
                    {
                        "username": "stefanzippel",
                        "attrs": {}
                    },
                    {
                        "username": "amen",
                        "attrs": {}
                    }
                ]
            }
        ],
        "quotas": null,
        "license": null,
        "deleted": false,
        "companyType": "USER"
    },
    {
        "name": "hardware",
        "realName": "Hardware",
        "description": "",
        "teams": [
            {
                "name": "OWNER",
                "users": [
                    {
                        "username": "demo",
                        "attrs": {}
                    },
                    {
                        "username": "tracesakima",
                        "attrs": {}
                    },
                    {
                        "username": "chingchi",
                        "attrs": {}
                    }
                ]
            }
        ],
        "quotas": null,
        "license": null,
        "deleted": false,
        "companyType": "USER"
    },
    {
        "name": "trace-test",
        "realName": "trace-test",
        "description": "",
        "teams": [
            {
                "name": "OWNER",
                "users": [
                    {
                        "username": "tracesakima",
                        "attrs": {}
                    }
                ]
            }
        ],
        "quotas": null,
        "license": null,
        "deleted": false,
        "companyType": "USER"
    },
    {
        "name": "ccsj",
        "realName": "CCSJ",
        "description": "",
        "teams": [
            {
                "name": "OWNER",
                "users": [
                    {
                        "username": "chingchi",
                        "attrs": {}
                    }
                ]
            }
        ],
        "quotas": null,
        "license": null,
        "deleted": false,
        "companyType": "USER"
    }
]

Return Company Details

GET {{LEM_URL}}/api/v1/company?name={{company_name}}

Return Company Details

Returns one company by name query parameter. Same shape as one element of Company List with Details, but with richer team-user records (each user includes attrs like status: "ONBOARD").

Endpoint

GET {{LEM_URL}}/api/v1/company?name={{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
name string Yes Lowercase company slug (from List Company with Basic Statistics).

Response

200 OK -- application/json. Single company object.

{
  "name": "solutions",
  "realName": "Solutions",
  "description": "",
  "teams": [
    {
      "name": "OWNER",
      "users": [
        { "username": "demo",         "attrs": { "status": "ONBOARD" } },
        { "username": "parthshah",    "attrs": { "status": "ONBOARD" } },
        { "username": "stefanzippel", "attrs": { "status": "ONBOARD" } }
      ]
    }
  ]
}

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

{
    "name": "solutions",
    "realName": "Solutions",
    "description": "",
    "teams": [
        {
            "name": "OWNER",
            "users": [
                {
                    "username": "demo",
                    "attrs": {
                        "status": "ONBOARD"
                    }
                },
                {
                    "username": "parthshah",
                    "attrs": {
                        "status": "ONBOARD"
                    }
                },
                {
                    "username": "stefanzippel",
                    "attrs": {
                        "status": "ONBOARD"
                    }
                },
                {
                    "username": "amen",
                    "attrs": {
                        "status": "ONBOARD"
                    }
                }
            ]
        }
    ],
    "quotas": null,
    "license": null,
    "deleted": false,
    "companyType": "USER"
}

Validate Company Name

GET {{LEM_URL}}/api/v1/company/name-validation?name={{company_name}}

Validate Company Name

Checks whether a company name can be used before calling Create or Update Company. The result is in the body, not the status code: the call answers 200 for valid and invalid names alike.

Endpoint

GET {{LEM_URL}}/api/v1/company/name-validation?name={{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
name string Yes Candidate company name (slug).

Response

200 OK. Body is an ApiResponse: code (S success, W warning, E error), message, messageDetails.

code message
S null: name is free and valid.
E Company name '<name>' conflicts with another company name
E Company name '<name>' doesn't match naming rules

Errors

HTTP status When it happens
401 Missing or invalid X-AuthToken.

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": "S",
    "message": null,
    "messageDetails": null
}

Create or Update Company

POST {{LEM_URL}}/api/v1/company

Create or Update Company

Creates a company, or updates the name, description and type of an existing one. Quotas and license are not set here. The caller is added to the new company's OWNER team.

Endpoint

POST {{LEM_URL}}/api/v1/company

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

Parameter Type Required Description
name string Yes Company slug, used as {{company_name}} everywhere else. Check it with Validate Company Name.
realName string Yes Display name.
description string Yes Free text; may be empty.
newCompany boolean No true to create. false (or omitted) updates the company named name.
companyType string No Company type; the device sets USER when omitted.

Response

201 Created for both create and update. The company object: name, realName, description, teams (each with name and users), quotas, license, deleted, companyType.

On 2.31 an update also added the instance admin user to OWNER.

Errors

HTTP status When it happens
401 Missing or invalid X-AuthToken.
500 Company with name '<name>' already exists (create with newCompany: true on a taken name).

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": "{{company_name}}",
    "realName": "Acme Manufacturing",
    "description": "Acme plants",
    "newCompany": true
}

Response

Status: 201 Created

{
    "name": "apidocs-company",
    "realName": "Acme Manufacturing",
    "description": "Acme plants",
    "teams": [
        {
            "name": "OWNER",
            "users": [
                {
                    "username": "token=my-api-token",
                    "attrs": {},
                    "classVersion": 1,
                    "factoryId": 1,
                    "classId": 4
                }
            ],
            "classVersion": 1,
            "factoryId": 1,
            "classId": 3
        }
    ],
    "quotas": null,
    "license": null,
    "deleted": false,
    "companyType": null,
    "classVersion": 1,
    "factoryId": 1,
    "classId": 2
}

Delete Company

DELETE {{LEM_URL}}/api/v1/company?name={{company_name}}

Delete Company

Deletes a company. It must have no projects: delete them first with Delete Project.

Endpoint

DELETE {{LEM_URL}}/api/v1/company?name={{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
name string Yes Company slug.

Response

204 No Content, empty body. The OpenAPI spec says 200 with an ApiResponse.

Errors

HTTP status When it happens
401 Missing or invalid X-AuthToken.
409 messageDetails: Could not delete company with projects.
409 messageDetails: Could not find company with name '<name>'.

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


Get Password Policy

GET {{LEM_URL}}/api/v1/password-policy

Get Password Policy

Returns the configured password policies. Each LEM installation has at least one default policy (defaultPolicy: true). Custom policies can be associated with specific edge devices via Edge Lifecycle Management > Edge Devices > Device Details > Policy.

Endpoint

GET {{LEM_URL}}/api/v1/password-policy

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. Array of policy objects.

Field Type Description
id string Policy ID. The default uses default_password_policy; custom policies use UUIDs.
name string Display name.
description string Free-form description.
updated integer Last-modified timestamp (Unix epoch milliseconds).
defaultPolicy boolean true for the default policy.
minPasswordLen / maxPasswordLen integer Hard length bounds.
autoGeneratedPasswordLen integer Length of LEM-generated passwords (e.g. when creating users).
minUppercaseChars / minLowercaseChars / minDigits / minSpecialChars integer Composition requirements.
specialChars string Set of characters classified as "special".
[
  {
    "id": "default_password_policy",
    "name": "Default password policy",
    "description": "Default password policy",
    "updated": 1689673006000,
    "defaultPolicy": true,
    "minPasswordLen": 8,
    "maxPasswordLen": 256,
    "autoGeneratedPasswordLen": 12,
    "minUppercaseChars": 1,
    "minLowercaseChars": 1,
    "minDigits": 1,
    "minSpecialChars": 1,
    "specialChars": "~!@#$%^&*()_-{}[]|;:,.<>?/"
  }
]

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": "default_password_policy",
        "name": "Default password policy",
        "description": "Default password policy",
        "updated": 1689673006000,
        "defaultPolicy": true,
        "minPasswordLen": 8,
        "maxPasswordLen": 256,
        "autoGeneratedPasswordLen": 12,
        "minUppercaseChars": 1,
        "minLowercaseChars": 1,
        "minDigits": 1,
        "minSpecialChars": 1,
        "specialChars": "~!@#$%^&*()_-{}[]|;:,.<>?/"
    }
]

Projects Within Company

GET {{LEM_URL}}/api/v1/project?companyName={{company_name}}

Projects Within Company

Returns every project inside one company with their full configuration: description, teams, properties, data TTL, allocated slots, MQTT topics, triggers, action templates.

A project is the operational scope inside a company. Devices, alerts, integrations, and member assignments all live inside a project (Edge Lifecycle Management > Settings > Members).

Endpoint

GET {{LEM_URL}}/api/v1/project?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.

Response

200 OK -- application/json. Array of project objects.

Field Type Description
id string Project ID. Used in subsequent Edge Lifecycle Management > * endpoints.
companyName string Parent company slug.
name / description string Display name and description.
teams object Map of roleName -> team membership for project-scoped permissions.
properties object Project-level toggles (STORE_OMA_DATA, STORE_RAW_DATA, KEEP_DELETED_INTERVAL, DATAENRICHER_INTEGRATION, ...).
dataTtl integer Days to retain device data.
topics string[] MQTT topics the project participates in.
numberOfAllocatedSlots integer Slot allocation from the company's license.
keys object[] Project-scoped API keys (managed via Settings > Credentials - MQTT).
triggers object Map of triggerID -> trigger config for project alert triggers.
actionTemplates object Map of templateID -> action template for alert notifications.
deleted boolean Soft-delete flag.
[
  {
    "id": "cfpc2znv3va0fca5d49hlf2ge",
    "companyName": "solutions",
    "name": "project1",
    "description": "",
    "properties": {
      "KEEP_DELETED_INTERVAL": "24",
      "STORE_OMA_DATA": "false",
      "DATAENRICHER_INTEGRATION": "off",
      "STORE_RAW_DATA": "false"
    },
    "dataTtl": 30,
    "topics": [],
    "numberOfAllocatedSlots": 0,
    "keys": [],
    "deleted": false,
    "actionTemplates": {},
    "triggers": {}
  }
]

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": "cfpc2znv3va0fca5d49hlf2ge",
        "companyName": "solutions",
        "name": "project1",
        "description": "",
        "teams": {},
        "properties": {
            "KEEP_DELETED_INTERVAL": "24",
            "STORE_OMA_DATA": "false",
            "DATAENRICHER_INTEGRATION": "off",
            "STORE_RAW_DATA": "false"
        },
        "dataTtl": 30,
        "topics": [],
        "numberOfAllocatedSlots": 0,
        "keys": [],
        "deleted": false,
        "actionTemplates": {},
        "triggers": {
            "de586p1vfrm361yk36gsts3q1": {
                "id": "de586p1vfrm361yk36gsts3q1",
                "name": "Monitor alert failures",
                "description": null,
                "simpleRules": null,
                "eventRules": null,
                "rawDataRules": null,
                "metricRules": null,
                "advancedRules": null,
                "deduplicate": true,
                "severity": 2,
                "subject": "Monitor alert failures",
                "message": "Monitor alert failures",
                "messageResolved": null,
                "tags": null,
                "deviceId": null,
                "actions": null,
                "active": true,
                "showOnDashboard": true,
                "scopeType": "SYSTEM",
                "sourceType": "DATA",
                "updatedOn": 1699642005025,
                "notifyContinuously": false,
                "notifyGracePeriod": 0,
                "alertDelay": 0
            }
        },
        "billingPlanCode": null,
        "createdAt": null,
        "grafanaOrgId": 14,
        "subnetId": 1,
        "latestBackupsToKeep": 3,
        "pubSubKeyRotationIntervalSec": 0,
        "pubSubKeyRotationDaysOfWeek": [],
        "pubSubKeyRotationTime": null,
        "pubSubKeyRotationWindowSec": 0
    },
    {
        "id": "462j1mq70mph31wa100t1yuxa",
        "companyName": "solutions",
        "name": "project2",
        "description": "",
        "teams": {},
        "properties": {
            "KEEP_DELETED_INTERVAL": "24",
            "STORE_OMA_DATA": "false",
            "DATAENRICHER_INTEGRATION": "off",
            "STORE_RAW_DATA": "false"
        },
        "dataTtl": 30,
        "topics": [],
        "numberOfAllocatedSlots": 0,
        "keys": [],
        "deleted": false,
        "actionTemplates": {
            "bp0pgdjum4l1ltore344h9j1p": {
                "id": "bp0pgdjum4l1ltore344h9j1p",
                "name": "apiEMail",
                "type": "EMAIL",
                "limit": {
                    "maxActionsPerInterval": 1,
                    "updateIntervalSeconds": 3600
                },
                "recipients": [
                    "parth.shah@litmus.io"
                ],
                "subject": null,
                "message": null
            }
        },
        "triggers": {
            "6u98gdlpwxuypstkb7826beb9": {
                "id": "6u98gdlpwxuypstkb7826beb9",
                "name": "Monitor alert failures",
                "description": null,
                "simpleRules": null,
                "eventRules": null,
                "rawDataRules": null,
                "metricRules": null,
                "advancedRules": null,
                "deduplicate": true,
                "severity": 2,
                "subject": "Monitor alert failures",
                "message": "Monitor alert failures",
                "messageResolved": null,
                "tags": null,
                "deviceId": null,
                "actions": null,
                "active": true,
                "showOnDashboard": true,
                "scopeType": "SYSTEM",
                "sourceType": "DATA",
                "updatedOn": 1691100533111,
                "notifyContinuously": false,
                "notifyGracePeriod": 0,
                "alertDelay": 0
            }
        },
        "billingPlanCode": null,
        "createdAt": null,
        "grafanaOrgId": 5,
        "subnetId": 1,
        "latestBackupsToKeep": 3,
        "pubSubKeyRotationIntervalSec": 0,
        "pubSubKeyRotationDaysOfWeek": [],
        "pubSubKeyRotationTime": null,
        "pubSubKeyRotationWindowSec": 0
    },
    {
        "id": "2uqgh8aiy8z827jgllw5678j3",
        "companyName": "solutions",
        "name": "project3",
        "description": "",
        "teams": {},
        "properties": {
            "KEEP_DELETED_INTERVAL": "24",
            "STORE_OMA_DATA": "false",
            "DATAENRICHER_INTEGRATION": "off",
            "STORE_RAW_DATA": "false"
        },
        "dataTtl": 30,
        "topics": [],
        "numberOfAllocatedSlots": 0,
        "keys": [],
        "deleted": false,
        "actionTemplates": {},
        "triggers": {
            "51spxt03jnmls15uqgakhloyj": {
                "id": "51spxt03jnmls15uqgakhloyj",
                "name": "Monitor alert failures",
                "description": null,
                "simpleRules": null,
                "eventRules": null,
                "rawDataRules": null,
                "metricRules": null,
                "advancedRules": null,
                "deduplicate": true,
                "severity": 2,
                "subject": "Monitor alert failures",
                "message": "Monitor alert failures",
                "messageResolved": null,
                "tags": null,
                "deviceId": null,
                "actions": null,
                "active": true,
                "showOnDashboard": true,
                "scopeType": "SYSTEM",
                "sourceType": "DATA",
                "updatedOn": 1711618164572,
                "notifyContinuously": false,
                "notifyGracePeriod": 0,
                "alertDelay": 0
            }
        },
        "billingPlanCode": null,
        "createdAt": null,
        "grafanaOrgId": 20,
        "subnetId": 1,
        "latestBackupsToKeep": 3,
        "pubSubKeyRotationIntervalSec": 0,
        "pubSubKeyRotationDaysOfWeek": [],
        "pubSubKeyRotationTime": null,
        "pubSubKeyRotationWindowSec": 0
    }
]

Create or Update Project

POST {{LEM_URL}}/api/v1/project

Create or Update Project

Creates a project inside a company, or updates an existing one. The same call does both: leave id out to create, set id to update that project.

A new project starts with the default properties (KEEP_DELETED_INTERVAL, STORE_OMA_DATA, STORE_RAW_DATA, DATAENRICHER_INTEGRATION), a system Monitor alert failures trigger, and its own Grafana organization (grafanaOrgId).

Endpoint

POST {{LEM_URL}}/api/v1/project

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
id string No Project ID. Omit (or null) to create; set to update that project.
companyName string Yes Parent company slug (see Company List with Details).
name string Yes Project name. Must be unique inside the company.
description string No Free-text description.
properties object No String map of project toggles. Omitted keys get their defaults.
dataTtl integer No Data retention, in days.
topics string[] No MQTT topics the project participates in.
grafanaOrgId integer No Grafana organization ID. Assigned automatically on create.

On update, send the full object: fields you leave out are not guaranteed to keep their values.

Response

201 Created (for both create and update) -- application/json. The full project object, same shape as one element of Projects Within Company, plus createdAt, grafanaOrgId, subnetId, backup and pub/sub key rotation settings, and edgePollingSettings. Keep id: every Edge Lifecycle Management call for this project takes it as {{project_id}}.

Errors

HTTP status When it happens
401 Unauthorized Missing or invalid X-AuthToken.
409 Conflict Project with name <name> already exists in that company.
409 Conflict companyName or name missing (the message reports a null name).

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

{
    "companyName": "{{company_name}}",
    "name": "Line 3 Packaging",
    "description": "Packaging line devices",
    "dataTtl": 30,
    "topics": [],
    "properties": {}
}

Response

Status: 201 Created

{
    "id": "zz1fvho3njo8nf3456dcg9de",
    "companyName": "archie",
    "name": "Line 3 Packaging",
    "description": "Packaging line devices",
    "teams": {},
    "properties": {
        "KEEP_DELETED_INTERVAL": "24",
        "STORE_OMA_DATA": "false",
        "DATAENRICHER_INTEGRATION": "off",
        "STORE_RAW_DATA": "false"
    },
    "dataTtl": 30,
    "topics": [],
    "numberOfAllocatedSlots": 0,
    "keys": [],
    "deleted": false,
    "actionTemplates": {},
    "triggers": {
        "e37ph5ow33yyq8vyuxjpi0qrz": {
            "id": "e37ph5ow33yyq8vyuxjpi0qrz",
            "name": "Monitor alert failures",
            "description": null,
            "simpleRules": null,
            "eventRules": null,
            "rawDataRules": null,
            "metricRules": [],
            "auditEventRules": [],
            "advancedRules": null,
            "deduplicate": true,
            "severity": 3,
            "subject": "Monitor alert failures",
            "message": "Monitor alert failures",
            "messageResolved": null,
            "tags": null,
            "deviceId": null,
            "actions": [],
            "active": true,
            "showOnDashboard": true,
            "scopeType": "SYSTEM",
            "sourceType": "DATA",
            "updatedOn": 1792096376938,
            "notifyContinuously": false,
            "notifyGracePeriod": 0,
            "alertDelay": 60,
            "scope": "EDGE_ALL"
        },
        "8efb980aozuj7drqnbqjqeqkl": {
            "id": "8efb980aozuj7drqnbqjqeqkl",
            "name": "Instance upgrade monitor",
            "description": null,
            "simpleRules": null,
            "eventRules": null,
            "rawDataRules": null,
            "metricRules": [],
            "auditEventRules": [],
            "advancedRules": null,
            "deduplicate": true,
            "severity": 3,
            "subject": "Instance upgrade monitor",
            "message": "Software upgrade has failed on the {instanceType} instance.",
            "messageResolved": "Software upgrade has completed successfully on the {instanceType} instance.",
            "tags": null,
            "deviceId": null,
            "actions": [],
            "active": true,
            "showOnDashboard": true,
            "scopeType": "SYSTEM",
            "sourceType": "DATA",
            "updatedOn": 1792096376943,
            "notifyContinuously": false,
            "notifyGracePeriod": 0,
            "alertDelay": 60,
            "scope": "EDGE_ALL"
        }
    },
    "billingPlanCode": null,
    "createdAt": 1792096377000,
    "grafanaOrgId": 12,
    "subnetId": 1,
    "latestBackupsToKeep": 3,
    "exportTemplateWithBackup": false,
    "pubSubKeyRotationIntervalSec": 0,
    "pubSubKeyRotationDaysOfWeek": [],
    "pubSubKeyRotationTime": null,
    "pubSubKeyRotationWindowSec": 0,
    "edgePollingSettings": {
        "enabled": true,
        "intervalSec": 30,
        "useInstanceSettings": false
    },
    "incidentResolutionSettings": {
        "autoResolve": true,
        "incidentRetentionEnabled": false,
        "closedIncidentTtlDays": 90,
        "activeIncidentTtlDays": 90,
        "useInstanceSettings": false
    }
}

Delete Project

DELETE {{LEM_URL}}/api/v1/project/{{project_id}}

Delete Project

Deletes a project. This is a hard delete: afterwards GET {{LEM_URL}}/api/v1/project/{{project_id}} returns 404 and the project no longer appears in Projects Within Company.

Endpoint

DELETE {{LEM_URL}}/api/v1/project/{{project_id}}

Authentication

API key in a request header (case sensitive). The value is the LEM admin API token.

URL prefix Auth header
{{LEM_URL}}/api/v1/... (main fleet API) X-AuthToken: <token>
{{LEM_adminURL}}/admin/v1/... (admin console, port 8446) X-AuthToken: <token>
{{LEM_URL}}/mpcs/... (Marketplace Catalog) Authorization: <token> (3.0.x also accepts X-AuthToken)

Path parameters

Parameter Type Required Description
project_id string Yes Project ID, from Projects Within Company.

Response

204 No Content, empty body.

Errors

HTTP status When it happens
401 Unauthorized Missing or invalid X-AuthToken.
404 Not Found No project with that ID.

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


Get paginated list of companies available for the current user

GET {{LEM_URL}}/api/v1/company/list/paged?requestedPage=0&limit=1

Get paginated list of companies available for the current user

Returns the companies visible to the calling token, paginated and filterable. Prefer this over the unpaginated company list on installations with many companies.

Endpoint

GET {{LEM_URL}}/api/v1/company/list/paged

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
filter query Free-text filter on company name.
requestedPage query Zero-based page index.
limit query Page size.

Response

Paged result { pageNum, pagesCount, size, totalSize, elements: [Company] }.

Errors

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

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

Response

Status: 200 OK

{
  "pageNum": 0,
  "pagesCount": 0,
  "size": 0,
  "totalSize": 0,
  "elements": []
}

Get paginated list of projects for the company

GET {{LEM_URL}}/api/v1/project/paged?companyName=&requestedPage=0&limit=1

Get paginated list of projects for the company

Returns the projects within a company, paginated. The company is required; the result is the paginated counterpart to the existing projects-within-company listing.

Endpoint

GET {{LEM_URL}}/api/v1/project/paged

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 query Required. The company whose projects to list.
requestedPage query Zero-based page index.
limit query Page size.

Response

Paged result { pageNum, pagesCount, size, totalSize, elements: [Project] }.

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.


Project Statistics

GET {{LEM_URL}}/api/v1/project/list/stats?companyName={{company_name}}

Project Statistics

Per-project counters for one company: devices, online devices and teams. Backs the project cards on the company page.

Endpoint

GET {{LEM_URL}}/api/v1/project/list/stats?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.

Response

200 OK. Array of projectId, projectName, totalNumOfDevices, numOfOnlineDevices, totalNumOfTeams. Unknown company: empty array.

Errors

HTTP status When it happens
401 Missing or invalid X-AuthToken.

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

Response

Status: 200 OK

[
    {
        "projectId": "7cjcwfelftihd36ywryjb9ap0",
        "projectName": "apidocs-project",
        "totalNumOfDevices": 0,
        "numOfOnlineDevices": 0,
        "totalNumOfTeams": 1
    }
]

View this page as Markdown