Skip to main content

Sharing Dashboards

Grafana provides multiple ways to share dashboards with your team, stakeholders, or the public. Choose the method that best fits your security and collaboration needs.

Sharing Methods

Share Links

Direct URLs with customizable time ranges and themes

Snapshots

Point-in-time captures that can be shared externally

Export JSON

Download dashboard configuration for version control or migration

Embed

Embed panels in external websites using iframes

Public Dashboards

Share dashboards publicly without authentication

Permissions

Control access with user and team permissions
Create direct links to dashboards or individual panels:
1

Open Share Dialog

Click the Share icon in the dashboard toolbar (or panel menu for panels)
2

Select Link Tab

Choose the Link tab in the share modal
3

Configure Options

Set time range, theme, and URL shortening preferences
4

Copy Link

Click Copy to copy the URL to clipboard
interface ShareLinkOptions {
  useCurrentTimeRange: boolean;  // Lock to current time range
  theme: 'current' | 'light' | 'dark';  // Theme selection
  shortenUrl: boolean;           // Create short URL
  panelId?: number;              // Share specific panel
}

// Example link formats
// Dashboard link
https://grafana.example.com/d/abc123/dashboard-name

// Dashboard with time range
https://grafana.example.com/d/abc123/dashboard-name?from=now-6h&to=now

// Panel link
https://grafana.example.com/d/abc123/dashboard-name?viewPanel=2

// With variables
https://grafana.example.com/d/abc123/dashboard-name?var-server=web01&var-env=prod

Lock Time Range

When Lock time range is enabled:
  • Relative time ranges (e.g., now-6h) are converted to absolute timestamps
  • Viewers see the exact time window you selected
  • Dashboard auto-refresh is disabled
# Relative (default)
from=now-6h&to=now

# Absolute (locked)
from=1704067200000&to=1704088800000

Theme Selection

enum Theme {
  Current = 'current',  // Viewer's preference
  Light = 'light',      // Force light theme  
  Dark = 'dark'         // Force dark theme
}

// URL parameter
&theme=dark

Short URLs

Shorten long URLs for easier sharing:
# Original
https://grafana.example.com/d/abc123/my-dashboard?from=1704067200000&to=1704088800000&var-server=web01&var-env=prod

# Shortened
https://grafana.example.com/goto/xyz789
Short URLs are stored in Grafana’s database and require authentication to create. They redirect to the full URL when accessed.

Snapshots

Snapshots capture dashboard state at a specific moment:
interface DashboardSnapshot {
  name: string;              // Snapshot name
  expires: number;           // Expiration in seconds (0 = never)
  external: boolean;         // Share externally
  snapshotData: Dashboard;   // Complete dashboard state
  key: string;               // Unique snapshot key
}

Creating Snapshots

1

Open Snapshot Dialog

Click ShareSnapshot tab
2

Configure Snapshot

Set snapshot name and expiration time
3

Publish Snapshot

Choose local or external sharing
4

Share URL

Copy the generated snapshot URL

Snapshot Configuration

// Snapshot options
const snapshotOptions = {
  name: "Production Issues - 2024-01-15",
  expires: 3600 * 24 * 7,    // 1 week
  external: false,            // Local only
  timeout: 4000              // Render timeout (ms)
};

// Expiration options
expires: 3600              // 1 hour
expires: 3600 * 24         // 1 day  
expires: 3600 * 24 * 7     // 1 week
expires: 0                 // Never expire

Local vs External Snapshots

Local Snapshots:
  • Stored in your Grafana instance
  • Require authentication to view
  • Automatically expire based on configuration
  • URL: https://grafana.example.com/dashboard/snapshot/xyz
External Snapshots:
  • Published to external snapshot service (e.g., snapshots.raintank.io)
  • Publicly accessible without authentication
  • Independent of your Grafana instance
  • URL: https://snapshots.raintank.io/dashboard/snapshot/xyz
Snapshots contain all dashboard data at the time of creation. Be careful not to include sensitive information when sharing externally.

Managing Snapshots

