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

## Get System Events

**GET** `{{LEM_URL}}/api/v1/logs/company/{{company_name}}?filter=&from=1736409600000&limit=10&projectId={{project_id}}&requestedPage=0&to=1736495999059`

# Get System Events

Returns LEM **system events** for the company. Distinct from device-emitted LE events (see `Get Edge Device Events`) -- these are LEM-internal audit events (cert changes, project edits, login attempts, etc.).
## Endpoint

```http
GET {{LEM_URL}}/api/v1/logs/company/{{company_name}}?filter=&from=1736409600000&limit=10&projectId={{project_id}}&requestedPage=0&to=1736495999059
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.
## 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

```json
{
    "pageNum": 0,
    "pagesCount": 1,
    "size": 3,
    "totalSize": 3,
    "elements": [
        {
            "companyName": "solutions",
            "projectId": "462j1mq70mph31wa100t1yuxa",
            "eventTime": 1736453122000,
            "level": "INFO",
            "username": "system",
            "context": "device-certificate",
            "contextId": "",
            "contextDescription": null,
            "message": "Device SSL certificate changed: deviceId=vkrih85ka6fn7zcofirk20vs; certificate=Certificate(id=null, isValid=false, isWeak=false, issuer=litmus-edge-005056b965c2, notAfter=2032-01-09T20:04:00Z, notBefore=2025-01-08T20:04:00Z, signatureAlgorithm=null, subject=litmus-edge-005056b965c2)",
            "accessLevel": "USER"
        },
        {
            "companyName": "solutions",
            "projectId": "462j1mq70mph31wa100t1yuxa",
            "eventTime": 1736452100000,
            "level": "INFO",
            "username": "system",
            "context": "device-certificate",
            "contextId": "",
            "contextDescription": null,
            "message": "Device SSL certificate changed: deviceId=vkrih85ka6fn7zcofirk20vs; certificate=Certificate(id=null, isValid=false, isWeak=false, issuer=litmus-edge-005056b965c2, notAfter=2032-01-09T19:46:00Z, notBefore=2025-01-08T19:46:00Z, signatureAlgorithm=null, subject=litmus-edge-005056b965c2)",
            "accessLevel": "USER"
        },
        {
            "companyName": "solutions",
            "projectId": "462j1mq70mph31wa100t1yuxa",
            "eventTime": 1736451039000,
            "level": "INFO",
            "username": "system",
            "context": "device-certificate",
            "contextId": "",
            "contextDescription": null,
            "message": "Device SSL certificate changed: deviceId=vkrih85ka6fn7zcofirk20vs; certificate=Certificate(id=null, isValid=false, isWeak=false, issuer=litmus-edge-005056b965c2, notAfter=2032-01-09T19:19:00Z, notBefore=2025-01-08T19:19:00Z, signatureAlgorithm=null, subject=litmus-edge-005056b965c2)",
            "accessLevel": "USER"
        }
    ]
}
```

---

## Get Edge Device Events

**GET** `{{LEM_URL}}/api/v1/loopedge-events/list/{{project_id}}?limit=10&requestedPage=0`

# Get Edge Device Events

Returns LE events emitted by edge devices in the project. Same shape as `Edge Devices > Device Details > Events > Get Events`.
## Endpoint

```http
GET {{LEM_URL}}/api/v1/loopedge-events/list/{{project_id}}?limit=10&requestedPage=0
```
## Authentication

HTTP Basic Auth. **Username** is your API token, **password** is empty. Tokens are managed under `System > Access Control > Tokens`.
## 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

```json
[
    {
        "timeStamp": "2019-08-24T14:15:22Z",
        "deviceId": "string",
        "component": "string",
        "severity": "string",
        "eventId": "string",
        "msg": "string",
        "attrs": "string"
    }
]
```

---

