Update Query Path
curl --request PATCH \
--url https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/{queryId}/path \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "/reports/monthly"
}
'import requests
url = "https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/{queryId}/path"
payload = { "path": "/reports/monthly" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '/reports/monthly'})
};
fetch('https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/{queryId}/path', 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/{queryId}/path",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'path' => '/reports/monthly'
]),
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/{queryId}/path"
payload := strings.NewReader("{\n \"path\": \"/reports/monthly\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/{queryId}/path")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"path\": \"/reports/monthly\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/{queryId}/path")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"path\": \"/reports/monthly\"\n}"
response = http.request(request)
puts response.read_bodyData -- Queries
Update Query Path
Moves a query to the specified folder path. The path is resolved by the backend service.
PATCH
/
data
/
projects
/
{projectId}
/
queries
/
{queryId}
/
path
Update Query Path
curl --request PATCH \
--url https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/{queryId}/path \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "/reports/monthly"
}
'import requests
url = "https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/{queryId}/path"
payload = { "path": "/reports/monthly" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '/reports/monthly'})
};
fetch('https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/{queryId}/path', 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/{queryId}/path",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'path' => '/reports/monthly'
]),
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/{queryId}/path"
payload := strings.NewReader("{\n \"path\": \"/reports/monthly\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/{queryId}/path")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"path\": \"/reports/monthly\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner.peaka.studio/api/v1/data/projects/{projectId}/queries/{queryId}/path")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"path\": \"/reports/monthly\"\n}"
response = http.request(request)
puts response.read_body

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
Body
application/json
Path Request
The path to place this query in (e.g. "/analytics/dashboards").
Response
200
Path updated
⌘I