osmates audit export
Export the trail, or a time range of it, as JSON Lines with each record's hash.
osmates audit export [<options>]Writes a header line, then the trail's lines as they are stored, each with its hash and the hash of the record before it, then an end line with what the check of the range's chain found. Its schema is files/audit-export.json in the API reference. The range runs from the first record at or after --since, or the trail's first, to the first record past --until, or the export's own start. Exits 1, naming the first bad record, when the range's chain is broken, after writing the export. Exporting needs OSMates Team.
Arguments
--since <since>From the first record at or after this time, such as 2026-10-28 or 2026-10-28T07:03:12Z.
--until <until>Up to this time. Default: when the export starts.
--machine <machine>Only the records of this machine, by its name or identifier, also once it is deleted.
--client <client>Only the records of this agent client, by its name as
audit showprints it.--to <file>A new file, a folder for osmates-audit-<time>.jsonl, or - for standard output. Default: the current folder.
--jsonPrint machine-readable JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/audit/export.json
chainobjectRequiredchain.checkedintegerRequiredchain.firstintegerAt least 0.
chain.hashstringchain.lastintegerAt least 0.
chain.prevstringchain.problemobjectchain.problemsintegerRequiredchain.prunedarray of objectsfilestringRequiredrecordsintegerRequired
Fields nested deeper are in the schema.
Exit statuses
Its exit status is one of these.
| Status | Meaning |
|---|---|
| 0 | The command did what it was asked. |
| 1 | The command failed; with --json, standard error's last line is the error object. |
| 64 | The command line is wrong, as ArgumentParser found before the command ran. |
| 65 | What was given is wrong, found while the command ran; the same command fails until it changes. |
| 75 | The same command can work later with nothing changed, as while an update finishes. |
| 130 | Control-C cancelled what the command started. |
| 1 | The command printed its result, whose check failed. |