Skip to main content
GET
/
data
/
projects
/
{projectId}
/
queries
/
folders
/
tree
Get Query Folder Tree
curl --request GET \
  --url https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/tree \
  --header 'Authorization: Bearer <token>'
{
  "tree": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Reports",
      "path": "/Reports",
      "children": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440001",
          "name": "Monthly",
          "path": "/Reports/Monthly",
          "children": [],
          "queries": []
        }
      ],
      "queries": [
        {
          "id": "709922802836177297",
          "displayName": "Revenue Report",
          "name": "revenuereport",
          "inputQuery": "SELECT * FROM revenue"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Use the Authorization header with the value 'Bearer ' to authenticate. Partner API Keys have full access; Project API Keys are limited to their project scope. Learn more: https://docs.peaka.com/api-reference/authentication

Path Parameters

projectId
string
required

ID of the Project

Query Parameters

includeQueries
boolean
default:false

Whether to include queries within each folder node

rootFolderId
string

ID of the root folder to start the subtree from

Response

200 - application/json

Folder tree retrieved successfully

Response containing the folder tree hierarchy

tree
object[]

Root-level nodes of the folder tree