Read task activity collected after the analytics choice
curl --request GET \
--url https://api.openworklabs.com/v1/inference/analytics/activity \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/inference/analytics/activity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/inference/analytics/activity', 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/inference/analytics/activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/inference/analytics/activity"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/inference/analytics/activity")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/inference/analytics/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"events": [
{
"id": "<string>",
"type": "task.started",
"timestamp": "2023-11-07T05:31:56Z",
"sessionId": "<string>",
"taskId": "<string>",
"memberId": "<string>",
"source": "app",
"callId": "<string>",
"durationMs": 4503599627370495,
"status": "completed",
"model": "<string>",
"provider": "<string>",
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"cacheWriteTokens": 4503599627370495,
"costUsd": 1,
"usageComplete": true,
"tool": "<string>",
"skill": "<string>",
"skillVersion": "<string>",
"mcp": "<string>",
"metadata": {}
}
],
"next": {
"before": "<string>",
"beforeId": "<string>"
}
}Inference
Read task activity collected after the analytics choice
Returns the task analytics events recorded for the organization over the last days days (default 30, max 90), newest first, 200 per page with a next cursor made of before + beforeId. Filter by memberId, taskId, or sessionId. Workspace owners and admins only; answers 403 models_analytics_unavailable while collection is disabled.
GET
/
v1
/
inference
/
analytics
/
activity
Read task activity collected after the analytics choice
curl --request GET \
--url https://api.openworklabs.com/v1/inference/analytics/activity \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/inference/analytics/activity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/inference/analytics/activity', 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/inference/analytics/activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/inference/analytics/activity"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/inference/analytics/activity")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/inference/analytics/activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"events": [
{
"id": "<string>",
"type": "task.started",
"timestamp": "2023-11-07T05:31:56Z",
"sessionId": "<string>",
"taskId": "<string>",
"memberId": "<string>",
"source": "app",
"callId": "<string>",
"durationMs": 4503599627370495,
"status": "completed",
"model": "<string>",
"provider": "<string>",
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"cacheWriteTokens": 4503599627370495,
"costUsd": 1,
"usageComplete": true,
"tool": "<string>",
"skill": "<string>",
"skillVersion": "<string>",
"mcp": "<string>",
"metadata": {}
}
],
"next": {
"before": "<string>",
"beforeId": "<string>"
}
}Authorizations
bearerAuthdenApiKey
Session token passed as Authorization: Bearer <session-token> for user-authenticated Den routes.
Query Parameters
Required range:
1 <= x <= 90Pattern:
^[a-zA-Z0-9_.:-]{1,128}$Pattern:
^[a-zA-Z0-9_.:-]{1,128}$Pattern:
^[a-zA-Z0-9_.:-]{1,128}$Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Pattern:
^[a-zA-Z0-9_.:-]{1,128}$Was this page helpful?