# LitmusEdgeManager 2.31.x API Documentation/Admin Console APIs/Logs - LE, LEM, LUNS API Docs

## Get Logs (Paginated)

**GET** `{{LEM_adminURL}}/admin/v1/logs`

# Get Logs (Paginated)

Returns LEM's paginated audit log with filterable query parameters. Each entry: timestamp, level, username, context, message, access level.
## Endpoint

```http
GET {{LEM_adminURL}}/admin/v1/logs
```
## 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": 166,
    "size": 1,
    "totalSize": 166,
    "elements": [
        {
            "companyName": "",
            "projectId": null,
            "eventTime": 1767978201000,
            "level": "INFO",
            "username": "tokenname=postman;tokenhash=14d5816014a6b7e3dc21a71f51360b66",
            "context": "",
            "contextId": "",
            "contextDescription": null,
            "message": "generic messaeg",
            "accessLevel": "USER",
            "realCompanyName": null,
            "projectName": null
        }
    ]
}
```

---

## Get Log Contexts

**GET** `{{LEM_adminURL}}/admin/v1/logs/contexts`

# Get Log Contexts

Returns the catalog of `context` codes that audit log entries can carry (e.g. `activation`, `async-subtask`, `batch-dm`, `company`, `device`, `device-analytics`, ...). Use to populate a context filter dropdown.
## Endpoint

```http
GET {{LEM_adminURL}}/admin/v1/logs/contexts
```
## 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
[
    {
        "code": "activation",
        "description": "Edge device activation"
    },
    {
        "code": "async-subtask",
        "description": "Async subtask"
    },
    {
        "code": "batch-dm",
        "description": "Batch edge device management"
    },
    {
        "code": "company",
        "description": "Company"
    },
    {
        "code": "deactivation",
        "description": "Edge device deactivation"
    },
    {
        "code": "device",
        "description": "Edge device"
    },
    {
        "code": "device-analytics",
        "description": "Edge device analytics"
    },
    {
        "code": "device-certificate",
        "description": "Edge device certificate"
    },
    {
        "code": "device-license-pool",
        "description": "Edge device license pool"
    },
    {
        "code": "edge-ca-certificate-update",
        "description": "Edge device CA certificate update"
    },
    {
        "code": "files",
        "description": "Files"
    },
    {
        "code": "grafana",
        "description": "Grafana"
    },
    {
        "code": "gcp-sa-keys-rotation",
        "description": "GCP SA keys rotation"
    },
    {
        "code": "license-generation",
        "description": "Edge license generation"
    },
    {
        "code": "license-provisioning",
        "description": "Edge license provisioning"
    },
    {
        "code": "mpcs",
        "description": "MPCS"
    },
    {
        "code": "mqtt-dm-account",
        "description": "MQTT DM account"
    },
    {
        "code": "mqtt-account",
        "description": "MQTT account"
    },
    {
        "code": "project",
        "description": "Project"
    },
    {
        "code": "grant",
        "description": "Project grant permissions"
    },
    {
        "code": "revoke",
        "description": "Project revoke permissions"
    },
    {
        "code": "report-stats",
        "description": "Report stats"
    },
    {
        "code": "ssl-certificate",
        "description": "SSL certificate"
    },
    {
        "code": "team",
        "description": "Team"
    },
    {
        "code": "team-member",
        "description": "Team member"
    },
    {
        "code": "digital-twins",
        "description": "Digital Twins"
    },
    {
        "code": "audit",
        "description": "Audit"
    },
    {
        "code": "git-sync",
        "description": "Git synchronization"
    }
]
```

---

