Get platform-wide time series for admin dashboards (Admin only)
curl --request GET \
--url https://cloud-api.near.ai/v1/admin/platform/metrics/timeseries \
--header 'Authorization: Bearer <token>'import requests
url = "https://cloud-api.near.ai/v1/admin/platform/metrics/timeseries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud-api.near.ai/v1/admin/platform/metrics/timeseries', 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://cloud-api.near.ai/v1/admin/platform/metrics/timeseries",
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://cloud-api.near.ai/v1/admin/platform/metrics/timeseries"
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://cloud-api.near.ai/v1/admin/platform/metrics/timeseries")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud-api.near.ai/v1/admin/platform/metrics/timeseries")
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{
"data": [
{
"active_organizations": 123,
"cost_usd": 123,
"date": "<string>",
"new_organizations": 123,
"new_users": 123,
"non_verifiable_cost_usd": 123,
"requests": 123,
"tokens": 123,
"verifiable_cost_usd": 123
}
],
"granularity": "<string>",
"period_end": "2023-11-07T05:31:56Z",
"period_start": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}Admin
Get platform-wide time series for admin dashboards (Admin only)
Returns per-bucket requests, tokens, cost (paid/granted + verifiable/external splits), active organizations, and new signups for growth/mix trend charts.
GET
/
v1
/
admin
/
platform
/
metrics
/
timeseries
Get platform-wide time series for admin dashboards (Admin only)
curl --request GET \
--url https://cloud-api.near.ai/v1/admin/platform/metrics/timeseries \
--header 'Authorization: Bearer <token>'import requests
url = "https://cloud-api.near.ai/v1/admin/platform/metrics/timeseries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud-api.near.ai/v1/admin/platform/metrics/timeseries', 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://cloud-api.near.ai/v1/admin/platform/metrics/timeseries",
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://cloud-api.near.ai/v1/admin/platform/metrics/timeseries"
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://cloud-api.near.ai/v1/admin/platform/metrics/timeseries")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud-api.near.ai/v1/admin/platform/metrics/timeseries")
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{
"data": [
{
"active_organizations": 123,
"cost_usd": 123,
"date": "<string>",
"new_organizations": 123,
"new_users": 123,
"non_verifiable_cost_usd": 123,
"requests": 123,
"tokens": 123,
"verifiable_cost_usd": 123
}
],
"granularity": "<string>",
"period_end": "2023-11-07T05:31:56Z",
"period_start": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
JWT access token for user authentication (Authorization: Bearer <jwt_token>). Create via POST /users/me/access_tokens.
Query Parameters
Start of time range (ISO 8601). Defaults to 30 days ago.
End of time range (ISO 8601). Defaults to now.
Time granularity: hour, day (default), week, or month