Skip to main content
GET
/
v1
/
insights
/
queries
List saved queries
curl --request GET \
  --url https://public-api.sessionboard.com/v1/insights/queries \
  --header 'x-access-token: <api-key>'
import requests

url = "https://public-api.sessionboard.com/v1/insights/queries"

headers = {"x-access-token": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-access-token': '<api-key>'}};

fetch('https://public-api.sessionboard.com/v1/insights/queries', 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://public-api.sessionboard.com/v1/insights/queries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-access-token: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://public-api.sessionboard.com/v1/insights/queries"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-access-token", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://public-api.sessionboard.com/v1/insights/queries")
.header("x-access-token", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://public-api.sessionboard.com/v1/insights/queries")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-access-token"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "results": [
    {
      "id": "<string>",
      "name": "<string>",
      "query": "<string>",
      "category": "<string>",
      "eventId": 123
    }
  ],
  "pagination": {
    "currentPage": 123,
    "pageSize": 123,
    "totalPages": 123,
    "totalResults": 123
  }
}

Authorizations

x-access-token
string
header
required

Organization API token. Generate from Organization Settings → API Tokens.

Query Parameters

eventId
integer

Filter queries by event.

category
string

Filter queries by category.

page
integer

Page number.

limit
integer

Results per page.

Response

OK

results
object[]
pagination
object

Pagination metadata returned with list responses.