Menu
Technical documentation Plugin catalog
Choose a product
Viewing: v12.2 (latest) Find another version
  • Grafana documentation
  • What's new
    • What's new in Grafana v12.2
    • What's new in Grafana v12.1
    • What's new in Grafana v12.0
    • What's new in Grafana v11.6
    • What's new in Grafana v11.5
    • What's new in Grafana v11.4
    • What's new in Grafana v11.3
    • What's new in Grafana v11.2
    • What's new in Grafana v11.1
    • What's new in Grafana v11.0
    • What's new in Grafana v10.4
    • What's new in Grafana v10.3
    • What's new in Grafana v10.2
    • What's new in Grafana v10.1
    • What's new in Grafana v10.0
    • What's new in Grafana v9.5
    • What's new in Grafana v9.4
    • What's new in Grafana v9.3
    • What's new in Grafana v9.2
  • Breaking changes
    • Breaking changes in Grafana v11.0
    • Breaking changes in Grafana v10.3
    • Breaking changes in Grafana v10.0
  • Upgrade Grafana
    • Upgrade strategies
    • Upgrade to v12.2
    • Upgrade to v12.1
    • Upgrade to v12.0
    • Upgrade to v11.6
    • Upgrade to v11.5
    • Upgrade to v11.4
    • Upgrade to v11.3
    • Upgrade to v11.2
    • Upgrade to v11.1
    • Upgrade to v11.0
    • Upgrade to v10.4
    • Upgrade to v10.3
    • Upgrade to v10.2
    • Upgrade to v10.1
    • Upgrade to v10.0
    • Upgrade to v9.5
    • Upgrade to v9.4
    • Upgrade to v9.3
    • Upgrade to v9.2
    • Upgrade to v9.1
    • Upgrade to v9.0
    • Upgrade to v8.5
    • Upgrade to v8.4
    • Upgrade to v8.3
    • Upgrade to v8.2
    • Upgrade to v8.1
    • Upgrade to v8.0
  • About Grafana
    • Grafana Enterprise
    • Grafana Cloud
  • Introduction
    • What is Prometheus?
    • Dashboard overview
    • Introduction to time series
    • Time series dimensions
    • Histograms and heatmaps
    • Exemplars
    • Glossary
    • Get started with Grafana Open Source
      • Build your first dashboard
        • Get started with Grafana and Prometheus
        • Get started with Grafana and InfluxDB
        • Get started with Grafana and MS SQL Server
  • Set up
    • Install Grafana
      • Debian or Ubuntu
      • RHEL or Fedora
      • SUSE or openSUSE
      • Grafana Docker image
      • Grafana on Kubernetes
      • Grafana on Helm Charts
      • macOS
      • Windows
    • Configure Grafana
      • Configure Grafana Enterprise
      • Configure feature toggles
      • Configure profiling and tracing
      • Configure custom branding
      • Settings updates at runtime
      • Configure data source proxy
    • Start Grafana
    • Sign in to Grafana
    • Configure security
      • Configure database encryption
        • Encrypt database secrets using Google Cloud KMS
        • Encrypt database secrets using Hashicorp Vault
        • Encrypt database secrets using AWS KMS
        • Encrypt database secrets using Azure Key Vault
        • Integrate Grafana with Hashicorp Vault
      • Audit a Grafana instance
      • Export logs of usage insights
      • Configure secret scanning
      • Configure request security
      • Configure security hardening
    • Configure access management
      • Configure authentication
        • Basic auth
        • Passwordless
        • Anonymous access
        • LDAP
        • LDAP user interface
        • Enhanced LDAP
        • SAML
          • SAML user interface
          • SAML configuration options
          • Configure SAML signing and encryption
          • Configure Role and Team sync for SAML
          • Configure Organisation mapping for SAML
          • Configure SAML single logout
          • Configure SAML with Entra ID
          • Configure SAML with Okta
            • Configure SAML with Okta catalog application
          • Troubleshooting
        • Generic OAuth
        • Entra ID OAuth
        • GitHub OAuth
        • GitLab OAuth
        • Google OAuth
        • Grafana Cloud OAuth2
        • Keycloak OAuth2
        • Multiple providers with Keycloak
        • Okta OIDC
        • Auth proxy
        • JWT
      • Configure SCIM provisioning
        • Manage users and teams with SCIM
        • Configure SCIM with Entra ID
        • Configure SCIM with Okta
        • Troubleshoot SCIM
      • Multi-team access
      • Configure Team Sync
    • Set up Grafana monitoring
    • Set up HA
    • Set up HTTPS
    • Set up image rendering
      • Monitor the image renderer
      • Troubleshooting
    • Set up Grafana Live
    • Configure a Docker image
  • Administration
    • Back up Grafana
    • Data source management
      • Label Based Access Control (LBAC) for data sources
        • Configure LBAC for data sources for Loki
        • Configure LBAC for data sources for Prometheus
        • Create LBAC for data sources rules for a supported data source
    • Plugin management
      • Types of plugins
      • Install a plugin
      • Plugin signatures
      • Customize navigation placement of plugin pages
      • Plugin backend communication
      • Isolate plugin code with the Plugin Frontend Sandbox
    • Grafana Advisor
    • Grafana Teams
      • Configure Grafana Teams
      • Administer Grafana Teams
    • Manage users
      • Server user management
        • Assign or remove Grafana server administrator privileges
        • Add or remove a user in an organization
        • Change a user's organization permissions
      • Manage user preferences
      • Manage users in an organization
      • Manage dashboard permissions
    • Roles and permissions
      • Role-based access control (RBAC)
        • Plan your RBAC rollout strategy
        • Configure RBAC
        • Assign RBAC roles
        • Manage RBAC roles
        • Provisioning RBAC with Grafana
        • Provisioning RBAC with Terraform
        • RBAC role definitions
        • RBAC permissions, actions, and scopes
        • RBAC for app plugins
        • Troubleshooting RBAC
    • Manage organizations
    • Organization preferences
    • Admin with Grafana server CLI
    • Provision Grafana
    • Service accounts
      • Migrate API keys
    • Server stats and license
    • Announcement banner
    • Grafana Enterprise license
      • Activate a Grafana Enterprise license purchased through AWS Marketplace
        • Activate a Grafana Enterprise license from AWS Marketplace on EKS
        • Activate a Grafana Enterprise license from AWS Marketplace on ECS
        • Activate a Grafana Enterprise license from AWS on an instance deployed outside of AWS
        • Manage your Grafana Enterprise license in AWS Marketplace
        • Transfer your AWS Marketplace Grafana Enterprise license
    • Correlations
      • Correlation
      • Permissions
      • Add permissions
      • Create a new correlation
      • Use variables and transformations in a correlation
      • Use correlations in visualizations
    • Migrate from Grafana OSS/Enterprise to Grafana Cloud
      • Manually migrate to Grafana Cloud
      • Migrate to Grafana Cloud using the Grafana Cloud Migration Assistant
    • Search
    • Recorded queries (deprecated)
  • Data sources
    • Alertmanager
    • Amazon CloudWatch
      • Configure
      • Query editor
      • Template variables
      • AWS authentication
    • Azure Monitor
      • Query editor
      • Template variables
    • Elasticsearch
      • Configure Elasticsearch
      • Query editor
      • Template variables
    • Google Cloud Monitoring
      • Authentication
      • Query editor
      • Template variables
    • Graphite
      • Configure
      • Query editor
      • Template variables
    • InfluxDB
      • Configure the InfluxDB data source
      • Query editor
      • Template variables
    • Loki
      • Configure Loki
      • Query editor
      • Template variables
    • Jaeger
    • Microsoft SQL Server
      • Configure
      • Query editor
      • Template variables
    • MySQL
      • Configure the MySQL data source
      • MySQL query editor
    • OpenTSDB
    • Parca
    • PostgreSQL
      • Configure
      • Query editor
    • Prometheus
      • Configure the Prometheus data source
        • Authenticating with SigV4
        • Authenticating with Azure
      • Prometheus query editor
      • Prometheus template variables
    • Pyroscope
      • Configure Pyroscope
      • How profiling and tracing work together
      • Configure traces to profiles
      • Query profile data
    • Tempo
      • Configure Tempo
      • Best practices
      • Use traces in Grafana
        • Link to a trace ID
        • Upload JSON trace file
        • Trace correlations
      • Query tracing data
        • TraceQL query structure
        • Search traces
        • Write TraceQL queries
      • Service Graph and Service Graph view
      • Span filters
    • TestData
    • Zipkin
  • Observability as Code
    • Get started with Observability as Code
    • Grafana CLI
      • Install Grafana CLI
      • Set up Grafana CLI
      • Manage resources with Grafana CLI
    • JSON schema v2
      • annotations schema
      • PanelKind schema
      • LibraryPanelKind schema
      • layout schema
      • links schema
      • timesettings schema
      • variables schema
    • Foundation SDK
      • Automate dashboard provisioning with CI/CD
    • Provision resources
      • Git Sync
      • Set up Git Sync
      • Set up file provisioning
      • Work with provisioned dashboards
      • Manage repositories with Git Sync
  • Alerting
    • Introduction
      • Alert rules
        • Queries and conditions
        • Labels and annotations
      • Alert rule evaluation
        • No Data and Error states
        • Stale alert instances
        • Alert rule state and health
        • Evaluation within a group
      • Notifications
        • Contact points
        • Notification policies
        • Grouping
      • Templates
    • Configure alert rules
      • Configure Grafana-managed alert rules
      • Create and link alert rules to panels
      • Import to Grafana-managed rules
      • Configure data source-managed alert rules
      • Create recording rules
        • Create Grafana-managed recording rules
        • Create data source-managed recording rules
        • Migrate recorded queries
      • Template annotations and labels
        • Template reference
        • Examples
        • Template language
    • Configure notifications
      • Configure contact points
        • Alertmanager
        • Amazon SNS
        • Discord
        • Email
        • Google Chat
        • Grafana IRM
        • Jira
        • Microsoft Teams
        • MQTT
        • Opsgenie
        • PagerDuty
        • Slack
        • Telegram
        • Webhook
      • Configure notification policies
      • Configure mute timings and active time intervals
      • Configure silences
      • Template notifications
        • Manage templates
        • Template reference
        • Examples
        • Template language
        • Use images
    • Monitor alerts
      • View alert rules
      • View alert state
      • View alert state history
      • View active notifications
      • Declare incidents from firing alerts
    • Additional configuration
      • Configure roles and permissions
      • Configure RBAC
        • Manage access using roles
        • Manage access using folders or data sources
      • Configure Alertmanagers
      • Configure alert state history
      • Provision Alerting resources
        • Use configuration files to provision
        • Use Terraform to provision
        • Export alerting resources
        • Use the HTTP API to manage alerting resources
      • Configure high availability
      • Meta monitoring
      • Performance considerations and limitations
    • Best practices
      • Handle connectivity errors
      • Handle missing data
      • Examples of multi-dimensional alerts
      • Examples of table data
      • Examples of dynamic thresholds
      • Examples of dynamic labels
      • Examples of high-cardinality alerts
      • Tutorials
  • Troubleshooting
    • Send panel to support
    • Send a support bundle to support
    • Generate a HAR capture
  • Developers
    • HTTP API
      • Authentication
      • Examples
        • API Tutorial: Create Service Account tokens and dashboards for an organization
        • cURL examples
      • Admin HTTP API
      • Alerting Provisioning HTTP API
      • Annotations HTTP API
      • Correlations HTTP API
      • Dashboard HTTP API
      • Dashboard Permissions HTTP API
      • Dashboard Versions HTTP API
      • Data source HTTP API
      • Datasource LBAC rules HTTP API
      • Datasource Permissions HTTP API
      • Folder HTTP API
      • Folder Permissions HTTP API
      • Folder/Dashboard Search HTTP API
      • Library Element HTTP API
      • Licensing HTTP API
      • New API Structure
      • Organization HTTP API
      • Other HTTP API
      • Playlist HTTP API
      • Preferences API
      • Query and Resource Caching HTTP API
      • Query History HTTP API
      • RBAC HTTP API
      • Reporting API
      • Service account HTTP API
      • Shared Dashboards HTTP API
      • Short URL HTTP API
      • Snapshot API
      • SSO Settings API
      • Team HTTP API
      • Team Sync HTTP API
      • User HTTP API
    • Contribute to Grafana
    • Contributor License Agreement (CLA)
  • Visualize data
    • Dashboards
      • Use dashboards
      • Build dashboards
        • Create a dashboard
        • Import dashboards
        • Modify dashboard settings
        • Manage dashboard links
        • Dashboard URL variables
        • Manage library panels
        • Manage version history
        • Annotate visualizations
        • JSON model
        • Best practices
      • Manage dashboards
      • Search dashboards
      • Manage playlists
      • Reporting
        • Settings
      • Sharing
        • Shared dashboards
      • Variables
        • Add variables
        • Inspect variables
        • Variable syntax
      • Assess dashboard usage
      • Troubleshoot dashboards
    • Panels and visualizations
      • Visualizations
        • Time series
        • Alert list
        • Annotations list
        • Bar chart
        • Bar gauge
        • Candlestick
        • Canvas
        • Dashboard list
        • Datagrid
        • Flame graph
        • Gauge
        • Geomap
        • Heatmap
        • Histogram
        • Logs
        • News
        • Node graph
        • Pie chart
        • Stat
        • State timeline
        • Status history
        • Table
        • Text
        • Traces
        • Trend
        • XY chart
      • Panel overview
      • Panel editor
      • The panel inspect view
      • Query and transform data
        • Write expression queries
        • SQL expressions
        • Share query results
        • Transform data
        • Troubleshoot queries
        • Calculation types
      • Configure panel options
      • Configure standard options
      • Configure a legend
      • Configure tooltips
      • Configure data links and actions
      • Configure value mappings
      • Configure thresholds
      • Configure field overrides
    • Explore
      • Get started with Explore
      • Query management in Explore
      • Query inspector in Explore
      • Correlations Editor in Explore
      • Logs in Explore
      • Traces in Explore
    • Drilldown
  • Tutorials
    • Grafana fundamentals
    • Create users and teams
    • Provision dashboards and data sources
    • Get started with Grafana Alerting - Create and receive your first alert
    • Get started with Grafana Alerting - Multi-dimensional alerts and how to route them
    • Get started with Grafana Alerting - Group alert notifications
    • Get started with Grafana Alerting - Template your alert notifications
    • Get started with Grafana Alerting - Route alerts using dynamic labels
    • Get started with Grafana Alerting - Link alerts to visualizations
    • How to create alert rules with log data
    • How to create Grafana alerts with InfluxDB and the Flux query language
    • Stream metrics from Telegraf to Grafana
    • Install Grafana on Raspberry Pi
    • Integrate Hubot with Grafana
    • Run Grafana behind a reverse proxy
    • Use IIS with URL Rewrite as a reverse proxy
Scroll for more
Documentationbreadcrumb arrow breadcrumb arrow Grafana documentationbreadcrumb arrow Developersbreadcrumb arrow HTTP APIbreadcrumb arrow Examples
Enterprise Open source

HTTP API examples

  • API Tutorial: Create Service Account tokens and dashboards for an organization
  • cURL examples

Was this page helpful?

Email docs@grafana.com
Help and support
Community

Is this page helpful?