Skip to content
Back to skills

2345 Dashboardoperations 472b6227

ASecurity

Step-by-step workflow for Grafana dashboard operations using the TypeScript tools.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
businesstypescriptbash

Works with

  • cli

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2345-dashboardoperations_472b6227 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2345 Dashboardoperations 472b6227?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2345 Dashboardoperations 472b6227
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2345-dashboardoperations-472b6227/badge)](https://www.skillsdirectory.com/skills/tools-only-2345-dashboardoperations-472b6227)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Dashboard Operations Workflow

Step-by-step workflow for Grafana dashboard operations using the TypeScript tools.

## Prerequisites

```bash
export GRAFANA_URL="https://grafana.example.com"
export GRAFANA_TOKEN="your-service-account-token"
```

## Workflow: List and Search

```bash
# List all dashboards
bun run Tools/DashboardCrud.ts list

# Search by name
bun run Tools/DashboardCrud.ts list --query production

# Filter by tag
bun run Tools/DashboardCrud.ts list --tag monitoring

# JSON output for scripting
bun run Tools/DashboardCrud.ts list --json
```

## Workflow: Export Dashboard

```bash
# Export to default file (uid.json)
bun run Tools/DashboardCrud.ts export abc123

# Export to custom file
bun run Tools/DashboardCrud.ts export abc123 --output my-dashboard.json
```

## Workflow: Create Dashboard

```bash
# Create dashboard
bun run Tools/DashboardCrud.ts create --file dashboard.json

# Create in specific folder
bun run Tools/DashboardCrud.ts create --file dashboard.json --folder my-folder-uid

# Create with custom title
bun run Tools/DashboardCrud.ts create --file dashboard.json --title "My Dashboard"
```

## Workflow: Update Dashboard

```bash
# Update dashboard
bun run Tools/DashboardCrud.ts update abc123 --file updated.json

# Update with commit message
bun run Tools/DashboardCrud.ts update abc123 --file updated.json --message "Added new panel"
```

## Workflow: Clone Dashboard

```bash
# Clone with auto-generated title
bun run Tools/DashboardCrud.ts clone abc123

# Clone with custom title
bun run Tools/DashboardCrud.ts clone abc123 --title "Production Copy"

# Clone to different folder
bun run Tools/DashboardCrud.ts clone abc123 --title "Dev Copy" --folder dev-folder-uid
```

## Workflow: Version Management

```bash
# View version history
bun run Tools/DashboardCrud.ts versions abc123

# Restore specific version
bun run Tools/DashboardCrud.ts restore abc123 --version 5
```

## Workflow: Delete Dashboard

```bash
bun run Tools/DashboardCrud.ts delete abc123
```

## Bulk Operations (TypeScript)

### Export All Dashboards by Tag

```typescript
import { createGrafanaClient } from './Tools/GrafanaClient';

const client = createGrafanaClient();
const dashboards = await client.searchDashboards({ tag: 'production' });

for (const dash of dashboards) {
  const full = await client.getDashboardByUid(dash.uid);
  await Bun.write(`exports/${dash.uid}.json`, JSON.stringify(full.dashboard, null, 2));
  console.log(`Exported: ${dash.uid}`);
}
```

### Update Tags in Bulk

```typescript
import { createGrafanaClient } from './Tools/GrafanaClient';

const client = createGrafanaClient();
const dashboards = await client.searchDashboards({ tag: 'old-tag' });

for (const dash of dashboards) {
  const full = await client.getDashboardByUid(dash.uid);
  full.dashboard.tags = full.dashboard.tags.filter(t => t !== 'old-tag');
  full.dashboard.tags.push('new-tag');

  await client.saveDashboard({
    dashboard: full.dashboard,
    folderUid: full.meta.folderUid,
    message: 'Updated tags'
  });
  console.log(`Updated: ${dash.uid}`);
}
```

## Error Handling

| Error | Solution |
|-------|----------|
| 412 Version Conflict | Fetch latest version first, then update |
| 403 Permission Denied | Check service account role (Viewer/Editor/Admin) |
| 404 Not Found | Verify dashboard UID and organization |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.