Use Cases
- AI Agents: Let an agent file the queries and dashboards it creates into the right folder, without manual cleanup afterwards.
- Library Organization: Build a folder structure for a project or a client in one script.
- Team Workflows: Keep team folders consistent across many members and many queries.
- Cleanup: Find and remove old folders and the content inside them.
Behavior
- A folder belongs to a personal or team library. The API key decides which library you work in.
- Team folders need an editor or admin behind the API key to create, change, or delete them.
- Folder names are unique per parent folder. Creating a folder that already exists returns
409withfolder_already_existsand the ID of the existing folder, so a retry can use it. - Deleting a folder that still holds content returns
409withfolder_not_emptyand the counts, unless you passrecursive=true. A recursive delete archives the queries and dashboards inside, as it does in the Dune app.
List Folders
List folders at the top level or inside a parent folder, with item counts.
Get Folder
Get a folder with its subfolders, queries, and dashboards.
Create Folder
Create a folder at the top level or inside a parent folder.
Update Folder
Rename a folder or change its description, color, or icon.
Move Folder
Move a folder under another folder or to the top level.
Delete Folder
Delete a folder, or a folder and everything inside it.
Move Queries and Dashboards
File queries and dashboards into a folder, or take them out of folders.