Get sessions list
curl --request GET \
--url https://api.keyloroblox.xyz/sessions/list/{workspaceId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.keyloroblox.xyz/sessions/list/{workspaceId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.keyloroblox.xyz/sessions/list/{workspaceId}', 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://api.keyloroblox.xyz/sessions/list/{workspaceId}",
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-api-key: <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://api.keyloroblox.xyz/sessions/list/{workspaceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://api.keyloroblox.xyz/sessions/list/{workspaceId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.keyloroblox.xyz/sessions/list/{workspaceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodySessions
Retrieve Sessions
Retrieve a list of sessions for a workspace. Optionally return the session closest to a provided timestamp.
GET
/
sessions
/
list
/
{workspaceId}
Get sessions list
curl --request GET \
--url https://api.keyloroblox.xyz/sessions/list/{workspaceId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.keyloroblox.xyz/sessions/list/{workspaceId}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.keyloroblox.xyz/sessions/list/{workspaceId}', 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://api.keyloroblox.xyz/sessions/list/{workspaceId}",
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-api-key: <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://api.keyloroblox.xyz/sessions/list/{workspaceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://api.keyloroblox.xyz/sessions/list/{workspaceId}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.keyloroblox.xyz/sessions/list/{workspaceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyRetrieve Sessions
Use this endpoint to retrieve the sessions stored for a specific workspace. This is the primary read endpoint for sessions and is typically used to:- populate dashboards
- load recent session history
- locate the session closest to a given timestamp (using
start_time)
Endpoint
GET/sessions/list/{workspaceId}
Authentication
This endpoint requires a valid workspace API key. Include the API key in the request header:- Header:
x-api-key - Value:
<your-api-key>
Path Parameters
workspaceId (required)
The workspace identifier that owns the sessions table.
- Type:
string - Example:
b0a6c81e-2d5d-4f29-bb4b-9a1e0d9f6c11
Query Parameters
start_time (optional)
If provided, the API returns the session whose start_time is closest to the timestamp you send.
- Type:
string - Format:
date-time(ISO 8601) - Example:
2026-02-14T18:30:00Z
Behavior
This endpoint supports two retrieval modes.1) Default mode (full session history)
Whenstart_time is not provided:
- the API returns all sessions for the workspace
- results are ordered by
start_time DESC(most recent first)
2) Closest-session lookup
Whenstart_time is provided:
- the API calculates the absolute time difference between each stored session and the requested timestamp
- the API returns the single closest session
- results are ordered by smallest time difference
Note: This is not a range filter. Only the closest matching session is returned.
Example Requests
Retrieve all sessions Retrieve the closest session to a timestampResponses
200 OK
Returns an array of session records.
The response structure depends on your workspace session table (ws_sessions_{workspaceId}).
Example response (multiple sessions)
