Skip to main content

mr query edit-name

Update the name of an existing saved query. Query names are used by query run-by-name, so renaming a query breaks callers that reference it by the old name. Shorthand for a direct field update; does not modify the query Text or Template.

Usage

mr query edit-name <id> <value>

Positional arguments:

  • <id>
  • <value>

Examples

Rename query 42

mr query edit-name 42 "count-resources-v2"

Rename and confirm with a follow-up get

mr query edit-name 42 "renamed" && mr query 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)

Exit Codes

0 on success; 1 on any error

See Also