Skip to main content

mr mrql delete

Delete a saved MRQL query by numeric ID. Destructive: removes the database row for the saved query. Any downstream references (bookmarks, dashboards, or [mrql saved="..."] shortcodes) must be updated separately — the server does not rewrite them. Deleting a nonexistent ID returns exit code 1.

Unlike mrql run, the delete subcommand only accepts a numeric ID; pass mrql list --json | jq -r '.[] | select(.name == "...") | .id' to resolve a name to its ID first.

Usage

mr mrql delete <id>

Positional arguments:

  • <id>

Examples

Delete a saved query by ID

mr mrql delete 42

Delete and inspect the response with jq

mr mrql delete 42 --json | jq .

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

Object with id (uint) of the deleted saved MRQL query

Exit Codes

0 on success; 1 on any error

See Also