Get Dashboard Stats
curl --request GET \
--url https://api.example.com/cabinet/admin/stats/dashboard \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/cabinet/admin/stats/dashboard"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/cabinet/admin/stats/dashboard', 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.example.com/cabinet/admin/stats/dashboard",
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.example.com/cabinet/admin/stats/dashboard"
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.example.com/cabinet/admin/stats/dashboard")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cabinet/admin/stats/dashboard")
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{
"nodes": {
"total": 123,
"online": 123,
"offline": 123,
"disabled": 123,
"total_users_online": 123,
"nodes": [
{
"uuid": "<string>",
"name": "<string>",
"address": "<string>",
"is_connected": true,
"is_disabled": true,
"users_online": 123,
"traffic_used_bytes": 123,
"uptime": "<string>",
"xray_version": "<string>",
"node_version": "<string>",
"last_status_message": "<string>",
"xray_uptime": "<string>",
"is_xray_running": true,
"cpu_count": 123,
"cpu_model": "<string>",
"total_ram": "<string>",
"country_code": "<string>"
}
]
},
"subscriptions": {
"total": 123,
"active": 123,
"trial": 123,
"paid": 123,
"expired": 123,
"purchased_today": 123,
"purchased_week": 123,
"purchased_month": 123,
"trial_to_paid_conversion": 123
},
"financial": {
"income_today_kopeks": 123,
"income_today_rubles": 123,
"income_month_kopeks": 123,
"income_month_rubles": 123,
"income_total_kopeks": 123,
"income_total_rubles": 123,
"subscription_income_kopeks": 123,
"subscription_income_rubles": 123
},
"servers": {
"total_servers": 123,
"available_servers": 123,
"servers_with_connections": 123,
"total_revenue_kopeks": 123,
"total_revenue_rubles": 123
},
"revenue_chart": [
{
"date": "<string>",
"amount_kopeks": 123,
"amount_rubles": 123
}
],
"tariff_stats": {
"tariffs": [
{
"tariff_id": 123,
"tariff_name": "<string>",
"active_subscriptions": 123,
"trial_subscriptions": 123,
"purchased_today": 123,
"purchased_week": 123,
"purchased_month": 123
}
],
"total_tariff_subscriptions": 123
}
}Cabinet Admin Stats
Get Dashboard Stats
Get complete dashboard statistics for admin panel.
GET
/
cabinet
/
admin
/
stats
/
dashboard
Get Dashboard Stats
curl --request GET \
--url https://api.example.com/cabinet/admin/stats/dashboard \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/cabinet/admin/stats/dashboard"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/cabinet/admin/stats/dashboard', 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.example.com/cabinet/admin/stats/dashboard",
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.example.com/cabinet/admin/stats/dashboard"
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.example.com/cabinet/admin/stats/dashboard")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/cabinet/admin/stats/dashboard")
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{
"nodes": {
"total": 123,
"online": 123,
"offline": 123,
"disabled": 123,
"total_users_online": 123,
"nodes": [
{
"uuid": "<string>",
"name": "<string>",
"address": "<string>",
"is_connected": true,
"is_disabled": true,
"users_online": 123,
"traffic_used_bytes": 123,
"uptime": "<string>",
"xray_version": "<string>",
"node_version": "<string>",
"last_status_message": "<string>",
"xray_uptime": "<string>",
"is_xray_running": true,
"cpu_count": 123,
"cpu_model": "<string>",
"total_ram": "<string>",
"country_code": "<string>"
}
]
},
"subscriptions": {
"total": 123,
"active": 123,
"trial": 123,
"paid": 123,
"expired": 123,
"purchased_today": 123,
"purchased_week": 123,
"purchased_month": 123,
"trial_to_paid_conversion": 123
},
"financial": {
"income_today_kopeks": 123,
"income_today_rubles": 123,
"income_month_kopeks": 123,
"income_month_rubles": 123,
"income_total_kopeks": 123,
"income_total_rubles": 123,
"subscription_income_kopeks": 123,
"subscription_income_rubles": 123
},
"servers": {
"total_servers": 123,
"available_servers": 123,
"servers_with_connections": 123,
"total_revenue_kopeks": 123,
"total_revenue_rubles": 123
},
"revenue_chart": [
{
"date": "<string>",
"amount_kopeks": 123,
"amount_rubles": 123
}
],
"tariff_stats": {
"tariffs": [
{
"tariff_id": 123,
"tariff_name": "<string>",
"active_subscriptions": 123,
"trial_subscriptions": 123,
"purchased_today": 123,
"purchased_week": 123,
"purchased_month": 123
}
],
"total_tariff_subscriptions": 123
}
}Authorizations
Response
200 - application/json
Successful Response
Complete dashboard statistics.
