curl --request GET \
--url https://api.openworklabs.com/v1/headless/sessions \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/headless/sessions"
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.openworklabs.com/v1/headless/sessions', 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.openworklabs.com/v1/headless/sessions",
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.openworklabs.com/v1/headless/sessions"
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.openworklabs.com/v1/headless/sessions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/headless/sessions")
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_body{
"sessions": [
{
"sessionId": "<string>",
"memberId": "<string>",
"kind": "workbot",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"hotBytes": 0,
"segmentCount": 0,
"totalBytes": 0,
"activeTurnSince": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"retentionClass": "<string>",
"legalHold": true,
"lastReportedAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}List the organization's Workbot, Slack and Automation conversations (content-free)
The organization’s conversations on the headless runner as Den’s session index knows them, most recently updated first: the member (null when the conversation belongs to none), the kind (workbot, slack or automation), when it was created and last updated, its hot and total stored bytes and sealed segment count, when its running turn started (activeTurnSince, null when idle; a long-running value can mean a stuck turn), when it was deleted, and Den’s retention class and legal hold. Never a title, a message or anything else a conversation contains. Filter by memberId, kind, active (true: a turn is running) and deleted (exclude by default, include or only). Paged: up to limit rows (default 50, at most 200), then pass nextCursor as cursor. Members with the View usage analytics permission only (owners and admins by default), while the session index is on for the organization.
curl --request GET \
--url https://api.openworklabs.com/v1/headless/sessions \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/headless/sessions"
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.openworklabs.com/v1/headless/sessions', 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.openworklabs.com/v1/headless/sessions",
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.openworklabs.com/v1/headless/sessions"
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.openworklabs.com/v1/headless/sessions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/headless/sessions")
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_body{
"sessions": [
{
"sessionId": "<string>",
"memberId": "<string>",
"kind": "workbot",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"hotBytes": 0,
"segmentCount": 0,
"totalBytes": 0,
"activeTurnSince": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"retentionClass": "<string>",
"legalHold": true,
"lastReportedAt": "2023-11-07T05:31:56Z"
}
],
"nextCursor": "<string>"
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Organization API key passed as the x-api-key header. The raw key is the header value; do not prefix it with Bearer.
Query Parameters
1 - 64workbot, slack, automation true, false exclude, include, only 1 <= x <= 2001 - 512Was this page helpful?