Skip to main content
PUT
/
data
/
projects
/
{projectId}
/
queries
/
folders
/
{folderId}
Add/Remove Queries In/From Folder
curl --request PUT \
  --url https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "queryIdsAdded": [
    "709922802836177297"
  ],
  "queryIdsRemoved": [
    "709891320440684892"
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "path": "<string>",
  "parentId": "<string>",
  "createdAt": "<string>",
  "folders": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Monthly Reports",
      "path": "/reports/monthly",
      "parentId": "550e8400-e29b-41d4-a716-446655440001",
      "createdAt": "2025-01-15T10:30:00Z"
    }
  ],
  "queries": [
    {
      "id": "<string>",
      "displayName": "<string>",
      "name": "<string>",
      "inputQuery": "<string>",
      "inputQueryRefId": "<string>",
      "queryType": "<string>",
      "schedule": {
        "expression": "<string>"
      },
      "path": "<string>",
      "folderId": "<string>"
    }
  ]
}

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

folderId
string
required

ID of the Query Folder

Body

application/json

Query add/remove request

Request body for updating a query folder (adding/removing query IDs).

Both lists are initialised to empty {@link ArrayList ArrayList}s so the serialised JSON always contains "queryIdsAdded": [...] and "queryIdsRemoved": [...]. The search service requires both fields to be present (non-null) and rejects null with a validation error.

queryIdsAdded
string[]
queryIdsRemoved
string[]

Response

Queries moved successfully

A folder with its direct child folders and queries

id
string

Unique identifier of the folder (UUID)

name
string

Display name of the folder

path
string

Full path of the folder in the hierarchy

parentId
string

ID of the parent folder, null if root-level

createdAt
string

Timestamp when the folder was created (ISO 8601)

folders
object[]

Direct child folders

queries
object[]

Queries contained in this folder