Folder
A Folder organizes dashboards within a project using a tree of folder and dashboard references.
It is defined as follows:
kind: "Folder"
metadata:
name: <string>
project: <string>
spec: <folder_specification>See the next sections for details about the folder specification and API endpoints.
Folder specification#
# Optional display name shown in the UI instead of metadata.name
display:
name: <string> # Optional
# Ordered tree of dashboards and subfolders
items:
- <FolderItem specification> # OptionalFolderItem specification#
Each item in spec.items describes either a subfolder or a dashboard reference:
# kind must be "Folder" or "Dashboard"
kind: <string>
# When kind is "Dashboard", name is the dashboard metadata.name in the same project.
# When kind is "Folder", name is the subfolder label in the tree.
name: <string>
# Nested items. Allowed only when kind is "Folder".
items:
- <FolderItem specification> # OptionalValidation rules#
When creating or updating a folder, Perses validates the tree:
- Each dashboard referenced in
spec.itemscan appear only once in that folder resource. - The same dashboard can be referenced in different folder resources within the same project.
- A
Dashboarditem cannot contain nesteditems. - Every item must have a non-empty
name. - Each item
kindmust beFolderorDashboard.
Example#
kind: "Folder"
metadata:
name: "platform"
project: "my-team"
spec:
display:
name: "Platform Monitoring"
items:
- kind: "Folder"
name: "kubernetes"
items:
- kind: "Dashboard"
name: "cluster-overview"
- kind: "Dashboard"
name: "global-health"API definition#
Get a list of Folder#
GET /api/v1/projects/<project_name>/foldersYou can also list folders across projects:
GET /api/v1/foldersURL query parameters:
name=<string>: filters folders based onmetadata.name(prefix match).project=<string>: filters folders by project (available onGET /api/v1/folders).metadata_only=<boolean>: whentrue, returns only folder metadata without the fullspec.
Get a single Folder#
GET /api/v1/projects/<project_name>/folders/<folder_name>Create a single Folder#
POST /api/v1/projects/<project_name>/foldersYou can also create a folder by posting to the global folders endpoint when metadata.project is set in the body:
POST /api/v1/foldersUpdate a single Folder#
PUT /api/v1/projects/<project_name>/folders/<folder_name>Delete a single Folder#
DELETE /api/v1/projects/<project_name>/folders/<folder_name>Deleting a folder removes the folder resource only. Referenced dashboards are not deleted.

