cURL
curl -X GET "https://app.cotool.ai/api/org-metrics" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/org-metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cotool.ai/api/org-metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://app.cotool.ai/api/org-metrics")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/org-metrics"
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))
}{
"summary": {
"agentRuns": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"chats": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"githubPullRequestsCreated": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"githubPullRequestsUpdated": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"linesOfCodeAdded": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"linesOfCodeRemoved": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"scannerQueries": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"datadogQueries": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"sentinelOneQueries": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"splunkQueries": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"pantherQueries": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
}
},
"timeseries": {
"agentRuns": [
{
"date": "<string>",
"count": 123
}
],
"chats": [
{
"date": "<string>",
"count": 123
}
],
"githubPullRequestsCreated": [
{
"date": "<string>",
"count": 123
}
],
"githubPullRequestsUpdated": [
{
"date": "<string>",
"count": 123
}
],
"linesOfCodeAdded": [
{
"date": "<string>",
"count": 123
}
],
"linesOfCodeRemoved": [
{
"date": "<string>",
"count": 123
}
],
"scannerQueries": [
{
"date": "<string>",
"count": 123
}
],
"datadogQueries": [
{
"date": "<string>",
"count": 123
}
],
"sentinelOneQueries": [
{
"date": "<string>",
"count": 123
}
],
"splunkQueries": [
{
"date": "<string>",
"count": 123
}
],
"pantherQueries": [
{
"date": "<string>",
"count": 123
}
]
}
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>"
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>"
}Metrics
Get organization-level activity metrics
Returns summary counts and timeseries for agent runs, chats, and GitHub PR actions for the authenticated organization.
GET
/
api
/
org-metrics
cURL
curl -X GET "https://app.cotool.ai/api/org-metrics" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"import requests
url = "https://app.cotool.ai/api/org-metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cotool.ai/api/org-metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://app.cotool.ai/api/org-metrics")
.header("Authorization", "Bearer <token>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/org-metrics"
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))
}{
"summary": {
"agentRuns": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"chats": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"githubPullRequestsCreated": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"githubPullRequestsUpdated": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"linesOfCodeAdded": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"linesOfCodeRemoved": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"scannerQueries": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"datadogQueries": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"sentinelOneQueries": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"splunkQueries": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
},
"pantherQueries": {
"last7Days": 123,
"last30Days": 123,
"allTime": 123
}
},
"timeseries": {
"agentRuns": [
{
"date": "<string>",
"count": 123
}
],
"chats": [
{
"date": "<string>",
"count": 123
}
],
"githubPullRequestsCreated": [
{
"date": "<string>",
"count": 123
}
],
"githubPullRequestsUpdated": [
{
"date": "<string>",
"count": 123
}
],
"linesOfCodeAdded": [
{
"date": "<string>",
"count": 123
}
],
"linesOfCodeRemoved": [
{
"date": "<string>",
"count": 123
}
],
"scannerQueries": [
{
"date": "<string>",
"count": 123
}
],
"datadogQueries": [
{
"date": "<string>",
"count": 123
}
],
"sentinelOneQueries": [
{
"date": "<string>",
"count": 123
}
],
"splunkQueries": [
{
"date": "<string>",
"count": 123
}
],
"pantherQueries": [
{
"date": "<string>",
"count": 123
}
]
}
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>"
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>"
}Authorizations
API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here
Query Parameters
Time range for metrics (7d, 30d, all)
Available options:
7d, 30d, all Was this page helpful?
⌘I