Request an invite
Docs menu

osmates audit export

Export the trail, or a time range of it, as JSON Lines with each record's hash.

Usage
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 show prints it.

--to <file>

A new file, a folder for osmates-audit-<time>.jsonl, or - for standard output. Default: the current folder.

--json

Print machine-readable JSON.

JSON output

With --json, it prints an object with these fields.

JSON Schema: /schemas/0/cli/audit/export.json

chainobjectRequired
chain.checkedintegerRequired
chain.firstinteger

At least 0.

chain.hashstring
chain.lastinteger

At least 0.

chain.prevstring
chain.problemobject
chain.problemsintegerRequired
chain.prunedarray of objects
filestringRequired
recordsintegerRequired

Fields nested deeper are in the schema.

Exit statuses

Its exit status is one of these.

StatusMeaning
0The command did what it was asked.
1The command failed; with --json, standard error's last line is the error object.
64The command line is wrong, as ArgumentParser found before the command ran.
65What was given is wrong, found while the command ran; the same command fails until it changes.
75The same command can work later with nothing changed, as while an update finishes.
130Control-C cancelled what the command started.
1The command printed its result, whose check failed.

Report a problem with this page