resource get
What this page covers
Fetch one supported live Grafana resource by selector.
When to open this page
- Use this when you need the live payload for one supported resource item and want a simpler generic query than building a full export or inspect workflow.
Purpose
Fetch one supported live Grafana resource by selector.
When to use
Use this when you need the live payload for one supported resource item and want a simpler generic query than building a full export or inspect workflow.
Key flags
- positional
SELECTOR: required<kind>/<identity>selector, for exampledashboards/cpu-mainordatasources/prom-main --profile,--url,--token,--basic-user,--basic-password: live Grafana connection settings--output-format: choosetext,table,json, oryaml
Notes
- The selector kind must currently be one of
dashboards,folders,datasources,alert-rules, ororgs. textandtableoutputs summarize the fetched object. Usejsonoryamlwhen you need the full payload.
Examples
# Purpose: Fetch one live dashboard by UID.
grafana-util resource get dashboards/cpu-main --url http://localhost:3000 --basic-user admin --basic-password admin
# Purpose: Fetch one datasource payload as YAML.
grafana-util resource get datasources/prom-main --profile prod --output-format yaml
# Purpose: Fetch one org payload by numeric ID.
grafana-util resource get orgs/1 --profile prod --output-format json