curl --request GET \
--url https://paradigm.lighton.ai/api/v3/company/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://paradigm.lighton.ai/api/v3/company/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://paradigm.lighton.ai/api/v3/company/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"workspaces": 123,
"indexed_files": 123,
"retrieval_calls_30d": 123,
"top_workspaces": [
{
"name": "<string>",
"files": 123
}
],
"other_files": 123
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Get your company's activity metrics
Return activity metrics for the authenticated user’s own company: number of workspaces, number of indexed (embedded) documents, and the count of search + ask (RAG) calls across all of the company’s API keys over the last 30 days (served from the cached usage histogram).
Authorization: any authenticated member of the company. Instance admins reading another company should use the instance-level equivalent.
curl --request GET \
--url https://paradigm.lighton.ai/api/v3/company/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://paradigm.lighton.ai/api/v3/company/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://paradigm.lighton.ai/api/v3/company/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"workspaces": 123,
"indexed_files": 123,
"retrieval_calls_30d": 123,
"top_workspaces": [
{
"name": "<string>",
"files": 123
}
],
"other_files": 123
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Number of workspaces in the company.
Number of documents in the company that finished indexing (embedded).
Search + ask (RAG) calls across the company's API keys over the last 30 days.
Up to the 5 workspaces with the most indexed documents, largest first.
Show child attributes
Show child attributes
Indexed documents held by all workspaces beyond the top 5 (the 'Others' bucket).