View and delete snapshots:
# List snapshots API
GET /api/dashboard/snapshots

# Delete snapshot
DELETE /api/snapshots/{key}

# Delete using deleteKey (from creation response)
DELETE /api/snapshots-delete/{deleteKey}

Export Dashboard

Export dashboard JSON for backup or migration:
1

Open Dashboard Settings

Click the gear icon → JSON Model
2

Copy or Download

Copy JSON or click Save to file to download
3

Optional: Clean Data

Remove sensitive data or specific panel IDs if needed

Export Formats

enum ExportFormat {
  Classic = 'classic',        // Traditional JSON
  V1Resource = 'v1-resource', // Kubernetes v1 spec
  V2Resource = 'v2-resource'  // Kubernetes v2 spec
}

// Export via API
GET /api/dashboards/uid/{uid}?format=classic

Dashboard JSON Structure

{
  "dashboard": {
    "uid": "abc123",
    "title": "My Dashboard",
    "panels": [...],
    "templating": {...},
    "time": {...},
    "version": 1
  },
  "meta": {
    "canSave": true,
    "canEdit": true,
    "canDelete": true,
    "url": "/d/abc123/my-dashboard",
    "expires": "0001-01-01T00:00:00Z",
    "created": "2024-01-15T10:00:00Z",
    "updated": "2024-01-15T14:30:00Z",
    "createdBy": "admin",
    "updatedBy": "admin",
    "version": 5
  },
  "message": "Exported dashboard"
}

Cleaning Exported JSON

Remove instance-specific data:
// Remove before sharing/importing
delete dashboard.id;           // Database ID
delete dashboard.version;      // Version number
delete meta;                   // All metadata

// Optionally remove
delete dashboard.uid;          // UID (generates new on import)

// Keep these
dashboard.panels              // Panel configuration
dashboard.templating          // Variables
dashboard.time                // Time settings

Embedding Dashboards

Embed panels in external websites:

Panel Embed

<!-- Embed URL format -->
<iframe
  src="https://grafana.example.com/d-solo/abc123/dashboard-name?panelId=2&from=now-6h&to=now&theme=light"
  width="800"
  height="400"
  frameborder="0"
></iframe>

Embed URL Parameters

interface EmbedParams {
  panelId: number;           // Required: Panel to display
  from?: string;             // Time range start
  to?: string;               // Time range end
  theme?: 'light' | 'dark';  // Theme
  refresh?: string;          // Auto-refresh interval
  kiosk?: boolean;           // Kiosk mode (hide controls)
  'var-name'?: string;       // Variable values
}

// Example embed URL
https://grafana.example.com/d-solo/abc123/dashboard?
  panelId=2&
  from=now-6h&
  to=now&
  theme=light&
  refresh=1m&
  kiosk=true&
  var-server=web01

Kiosk Mode

Hide Grafana UI elements:
# TV mode - hide top navigation
?kiosk=tv

# Full kiosk - hide all controls
?kiosk=true

# Combined with embed
https://grafana.example.com/d-solo/abc123/dashboard?panelId=2&kiosk=true
Embedded dashboards require viewers to have access to the dashboard. Configure authentication or use public dashboards for unauthenticated embedding.

Public Dashboards

Share dashboards publicly without authentication:
1

Enable Public Dashboard

Go to Dashboard settingsPublic dashboard
2

Configure Access

Set time range behavior and enable/disable annotations
3

Generate Link

Click Generate public URL to create shareable link
4

Share URL

Copy and share the public URL

Public Dashboard Configuration

interface PublicDashboardConfig {
  isEnabled: boolean;          // Enable public access
  useTimeRange: boolean;       // Use dashboard time range
  annotationsEnabled: boolean; // Show annotations
  uid: string;                 // Public dashboard UID
  accessToken: string;         // Access token for URL
}

// Public URL format
https://grafana.example.com/public-dashboards/{accessToken}
Public dashboards are accessible to anyone with the URL. Ensure no sensitive data is displayed.

Dashboard Permissions

