Skip to main content

mr resource versions

List every stored version of a Resource, newest first. Columns are the version ID, version number, size in bytes, content type, an optional author comment, and the creation timestamp. Pass the global --json flag to get the full records for scripting.

Usage

mr resource versions <resource-id>

Positional arguments:

  • <resource-id>

Examples

List versions (table)

mr resource versions 42

Get the newest version's ID via jq

mr resource versions 42 --json | jq -r '.[0].id'

Flags

This command has no local flags.

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Output

Array of version objects with id, number, size, type, comment, created

Exit Codes

0 on success; 1 on any error

See Also