Skip to main content

mr category get

Get a category by ID and print its fields. The server has no single-category GET endpoint, so the CLI fetches the first page of the category list, the 50 most recently created, and filters in-process; a category outside that window is reported as not found, and the global --page flag does not move the window. Output is a key/value table by default; pass the global --json flag to emit the full raw record for scripting, including template slots and their companion stylesheets, metadata schema and section configuration.

Usage​

mr category get <id>

Positional arguments:

  • <id>

Examples​

Get a category by ID (table output)

mr category get 42

Get as JSON and extract the name with jq

mr category get 42 --json | jq -r .Name

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​

Full Category JSON record, including ID, Name, Description, template slots (CustomEntityPickerResult and CustomEntityPickerResultCSS included), MetaSchema, sectionConfig, CreatedAt, UpdatedAt

Exit Codes​

0 on success; 1 on any error

See Also​