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"
]
}
'import requests
url = "https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}"
payload = {
"queryIdsAdded": ["709922802836177297"],
"queryIdsRemoved": ["709891320440684892"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({queryIdsAdded: ['709922802836177297'], queryIdsRemoved: ['709891320440684892']})
};
fetch('https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'queryIdsAdded' => [
'709922802836177297'
],
'queryIdsRemoved' => [
'709891320440684892'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}"
payload := strings.NewReader("{\n \"queryIdsAdded\": [\n \"709922802836177297\"\n ],\n \"queryIdsRemoved\": [\n \"709891320440684892\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"queryIdsAdded\": [\n \"709922802836177297\"\n ],\n \"queryIdsRemoved\": [\n \"709891320440684892\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"queryIdsAdded\": [\n \"709922802836177297\"\n ],\n \"queryIdsRemoved\": [\n \"709891320440684892\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"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>",
"schedule": {
"type": "cron",
"cronExpression": "0 0 * * *",
"timezone": "UTC"
},
"path": "<string>",
"folderId": "<string>"
}
]
}{
"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>",
"schedule": {
"type": "cron",
"cronExpression": "0 0 * * *",
"timezone": "UTC"
},
"path": "<string>",
"folderId": "<string>"
}
]
}Add/Remove Queries In/From Folder
Moves queries into or out of a folder. Queries in queryIdsAdded are moved to the folder’s path, queries in queryIdsRemoved are moved to root (”/”).
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"
]
}
'import requests
url = "https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}"
payload = {
"queryIdsAdded": ["709922802836177297"],
"queryIdsRemoved": ["709891320440684892"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({queryIdsAdded: ['709922802836177297'], queryIdsRemoved: ['709891320440684892']})
};
fetch('https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'queryIdsAdded' => [
'709922802836177297'
],
'queryIdsRemoved' => [
'709891320440684892'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}"
payload := strings.NewReader("{\n \"queryIdsAdded\": [\n \"709922802836177297\"\n ],\n \"queryIdsRemoved\": [\n \"709891320440684892\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"queryIdsAdded\": [\n \"709922802836177297\"\n ],\n \"queryIdsRemoved\": [\n \"709891320440684892\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/folders/{folderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"queryIdsAdded\": [\n \"709922802836177297\"\n ],\n \"queryIdsRemoved\": [\n \"709891320440684892\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"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>",
"schedule": {
"type": "cron",
"cronExpression": "0 0 * * *",
"timezone": "UTC"
},
"path": "<string>",
"folderId": "<string>"
}
]
}{
"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>",
"schedule": {
"type": "cron",
"cronExpression": "0 0 * * *",
"timezone": "UTC"
},
"path": "<string>",
"folderId": "<string>"
}
]
}

Authorizations
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
ID of the Project
ID of the Query Folder
Body
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.
Response
Queries moved successfully
A folder with its direct child folders and queries
Unique identifier of the folder (UUID)
Display name of the folder
Full path of the folder in the hierarchy
ID of the parent folder, null if root-level
Timestamp when the folder was created (ISO 8601)
Direct child folders
Show child attributes
Show child attributes
Queries contained in this folder
Show child attributes
Show child attributes