Skip to content

Auth & Dashboard โ€‹

Base URL: https://your-domain.com/api/v1

All endpoints require HTTP Basic Authentication.

Auth โ€‹

Validate credentials โ€‹

POST /api/v1/auth/validate โ€” Confirm your Basic Auth credentials are accepted.

  • 200: { "success": "Authenticated", "api_user": "integration" }

Who am I โ€‹

GET /api/v1/auth/me โ€” Identity of the authenticated API user.

  • 200: { "api_user": "integration", "company": "Acme ISP", "whitelist_enabled": true, "version": "3.23.5" }

API status โ€‹

GET /api/v1/auth/status โ€” Whether the API is enabled + IP-whitelist state.

  • 200: { "api_enabled": true, "ip_whitelist": false }

Ping โ€‹

GET /api/v1/auth/ping โ€” Lightweight keep-alive.

  • 200: { "success": "pong", "time": "2026-07-04 12:00:00" }

Change API password โ€‹

POST /api/v1/auth/change_password โ€” Rotate the API password.

  • Params: current_password (required), new_password (required) (min 6)
  • 200: { "success": "API password updated." } ยท 400: current password incorrect

cURL

bash
curl -u "user:pass" "https://your-domain.com/api/v1/auth/me"

Dashboard โ€‹

Summary โ€‹

GET /api/v1/dashboard/summary โ€” Headline counters. Optional: isp_id.

  • 200:
json
{
    "total_subscribers": 5230, "active_subscribers": 4890, "expired_subscribers": 340,
    "online_now": 4120, "today_collection": 84500, "month_collection": 1920000, "open_tickets": 37
}

Revenue โ€‹

GET /api/v1/dashboard/revenue โ€” Time-series revenue.

  • Params: range (daily|monthly|yearly), date_from, date_to
  • 200: [ { "label": "2026-07-01", "amount": 84500 } ]

Subscriber growth โ€‹

GET /api/v1/dashboard/subscriber_growth โ€” New joins vs expirations per month.

  • 200: [ { "label": "2026-06", "new": 210, "left": 45 } ]

Online count โ€‹

GET /api/v1/dashboard/online_count โ€” Optional isp_id.

  • 200: { "online": 4120, "offline": 770 }

Expiring soon โ€‹

GET /api/v1/dashboard/expiring_soon โ€” Params: days (default 3), isp_id.

  • 200: { "count": 128, "days": 3 }

Collection breakdown โ€‹

GET /api/v1/dashboard/collection_breakdown โ€” Today's collection by payment method.

  • 200: [ { "method": "1", "amount": 42000 } ]

www.onezeroart.com