Get usage analytics
curl --request GET \
--url https://api.openworklabs.com/v1/telemetry/analytics \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/telemetry/analytics"
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/telemetry/analytics', 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/telemetry/analytics",
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/telemetry/analytics"
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/telemetry/analytics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/telemetry/analytics")
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{
"members": 123,
"pendingInvites": 123,
"activeMembers7d": 123,
"activeMembers30d": 123,
"sessions7d": 123,
"sessions30d": 123,
"tasksCompleted7d": 123,
"tasksFailed7d": 123,
"tasksCompleted30d": 123,
"tasksFailed30d": 123,
"avgTaskDurationMs30d": 123,
"weekly": [
{
"weekStart": "<string>",
"activeMembers": 123,
"sessions": 123,
"tasksCompleted": 123,
"tasksFailed": 123
}
],
"models": {
"usage30d": [
{
"id": "<string>",
"label": "<string>",
"sessions": 123
}
],
"selection30d": {
"default": 123,
"manual": 123
}
},
"daily": [
{
"day": "<string>",
"activeMembers": 123,
"sessions": 123,
"tasksCompleted": 123,
"tasksFailed": 123
}
]
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "enterprise_plan_required",
"feature": "<string>",
"message": "<string>"
}Telemetry
Get usage analytics
Returns Layer 1 (who is using AI) and Layer 2 (how often) analytics for the active org: member counts, active members, session and task volume in 7d/30d windows, average task duration, model usage and selection in 30d, and a 12-week trend of active members, sessions, and tasks. When daily trends are on for the organization, daily adds the same counts per UTC day for the last 30 days, today included.
GET
/
v1
/
telemetry
/
analytics
Get usage analytics
curl --request GET \
--url https://api.openworklabs.com/v1/telemetry/analytics \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/telemetry/analytics"
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/telemetry/analytics', 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/telemetry/analytics",
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/telemetry/analytics"
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/telemetry/analytics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/telemetry/analytics")
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{
"members": 123,
"pendingInvites": 123,
"activeMembers7d": 123,
"activeMembers30d": 123,
"sessions7d": 123,
"sessions30d": 123,
"tasksCompleted7d": 123,
"tasksFailed7d": 123,
"tasksCompleted30d": 123,
"tasksFailed30d": 123,
"avgTaskDurationMs30d": 123,
"weekly": [
{
"weekStart": "<string>",
"activeMembers": 123,
"sessions": 123,
"tasksCompleted": 123,
"tasksFailed": 123
}
],
"models": {
"usage30d": [
{
"id": "<string>",
"label": "<string>",
"sessions": 123
}
],
"selection30d": {
"default": 123,
"manual": 123
}
},
"daily": [
{
"day": "<string>",
"activeMembers": 123,
"sessions": 123,
"tasksCompleted": 123,
"tasksFailed": 123
}
]
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
],
"message": "<string>",
"capability": "<string>"
}{
"error": "unauthorized"
}{
"error": "enterprise_plan_required",
"feature": "<string>",
"message": "<string>"
}Authorizations
denApiKeybearerAuth
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
Required string length:
1 - 64Required string length:
1 - 128Response
Analytics returned.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?