Control who can view and edit dashboards:
interface DashboardPermission {
  role?: 'Viewer' | 'Editor' | 'Admin';  // Organization role
  userId?: number;             // Specific user
  teamId?: number;             // Specific team
  permission: 1 | 2 | 4;       // 1=View, 2=Edit, 4=Admin
}

enum Permission {
  View = 1,    // Can view dashboard
  Edit = 2,    // Can edit dashboard
  Admin = 4    // Can manage permissions
}

Setting Permissions

1

Open Permissions

Go to Dashboard settingsPermissions
2

Add Permission

Click Add permission and select user, team, or role
3

Set Level

Choose View, Edit, or Admin permission level
4

Save

Click Save to apply permissions

Permission Inheritance

Dashboards inherit permissions from their folder:
// Folder permissions
Folder: "Production"
  Permissions:
    - Team: SREAdmin
    - Team: DevelopersEdit
    - Role: ViewerView

// Dashboard inherits these by default
Dashboard: "API Metrics" (in "Production" folder)
  Inherits folder permissions automatically

API-Based Sharing

Programmatically share dashboards:

Create Snapshot via API

POST /api/snapshots
Content-Type: application/json

{
  "dashboard": {
    "uid": "abc123",
    "title": "My Dashboard",
    "panels": [...]
  },
  "name": "Production Issues",
  "expires": 3600,
  "external": false
}

# Response
{
  "key": "xyz789",
  "deleteKey": "delete-xyz789",
  "url": "/dashboard/snapshot/xyz789",
  "deleteUrl": "/api/snapshots-delete/delete-xyz789"
}

Get Dashboard JSON via API

GET /api/dashboards/uid/{uid}
Authorization: Bearer {api-key}

# Response includes full dashboard JSON
{
  "meta": {...},
  "dashboard": {...}
}

Share with Service Accounts

Use service accounts for automated sharing:
# Create service account
POST /api/serviceaccounts
{
  "name": "dashboard-exporter",
  "role": "Viewer"
}

# Generate token
POST /api/serviceaccounts/{id}/tokens
{
  "name": "export-token"
}

# Use token to export dashboards
GET /api/dashboards/uid/{uid}
Authorization: Bearer {service-account-token}

Best Practices

Security

Review dashboard content before sharing externally. Remove sensitive queries, data, and credentials.

Expiration

Set appropriate expiration times for snapshots. Use shorter durations for sensitive data.

Permissions

Use team-based permissions rather than individual users for easier management.

Documentation

Add descriptions and comments to exported dashboards to provide context.

Security Considerations

  • Data Privacy: Ensure no PII or sensitive data is visible
  • Authentication: Use appropriate auth for external access
  • Time Ranges: Lock time ranges to prevent unexpected data access
  • Variables: Review variable defaults and allowed values
  • Annotations: Disable annotations if they contain sensitive info

Versioning Exported Dashboards

# Use git for version control
git init dashboard-exports/
cd dashboard-exports/

# Export and commit
curl -H "Authorization: Bearer ${API_KEY}" \
  https://grafana.example.com/api/dashboards/uid/abc123 \
  | jq .dashboard > my-dashboard.json

git add my-dashboard.json
git commit -m "Updated dashboard - added new panels"

Troubleshooting

  • Verify dashboard permissions for the user
  • Check if dashboard UID is correct
  • Ensure time range parameters are valid
  • Confirm variables have valid values

Snapshot Creation Fails

  • Check timeout settings for slow queries
  • Verify snapshot storage is configured
  • Ensure panels render without errors
  • Review query permissions

Embed Not Displaying

  • Check CORS settings in Grafana config
  • Verify iframe permissions
  • Ensure dashboard is accessible
  • Check browser console for errors

Public Dashboard Not Accessible

  • Confirm public dashboards are enabled in config
  • Verify the access token is correct
  • Check that queries don’t require authentication
  • Review data source permissions

Next Steps

Dashboard Overview

Learn about dashboard fundamentals

Variables

Share dashboards with variable parameters

Permissions

Configure advanced access controls

API Reference

Automate sharing with the Grafana API

Build docs developers (and LLMs) love