Skip to main content
Grafana logo

Overview

Add Grafana to any ModuleX agent or workflow. Manage Grafana dashboards, alert rules, annotations, contact points, data sources, and folders, and monitor instance and data source health against the Grafana HTTP API of your own instance.
Categories: Monitoring & Observability · Monitoring · Data Analytics · Auth: Service Account Token · Actions: 25

Authentication

Service Account Token

Authenticate with a Grafana service account token against your instance
1

Step 1

In Grafana, open Administration -> Users and access -> Service accounts
2

Step 2

Create a service account with the roles your workflow needs (e.g. Editor or Admin)
3

Step 3

Add a service account token and copy the generated ‘glsa_…’ value
4

Step 4

Paste the token below and set your Grafana instance URL (e.g. https://your-grafana.com)

Required Credentials

Available Actions

Parameters

string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.
string
Search query to filter dashboards by title
string
Filter by tag (comma-separated for multiple tags)
string
Filter by folder UIDs (comma-separated)
string
Filter by dashboard UIDs (comma-separated)
boolean
Only return starred dashboards
integer
Maximum number of dashboards to return
integer
Page number for pagination (1-based)

Response

Parameters

string
required
The UID of the dashboard to retrieve
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The title of the new dashboard
string
UID of the folder to create the dashboard in
string
Comma-separated list of tags
string
Dashboard timezone (e.g. browser, utc)
string
Auto-refresh interval (e.g. 5s, 1m, 5m)
string
JSON array of panel configurations
boolean
Overwrite an existing dashboard with the same title
string
Commit message for the dashboard version
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The UID of the dashboard to update
string
New title for the dashboard
string
New folder UID to move the dashboard to
string
Comma-separated list of new tags
string
Dashboard timezone (e.g. browser, utc)
string
Auto-refresh interval (e.g. 5s, 1m, 5m)
string
JSON array of panel configurations
boolean
Overwrite even on a version conflict
string
Commit message for this version
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The UID of the dashboard to delete
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The UID of the alert rule to retrieve
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The title of the alert rule
string
required
UID of the folder to create the alert in
string
required
The name of the rule group
string
required
JSON array of query/expression data objects
string
RefId of the query/expression used as the alert condition (omit for recording rules)
string
Duration to wait before firing (e.g. 5m, 1h)
string
State when no data is returned (NoData, Alerting, OK)
string
State on execution error (Error, Alerting, OK)
string
JSON object of annotations
string
JSON object of labels
string
Optional custom UID for the alert rule
boolean
Whether the rule is paused on creation
string
Duration to keep firing after the condition stops
integer
Missing series evaluations before resolving
string
JSON object of per-rule notification settings
string
JSON object configuring this as a recording rule
boolean
Set the X-Disable-Provenance header so the rule stays UI-editable
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The UID of the alert rule to update
string
New title for the alert rule
string
New folder UID for the rule
string
New rule group name
string
New condition refId
string
New JSON array of query/expression data objects
string
Duration to wait before firing (e.g. 5m, 1h)
string
State when no data is returned (NoData, Alerting, OK)
string
State on execution error (Error, Alerting, OK)
string
JSON object of annotations
string
JSON object of labels
boolean
Whether the rule is paused
string
Duration to keep firing after the condition stops
integer
Missing series evaluations before resolving
string
JSON object of per-rule notification settings
string
JSON object configuring this as a recording rule
boolean
Set the X-Disable-Provenance header so the rule stays UI-editable
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The UID of the alert rule to delete
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
Filter contact points by exact name match
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
Name of the contact point
string
required
Receiver type (e.g. slack, email, pagerduty, webhook, teams, opsgenie, discord)
string
required
JSON object of type-specific receiver settings
boolean
Do not send a notification when the alert resolves
boolean
Set the X-Disable-Provenance header so the contact point stays UI-editable
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The text content of the annotation
string
Comma-separated list of tags
string
UID of the dashboard to annotate; omit for a global annotation
integer
ID of the panel to attach the annotation to
integer
Start time in epoch milliseconds (defaults to now)
integer
End time in epoch milliseconds for range annotations
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

integer
Start time in epoch milliseconds
integer
End time in epoch milliseconds
string
Dashboard UID to query annotations from
integer
Legacy numeric dashboard ID filter
integer
Filter by panel ID
integer
Filter by alert ID
integer
Filter by ID of the creating user
string
Comma-separated list of tags to filter by
string
Filter by type (alert or annotation)
integer
Maximum number of annotations to return
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

integer
required
The ID of the annotation to update
string
New text content for the annotation
string
Comma-separated list of new tags
integer
New start time in epoch milliseconds
integer
New end time in epoch milliseconds
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

integer
required
The ID of the annotation to delete
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The ID or UID of the data source to retrieve
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The UID of the data source to health-check
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

integer
Maximum number of folders to return
integer
Page number for pagination
string
List children of this folder UID
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The title of the new folder
string
Optional UID for the folder
string
Parent folder UID for nested folders
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The UID of the folder to retrieve
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The UID of the folder to update
string
required
New title for the folder
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
required
The UID of the folder to delete
boolean
Delete any alert rules stored in the folder along with it
string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Parameters

string
Organization ID for multi-org Grafana instances (e.g. 1, 2). Sent as the X-Grafana-Org-Id header when set.

Response

Limits & Quotas

  • Rate limits are configured per Grafana instance; self-hosted instances are unbounded by default, while Grafana Cloud applies tier limits.
  • Update semantics: update_dashboard, update_alert_rule, and update_folder first GET the current resource, merge your changes, and write the full body back (Grafana’s update endpoints require the complete resource and a version for conflict detection).
  • Error model: non-2xx responses and timeouts are caught and returned as success=False + error rather than raising. Plan for retries on the agent side based on the error string.

New Relic

Sentry

CrowdStrike