curl --request GET \
--url https://api.replicas.dev/v1/analytics/overview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.replicas.dev/v1/analytics/overview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.replicas.dev/v1/analytics/overview', 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.replicas.dev/v1/analytics/overview",
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.replicas.dev/v1/analytics/overview"
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.replicas.dev/v1/analytics/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/analytics/overview")
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{
"bucket": "day",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"points": [
{
"bucket": "<string>",
"prsOpened": 123,
"prsMerged": 123,
"prsClosed": 123
}
],
"rangeTotals": {
"workspacesCreated": 123,
"prsOpened": 123,
"prsMerged": 123,
"prsClosed": 123,
"computeMinutes": 123
},
"sources": [
{
"source": "<string>",
"count": 123
}
],
"usage": [
{
"bucket": "<string>",
"bySource": {},
"tokens": 123
}
],
"users": [
{
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"email": "<string>",
"avatarUrl": "<string>",
"computeMinutes": 123,
"prsOpened": 123,
"prsMerged": 123,
"topSource": "api",
"workspacesCreated": 123,
"sources": [
{
"source": "<string>",
"count": 123
}
],
"activity": [
{
"bucket": "2023-12-25",
"minutes": 123
}
]
}
],
"chatTurns": {
"totalSeconds": 123,
"agentProviders": [
{
"key": "<string>",
"label": "<string>",
"seconds": 123,
"tokens": 123,
"minutes": 123,
"workspaces": 123,
"turns": 123,
"credentialOwner": "<string>",
"credentialOwnerEmail": "jsmith@example.com",
"credentialOwnerAvatarUrl": "<string>"
}
],
"models": [
{
"key": "<string>",
"label": "<string>",
"seconds": 123,
"tokens": 123,
"minutes": 123,
"workspaces": 123,
"turns": 123,
"credentialOwner": "<string>",
"credentialOwnerEmail": "jsmith@example.com",
"credentialOwnerAvatarUrl": "<string>"
}
],
"credentials": [
{
"key": "<string>",
"label": "<string>",
"seconds": 123,
"tokens": 123,
"minutes": 123,
"workspaces": 123,
"turns": 123,
"credentialOwner": "<string>",
"credentialOwnerEmail": "jsmith@example.com",
"credentialOwnerAvatarUrl": "<string>"
}
]
},
"turnUsage": {
"automations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"tokens": 123,
"minutes": 123,
"workspaces": 123,
"turns": 123
}
],
"environments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"tokens": 123,
"minutes": 123,
"workspaces": 123,
"turns": 123
}
]
},
"skillCalls": [
{
"name": "<string>",
"calls": 123
}
],
"mcpCalls": [
{
"name": "<string>",
"calls": 123
}
],
"allTimeTotals": {
"workspacesCreated": 123,
"prsOpened": 123,
"prsMerged": 123,
"prsClosed": 123,
"computeMinutes": 123
}
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Get Analytics Overview
Returns an aggregated overview of organization activity for admins and members holding analytics:read: a per-bucket time series of pull requests opened, merged, and closed; compute-minute usage bucketed and broken down by workspace source; workspace counts grouped by source; inference usage ranked by coding harness, model, and credential with token, workspace, minute, and turn totals; skill and MCP call counts ranked by name; and a per-user leaderboard where each entry also carries that user’s workspace counts by source and their daily compute minutes in activity. Replicas support accounts that joined the organization are left out of the leaderboard. Totals come twice, as rangeTotals for the requested range and allTimeTotals for the organization’s whole history.
curl --request GET \
--url https://api.replicas.dev/v1/analytics/overview \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.replicas.dev/v1/analytics/overview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.replicas.dev/v1/analytics/overview', 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.replicas.dev/v1/analytics/overview",
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.replicas.dev/v1/analytics/overview"
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.replicas.dev/v1/analytics/overview")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/analytics/overview")
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{
"bucket": "day",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"points": [
{
"bucket": "<string>",
"prsOpened": 123,
"prsMerged": 123,
"prsClosed": 123
}
],
"rangeTotals": {
"workspacesCreated": 123,
"prsOpened": 123,
"prsMerged": 123,
"prsClosed": 123,
"computeMinutes": 123
},
"sources": [
{
"source": "<string>",
"count": 123
}
],
"usage": [
{
"bucket": "<string>",
"bySource": {},
"tokens": 123
}
],
"users": [
{
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"displayName": "<string>",
"email": "<string>",
"avatarUrl": "<string>",
"computeMinutes": 123,
"prsOpened": 123,
"prsMerged": 123,
"topSource": "api",
"workspacesCreated": 123,
"sources": [
{
"source": "<string>",
"count": 123
}
],
"activity": [
{
"bucket": "2023-12-25",
"minutes": 123
}
]
}
],
"chatTurns": {
"totalSeconds": 123,
"agentProviders": [
{
"key": "<string>",
"label": "<string>",
"seconds": 123,
"tokens": 123,
"minutes": 123,
"workspaces": 123,
"turns": 123,
"credentialOwner": "<string>",
"credentialOwnerEmail": "jsmith@example.com",
"credentialOwnerAvatarUrl": "<string>"
}
],
"models": [
{
"key": "<string>",
"label": "<string>",
"seconds": 123,
"tokens": 123,
"minutes": 123,
"workspaces": 123,
"turns": 123,
"credentialOwner": "<string>",
"credentialOwnerEmail": "jsmith@example.com",
"credentialOwnerAvatarUrl": "<string>"
}
],
"credentials": [
{
"key": "<string>",
"label": "<string>",
"seconds": 123,
"tokens": 123,
"minutes": 123,
"workspaces": 123,
"turns": 123,
"credentialOwner": "<string>",
"credentialOwnerEmail": "jsmith@example.com",
"credentialOwnerAvatarUrl": "<string>"
}
]
},
"turnUsage": {
"automations": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"tokens": 123,
"minutes": 123,
"workspaces": 123,
"turns": 123
}
],
"environments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"tokens": 123,
"minutes": 123,
"workspaces": 123,
"turns": 123
}
]
},
"skillCalls": [
{
"name": "<string>",
"calls": 123
}
],
"mcpCalls": [
{
"name": "<string>",
"calls": 123
}
],
"allTimeTotals": {
"workspacesCreated": 123,
"prsOpened": 123,
"prsMerged": 123,
"prsClosed": 123,
"computeMinutes": 123
}
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Authorizations
API key authentication. Obtain your API key from the Replicas dashboard under Organization → Settings → API Keys.
Query Parameters
Time bucket granularity for the returned series. Defaults to day.
day, week, month Inclusive start of the range as an ISO 8601 timestamp. Defaults to 30 days before end.
Exclusive end of the range as an ISO 8601 timestamp. Defaults to the current time.
Response
Successful response
Aggregated activity and usage metrics for an organization over a time range
Time bucket granularity of the returned series
day, week, month Inclusive start of the range as an ISO 8601 timestamp
Exclusive end of the range as an ISO 8601 timestamp
Show child attributes
Show child attributes
Totals over the requested range
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Per-user leaderboard for the range, ranked by compute minutes. Includes every current organization member except Replicas support accounts, which are omitted; users with no activity in the range report zeroes and a null top source
Show child attributes
Show child attributes
Inference usage over the requested range, ranked by coding harness, model, and credential; each row includes token, workspace, minute, and turn totals
Show child attributes
Show child attributes
Turn usage over the requested range, ranked independently by automation and environment name
Show child attributes
Show child attributes
Skill call counts over the requested range, ranked by skill name
Show child attributes
Show child attributes
MCP call counts over the requested range, ranked by server name
Show child attributes
Show child attributes
The same totals over the organization's whole history, ignoring the requested range
Show child attributes
Show child attributes