Skip to content

List all debug files

GET
/api/system/debug/list

List all debug files with comprehensive metadata.

Provides detailed information about all debug files in the logs directory, including names, sizes, dates, age analysis, and type categorization. Useful for reviewing debug file inventory before cleanup operations.

Returns:

  • files: List of file objects with detailed metadata
  • total_count: Total number of debug files found

File Object Fields:

  • name: Filename (string)
  • size_mb: File size in megabytes (float, rounded to 2 decimals)
  • date: ISO timestamp from filename or null if unparseable (string|null)
  • age_days: Age in days from current date or null (integer|null)
  • type: File category (“crashdata” or “dumplog”)

Sorting:

  • Files are sorted by date (newest first)
  • Files without parseable dates appear at the end
  • Consistent ordering for easy review

Type Categorization:

  • crashdata: Files starting with “crashdata-” prefix
  • dumplog: Files starting with “dumplog-” prefix or other dump types

Date Parsing:

  • Extracts timestamps from standard filename formats
  • Handles formats like: crashdata-2024-12-18T10-30-00-000Z.json
  • Falls back to null if timestamp cannot be parsed
  • Age is calculated from parsed date to current time

Use Cases:

  • Review debug file inventory before cleanup
  • Identify oldest files for manual review
  • Check disk space usage by individual files
  • Audit debug file accumulation over time
  • Plan retention policies based on file ages

Raises:

  • HTTPException (500): If file listing operation fails

Example Response:

{
    "files": [
        {
            "name": "crashdata-2024-12-18T15-45-00-123Z.json",
            "size_mb": 3.21,
            "date": "2024-12-18T15:45:00.123000Z",
            "age_days": 0,
            "type": "crashdata"
        },
        {
            "name": "dumplog-2024-12-15T10-30-00-000Z.txt",
            "size_mb": 1.85,
            "date": "2024-12-15T10:30:00Z",
            "age_days": 3,
            "type": "dumplog"
        }
    ],
    "total_count": 2
}

Successful Response

DebugFilesListResponse

Response model for debug files listing endpoint.

Provides complete inventory of all debug files with detailed metadata and aggregate counts. Used by list endpoint to return comprehensive file information for review and cleanup planning.

Fields: files: List of DebugFileInfo objects with detailed metadata total_count: Total number of debug files found

Example: json { "files": [ { "name": "crashdata-2024-12-18T15-45-00-123Z.json", "sizeMb": 3.21, "date": "2024-12-18T15:45:00.123000Z", "ageDays": 0, "type": "crashdata" } ], "totalCount": 1 }

object
files
required
Files
Array<object>
DebugFileInfo

Information model for individual debug file metadata.

Provides detailed metadata for a single debug file including size, age, type categorization, and parsed timestamp. Used in debug file listings to provide comprehensive file inventory with analysis data.

Fields: name: Filename (e.g., “crashdata-2024-12-18T10-30-00-000Z.json”) size_mb: File size in megabytes rounded to 2 decimals date: ISO timestamp from filename (null if unparseable) age_days: Age in days from current date (null if date unavailable) type: File category (“crashdata” or “dumplog”)

Example: json { "name": "crashdata-2024-12-18T15-45-00-123Z.json", "sizeMb": 3.21, "date": "2024-12-18T15:45:00.123000Z", "ageDays": 0, "type": "crashdata" }

object
name
required
Name
string
sizeMb
required
Sizemb
number
date
required
Any of:
string
ageDays
required
Any of:
integer
type
required
Type
string
totalCount
required
Totalcount
integer