Skip to main content

mr queries list

List saved Queries, optionally filtered by name. Pagination is controlled via the global --page flag (default page size 50). The --name flag does a substring match on query names (SQL LIKE under the hood). Use the global --json flag to retrieve the raw array of query records for scripting; the default table output truncates long Name/Description cells for readability.

Usage

mr queries list

Examples

List all queries (first page)

mr queries list

Filter by a name substring

mr queries list --name "count"

JSON + jq: print each query's ID and name

mr queries list --json | jq -r '.[] | "\(.ID)\t\(.Name)"'

Flags

FlagTypeDefaultDescription
--namestring``Filter by name

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 query objects with ID, Name, Text, Template, Description, CreatedAt, UpdatedAt

Exit Codes

0 on success; 1 on any error

See Also