Skip to main content
The Binary Internals HTTP API is served from the same port as the web UI (default http://localhost:8080). All API endpoints live under /api/v1/ and return application/json; charset=utf-8. Non-API endpoints (/health, /icons/) return their own content types. There are no authentication headers — use a reverse proxy or network policy to restrict access in production. See Configuration for all tuning knobs.

GET /api/v1/formats

Returns a JSON array listing every format plug-in that is loaded and available for parsing. Request No request body or query parameters.
Response — 200 OK A JSON array. Each element describes one plug-in.
string
required
Human-readable label for the format, e.g. "Java Class file".
array of strings
required
File extensions handled by this plug-in, lowercase, without the leading dot — e.g. ["class"].

POST /api/v1/parse

Parses a binary file and returns its internal structure as a recursive JSON node tree — the same tree displayed in the desktop viewer. Request
string
required
The filename, including extension, e.g. Foo.class. The extension determines which format plug-in is used. The name must have a valid extension (1–16 alphanumeric characters after the last dot).
Send the raw file bytes as the request body. Set Content-Length to the byte count of the file, or use chunked transfer encoding.
Pass --compressed to let curl negotiate gzip, which can reduce response size by 70–90 % for typical parse trees.
Response — 200 OK A single JSON object representing the root node of the file’s parse tree. Nodes are nested recursively through the children field.
string
required
Human-readable label for this node, e.g. "magic: CAFEBABE" or "constant_pool[1]".
number
required
Byte offset of this node’s data within the file (zero-indexed).
number
required
Number of bytes this node spans in the file.
string
Name of the icon to display for this node, corresponding to a value in the Icons enum. Omitted when the node has no icon. Fetch the image from GET /icons/{Name}.png.
string
HTML fragment that explains the meaning of this node’s value. Omitted when the node has no description. Rendered as HTML in the web UI; sanitise before displaying in your own interface.
array
Child nodes, each with the same shape (recursive). Omitted when the node is a leaf.
Sample response (abbreviated)

GET /health

A lightweight liveness check suitable for container health probes and load balancer checks. Request No parameters.
Response — 200 OK
Use this endpoint as a Docker HEALTHCHECK or Kubernetes liveness probe. It returns immediately without touching the parser or any plug-ins.

GET /icons/.png

Returns a PNG image for a named icon. Icon names correspond to values in the Icons enum used by the format plug-ins (e.g. Magic, Jar, Annotations). Request
string
required
The icon enum name, case-sensitive, e.g. Magic. Append .png to form the path: /icons/Magic.png.
Response — 200 OK PNG image data (image/png). The response includes:
Icons are rendered from the Swing Icon objects once and cached in memory for the lifetime of the process, so repeated requests are fast. If the name does not match any Icons enum value, the server returns 404.

CORS

All /api/ endpoints support CORS preflight (OPTIONS) requests. When CORS_ORIGIN is set (the default is *), the following headers are added to every API response:
Preflight OPTIONS requests receive 204 No Content. Set CORS_ORIGIN= (empty) to disable CORS headers entirely. See Configuration for details.

Error responses

All errors are returned as JSON with a matching HTTP status code.
number
required
The HTTP status code, mirrored in the JSON body for clients that cannot easily read the HTTP status line.
string
required
A human-readable description of what went wrong.

HTTP status codes