---
title: "Get log schema"
method: GET
path: "/v1/logs/{log-name}"
tags: ["Logs"]
---

# Get log schema

`GET /v1/logs/{log-name}`

Retrieve log definition including the list of columns with their data types.
Columns marked with `detail` are not included in query results and are only
returned when reading a single record. Zone columns are omitted when zoning
is disabled.

## Response `200`

Log definition retrieved successfully

- LogDetails
  - `name` string — Log name to be used in log API requests
  - `description` string, nullable — Human readable description of log content
  - `recordIdColumn` string, nullable — Name of the column holding the record ID used by the single record endpoint
  - `objectIdColumn` string, nullable — Name of the column referencing the related NetXMS object, if any
  - `columns` LogColumn[]
    - `name` string — Column name as used in filters, ordering, and record objects
    - `description` string, nullable — Human readable column name
    - `type` 'text' | 'severity' | 'objectId' | 'userId' | 'eventCode' | 'timestamp' | 'integer' | 'alarmState' | 'alarmHelpdeskState' | 'zoneUIN' | 'eventOrigin' | 'textDetails' | 'jsonDetails' | 'completionStatus' | 'actionCode' | 'atmTransactionCode' | 'assetOperation' | 'deploymentStatus' | 'aiTaskStatus' | 'macAddress' | 'connectionEvent' | 'aiOperatorExecutionStatus' | 'observationState' | 'unknown' — Column data type. Values `timestamp` are returned as ISO 8601 strings, `text`, `textDetails`, and `macAddress` as strings, `jsonDetails` as a JSON document, and all other types as integers. Coded types (`severity`, `objectId`, `userId`, `eventCode`, `alarmState`, `alarmHelpdeskState`, `zoneUIN`, `eventOrigin`, `completionStatus`, `actionCode`, `atmTransactionCode`, `assetOperation`, `deploymentStatus`, `aiTaskStatus`, `connectionEvent`, `aiOperatorExecutionStatus`, `observationState`) carry NetXMS internal codes.
    - `recordId` boolean — Set to true if this column is a sequential record ID
    - `detail` boolean — Set to true if this column is only returned when reading a single record

## Other responses

- `403` — Access denied (log has an access right requirement not held by the user)
- `404` — Unknown log name

---

[API](https://skmtc.net/netxms/apis/netxms-api.md) · [All operations](https://skmtc.net/netxms/apis/netxms-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netxms/netxms-api/versions/14d93e5115dd/schema)
