Logs

GET /application/logs

Get a list of the last N log entries, this will ignore the header of the file. The endpoint is limited by the log level set in NINA

Query parameters

  • lineCount integer(int32) Required

    Return the last N lines of the log file, with N being the lineCount

  • level string

    Filter the log entries by level. This uses the provided level as a minimum level, so level INFO will return INFO, WARNING and ERROR entries

    Values are TRACE, DEBUG, INFO, WARNING, or ERROR.

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • Response array[object]
      Hide Response attributes Show Response attributes object
      • Timestamp string
      • Level string
      • Source string
      • Member string
      • Line string
      • Message string
    • Error string
    • StatusCode integer
    • Success boolean
    • Type string
  • 500 application/json

    Internal server error, Unknown error

    Hide response attributes Show response attributes object
    • Response string
    • Error string
    • StatusCode integer
    • Success boolean
    • Type string
GET /application/logs
curl \
 --request GET 'http://localhost:1888/v2/api/application/logs?lineCount=42'
Response examples (200)
{
  "Response": [
    {
      "Timestamp": "2025-05-04T14:57:39.5079",
      "Level": "INFO",
      "Source": "CameraChooserVM.cs",
      "Member": "GetEquipment",
      "Line": "279",
      "Message": "Found 2 ASCOM Cameras"
    }
  ],
  "Error": "string",
  "StatusCode": 200,
  "Success": true,
  "Type": "API"
}
Response examples (500)
{
  "Response": "string",
  "Error": "Unknown error",
  "StatusCode": 500,
  "Success": false,
  "Type": "API"
}