4.6 KiB
03 — API Reference
Conventions
- All endpoints are under
/api/ - JSON responses are used unless the endpoint downloads a file
- Async jobs share the same status model:
queued,running,success,failed,canceled - Export filenames use
YYYY-MM-DD (MODEL) - SERIAL.<ext>when board metadata exists - Embedded chart viewer routes live under
/chart/and return HTML/CSS, not JSON
Input endpoints
POST /api/upload
Uploads one file in multipart field archive.
Accepted inputs:
- supported archive/log formats from the parser registry
.jsonAnalysisResultsnapshots- raw-export JSON packages
- raw-export ZIP bundles
Result:
- parses or replays the input
- stores the result as current in-memory state
- returns parsed summary JSON
Related helper:
GET /api/file-typesreturnsarchive_extensions,upload_extensions, andconvert_extensions
POST /api/collect
Starts a live collection job.
Request body:
{
"host": "bmc01.example.local",
"protocol": "redfish",
"port": 443,
"username": "admin",
"auth_type": "password",
"password": "secret",
"tls_mode": "insecure"
}
Supported values:
protocol:redfishoripmiauth_type:passwordortokentls_mode:strictorinsecure
Responses:
202on accepted job creation400on malformed JSON422on validation errors
Optional request field:
power_on_if_host_off: whentrue, Redfish collection may power on the host before collection if preflight found it powered off
POST /api/collect/probe
Checks that live API connectivity works and returns host power state before collection starts.
Typical request body is the same as POST /api/collect.
Typical response fields:
reachableprotocolhost_power_statehost_powered_onpower_control_availablemessage
GET /api/collect/{id}
Returns async collection job status, progress, timestamps, and accumulated logs.
POST /api/collect/{id}/cancel
Requests cancellation for a running collection job.
POST /api/convert
Starts a batch conversion job that accepts multiple files under files[] or files.
Each supported file is parsed independently and converted to Reanimator JSON.
Response fields:
job_idstatusacceptedskippedtotal_files
GET /api/convert/{id}
Returns batch convert job status using the same async job envelope as collection.
GET /api/convert/{id}/download
Downloads the ZIP artifact produced by a successful convert job.
Read endpoints
GET /api/status
Returns source metadata for the current dataset.
If nothing is loaded, response is { "loaded": false }.
Typical fields:
loadedfilenamevendorsource_typeprotocoltarget_hostsource_timezonecollected_atstats
GET /api/config
Returns the main UI configuration payload, including:
- source metadata
hardware.boardhardware.firmware- canonical
hardware.devices - computed specification lines
GET /api/events
Returns events sorted newest first.
GET /api/sensors
Returns parsed sensors plus synthesized PSU voltage sensors when telemetry is available.
GET /api/serials
Returns serial-oriented inventory built from canonical devices.
GET /api/firmware
Returns firmware-oriented inventory built from canonical devices.
GET /api/parse-errors
Returns normalized parse and collection issues combined from:
- Redfish fetch errors in
raw_payloads - raw-export collect logs
- derived partial-inventory warnings
GET /api/parsers
Returns registered parser metadata.
GET /api/file-types
Returns supported file extensions for upload and batch convert.
Viewer endpoints
GET /chart/current
Renders the current in-memory dataset as Reanimator HTML using embedded reanimator/chart.
The server first converts the current result to Reanimator JSON, then passes that snapshot to the viewer.
GET /chart/static/...
Serves embedded reanimator/chart static assets.
Export endpoints
GET /api/export/csv
Downloads serial-number CSV.
GET /api/export/json
Downloads a raw-export artifact for reopen and re-analysis. Current implementation emits a ZIP bundle containing:
raw_export.jsoncollect.logparser_fields.json
GET /api/export/reanimator
Downloads Reanimator JSON built from the current normalized result.
Management endpoints
DELETE /api/clear
Clears current in-memory dataset, raw export state, and temporary convert artifacts.
POST /api/shutdown
Gracefully shuts down the process after responding.