Statistics
Key, domain and account counts for dashboards and alerts.
Counts are computed live from your software.
Keep in mind
- Overview
get-overview-statsadds up keys, domains and client accounts.- Per software
get-soft-statssplits keys into active, paused, blocked and expired.
Get overview statistics
POST
https://dev.mod.wtf/api/v2/action
methodget-overview-stats
Software totals: keys, domains and client accounts.
Body
-
soft_idinteger optionalID of a software you own; your main software when omitted
Errors it can return
POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json
{
"api_key": "YOUR_API_KEY",
"method": "get-overview-stats"
}
curl -sS -X POST 'https://dev.mod.wtf/api/v2/action' \
-H 'Content-Type: application/json' \
-d '{
"api_key": "YOUR_API_KEY",
"method": "get-overview-stats"
}'
const response = await fetch("https://dev.mod.wtf/api/v2/action", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"api_key": "YOUR_API_KEY",
"method": "get-overview-stats"
}),
});
const result = await response.json();
$ch = curl_init('https://dev.mod.wtf/api/v2/action');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'api_key' => 'YOUR_API_KEY',
'method' => 'get-overview-stats',
]),
]);
$result = json_decode(curl_exec($ch), true);
import requests
response = requests.post(
"https://dev.mod.wtf/api/v2/action",
json={
"api_key": "YOUR_API_KEY",
"method": "get-overview-stats",
},
timeout=10,
)
result = response.json()
{
"ok": true,
"data": {
"scope": "own",
"softs_count": 1,
"keys_total": 150,
"keys_active": 120,
"custom_domains": 2,
"users_count": 8
}
}
{
"ok": false,
"error": "unauthorized",
"message": "Invalid or missing api_key"
}
Get software statistics
POST
https://dev.mod.wtf/api/v2/action
methodget-soft-stats
Software key counts: total, active, paused, blocked and expired.
Body
-
soft_idinteger requiredID of a software you own
Errors it can return
POST /api/v2/action HTTP/1.1
Host: dev.mod.wtf
Content-Type: application/json
Accept: application/json
{
"api_key": "YOUR_API_KEY",
"method": "get-soft-stats",
"soft_id": 123
}
curl -sS -X POST 'https://dev.mod.wtf/api/v2/action' \
-H 'Content-Type: application/json' \
-d '{
"api_key": "YOUR_API_KEY",
"method": "get-soft-stats",
"soft_id": 123
}'
const response = await fetch("https://dev.mod.wtf/api/v2/action", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"api_key": "YOUR_API_KEY",
"method": "get-soft-stats",
"soft_id": 123
}),
});
const result = await response.json();
$ch = curl_init('https://dev.mod.wtf/api/v2/action');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'api_key' => 'YOUR_API_KEY',
'method' => 'get-soft-stats',
'soft_id' => 123,
]),
]);
$result = json_decode(curl_exec($ch), true);
import requests
response = requests.post(
"https://dev.mod.wtf/api/v2/action",
json={
"api_key": "YOUR_API_KEY",
"method": "get-soft-stats",
"soft_id": 123,
},
timeout=10,
)
result = response.json()
{
"ok": true,
"data": {
"soft": {
"id": 123,
"name": "MyCheats"
},
"keys": {
"total": 150,
"active": 120,
"paused": 10,
"blocked": 5,
"expired": 15
},
"custom_domains_count": 2
}
}
{
"ok": false,
"error": "not_found",
"message": "soft not found or not yours"
}
{
"ok": false,
"error": "unauthorized",
"message": "Invalid or missing api_key"
}