superset-api
Skill0 starsChanged 10 months agoMITView on GitHub
Interact with Apache Superset REST API to manage dashboards, charts, datasets, databases, and execute SQL queries. Use when users need to programmatically work with Superset for: (1) Listing or managing dashboards and charts, (2) Creating or querying datasets, (3) Executing SQL queries via SQL Lab, (4) Managing database connections, (5) Retrieving chart data with filters and metrics, (6) Generating guest tokens for embedded dashboards. Requires a Superset host URL.
In this repositoryOne other file it gives its agents.
- openclaw-hardeningSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Important: Use a cookie jar (-c and -b flags with curl) to maintain session cookies across requests.
- Very specific: line 27
Filtering: Use q parameter with Rison-encoded filter syntax
- Distinctive: line 67
When creating a dashboard with charts via API, follow this sequence:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Apache Superset API
Programmatic access to Apache Superset business intelligence features via REST API.
Configuration
- Host URL: Base URL of the Superset instance (e.g.,
http://localhost:8088) - Swagger UI: Full API documentation at
http://<host>/swagger/v1
Authentication Flow
- Login →
POST /api/v1/security/loginwith username/password to getaccess_token - Get CSRF →
GET /api/v1/security/csrf_token/(required for mutating operations) - Use tokens → Include
Authorization: Bearer <access_token>on all requests; addX-CSRFToken: <csrf_token>header for POST/PUT/DELETE
Important: Use a cookie jar (-c and -b flags with curl) to maintain session cookies across requests. The CSRF token requires an active session to work properly.
Key Concepts
- CSRF Token: Required for all mutating operations (POST, PUT, DELETE)
- Pagination: Most list endpoints support
pageandpage_sizequery parameters - Filtering: Use
qparameter with Rison-encoded filter syntax
Core Capabilities
| Capability | Key Endpoints |
| Dashboards | /api/v1/dashboard/ - CRUD, export/import |
| Charts | /api/v1/chart/ - CRUD; /api/v1/chart/data - execute queries |
| Datasets | /api/v1/dataset/ - create from tables or SQL |
| Databases | /api/v1/database/ - manage connections |
| SQL Lab | /api/v1/sqllab/execute/ - run SQL queries (sync/async) |
| Security | /api/v1/security/guest_token/ - embedded dashboard tokens with RLS |
Chart Types Reference
Chart Type (viz_type) | Description |
echarts_area | Area under lines to show ratios, proportions, or percentages over a dimension (e.g., time) |
echarts_timeseries_bar | Bars to visualize how metrics change over a dimension (e.g., time) |
dist_bar | Bar chart (legacy) - easy-to-understand categorical data visualization |
big_number_total | Emphasize a single metric or KPI at a specific point in time |
big_number | Big number with trendline showing recent metric changes |
funnel | Funnel chart for pipeline stages visualization |
gauge_chart | Gauge showing partial progress towards a specific number |
graph_chart | Nodes/circles with edges to visualize connected objects or events |
echarts_timeseries_line | Lines showing how metrics change over a dimension (e.g., time) |
mixed_timeseries | Multiple visualizations in a single chart with shared X-axis |
pie | Circular chart showing proportions as slices |
pivot_table_v2 | Aggregated table with grouped values across discrete categories |
radar | Visualize parallel metrics across multiple groups or categories |
sankey | Flow diagram showing relative metric size via flow line thickness |
echarts_timeseries_scatter | Dots showing how metrics change over a dimension |
smooth | Smoothed line chart connecting data points |
stepped_line | Line chart using 90-degree stepped lines |
table | Classic spreadsheet-like view of data or aggregated metrics |
tree_chart | Excel at visualizing hierarchy |
treemap | Scaled rectangles showing same metric across different groups |
Adding Charts to Dashboards
When creating a dashboard with charts via API, follow this sequence:
- Create the chart →
POST /api/v1/chart/withdatasource_id,viz_type,params - Create the dashboard →
POST /api/v1/dashboard/withdashboard_title - Link chart to dashboard →
PUT /api/v1/chart/{chart_id}with{"dashboards": [dashboard_id]} - Set dashboard layout →
PUT /api/v1/dashboard/{dashboard_id}withposition_json
Critical: Step 3 is required. The position_json defines layout but does NOT link the chart to the dashboard. You must explicitly update the chart's dashboards array to associate it with the dashboard, otherwise the chart will not render.
Example position_json structure:
{
"DASHBOARD_VERSION_KEY": "v2",
"ROOT_ID": {"type": "ROOT", "id": "ROOT_ID", "children": ["GRID_ID"]},
"GRID_ID": {"type": "GRID", "id": "GRID_ID", "children": ["ROW-1"], "parents": ["ROOT_ID"]},
"ROW-1": {"type": "ROW", "id": "ROW-1", "children": ["CHART-1"], "parents": ["ROOT_ID", "GRID_ID"]},
"CHART-1": {"type": "CHART", "id": "CHART-1", "children": [], "parents": ["ROOT_ID", "GRID_ID", "ROW-1"], "meta": {"chartId": <chart_id>, "width": 12, "height": 50}}
}Usage Pattern
- Obtain the Superset host URL from user
- Fetch Swagger spec from
http://<host>/swagger/v1to discover available endpoints - Authenticate to get access token and CSRF token
- Make API calls with appropriate headers
Refer to http://<host>/swagger/v1 for complete endpoint documentation, parameters, and response schemas.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

