Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/KilzaNiko/WimExplorer/llms.txt

Use this file to discover all available pages before exploring further.

POST /api/open

Opens a WIM, ESD, or SWM file and loads its image metadata into the server’s currentWim state. Subsequent browse and file-operation requests operate on this file. The server tries to parse metadata from the file’s embedded XML first. If XML parsing fails, it falls back to plain-text parsing of wimlib-imagex info output.
Calling POST /api/open replaces any previously open WIM. The cached file tree and conflict-detection index are cleared until you call GET /api/browse again.

Request

wimPath
string
required
Absolute path to the WIM, ESD, or SWM file on the local filesystem.Example: C:\\sources\\install.wim

Response

path
string
Absolute path of the opened file, echoed back from the request.
wimInfo
object
Top-level metadata about the WIM archive.
images
object[]
One object per image in the file.

Errors

StatusCondition
400wimPath was not provided in the request body
404The file at wimPath does not exist on disk
500wimlib-imagex failed to read the file

Example

curl -X POST http://localhost:3000/api/open \
  -H "Content-Type: application/json" \
  -d '{"wimPath": "C:\\sources\\install.wim"}'
{
  "path": "C:\\sources\\install.wim",
  "wimInfo": {
    "imageCount": 5,
    "compression": null
  },
  "images": [
    {
      "index": 1,
      "name": "Windows 11 Home",
      "description": "",
      "dirCount": 24831,
      "fileCount": 108442
    },
    {
      "index": 2,
      "name": "Windows 11 Pro",
      "description": "",
      "dirCount": 24843,
      "fileCount": 108501
    }
  ]
}

GET /api/browse

Returns a complete recursive file tree for a specific image in the currently open WIM. Also rebuilds the internal conflict-detection path index (wimPathsLower) used by POST /api/check-conflicts. The server uses 7-Zip (7z l -slt) to list files when it is available. If 7-Zip is not installed or fails, it falls back to wimlib-imagex dir.
Browsing large images (e.g., a full Windows install.wim image) can take several seconds. Monitor progress in real time via GET /api/logs/stream.

Query parameters

image
number
default:"currentWim.imageIndex"
1-based index of the image to browse. Defaults to the index of the last selected image. Setting this parameter also updates currentWim.imageIndex for subsequent operations.

Response

The response is a single tree node representing the root directory \\. Every directory node contains a children array with its contents.
name
string
Entry name. Always "\\" for the root.
path
string
Full WIM-relative path using backslash separators. Always "\\" for the root.
type
string
Either "directory" or "file".
size
number
File size in bytes. 0 for directories.
modified
string
Last-modified timestamp as an ISO 8601 datetime string (e.g., "2024-06-15T10:30:00"). Empty string if not available.
children
object[]
Child nodes. Present on directory nodes; omitted on file nodes. Each child has the same shape as the parent.

Errors

StatusCondition
400No WIM is currently open
500Both 7-Zip and wimlib-imagex dir failed

Example

curl "http://localhost:3000/api/browse?image=1"
{
  "name": "\\",
  "path": "\\",
  "type": "directory",
  "size": 0,
  "modified": "",
  "children": [
    {
      "name": "Windows",
      "path": "\\Windows",
      "type": "directory",
      "size": 0,
      "modified": "",
      "children": [
        {
          "name": "System32",
          "path": "\\Windows\\System32",
          "type": "directory",
          "size": 0,
          "modified": "",
          "children": [
            {
              "name": "ntdll.dll",
              "path": "\\Windows\\System32\\ntdll.dll",
              "type": "file",
              "size": 2105344,
              "modified": "2024-06-01T12:00:00"
            }
          ]
        }
      ]
    }
  ]
}

Build docs developers (and LLMs) love