Back to Dashboard

XXMXLI API Documentation

Complete REST API reference for XXMXLI admin system

Overview

The XXMXLI API provides programmatic access to all admin panel functionality. This RESTful API uses JSON for data exchange and supports standard HTTP methods.

Base URL:

https://api.xxmxli.com/v1/

Content Type:

application/json

Authentication

All API requests require authentication using Bearer tokens. Include your token in the Authorization header.

POST /auth/login
Authenticate and receive an access token.

Request Body:

Parameter Type Required Description
username string Required Admin username
password string Required Admin password
Example Request
{
  "username": "xxmxli",
  "password": "your-secure-password"
}
Example Response 200 OK
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_in": 3600,
  "user": {
    "username": "xxmxli",
    "role": "admin"
  }
}
Authentication Header

Include the token in subsequent requests:

Authorization: Bearer {token}

User Management

Manage user accounts, roles, and permissions.

GET /users
Retrieve a list of all users with pagination support.

Query Parameters:

Parameter Type Required Description
page integer Optional Page number (default: 1)
limit integer Optional Items per page (default: 50, max: 100)
role string Optional Filter by role (admin, moderator, user)
Example Response 200 OK
{
  "users": [
    {
      "id": 1,
      "username": "xxmxli",
      "email": "admin@xxmxli.com",
      "role": "admin",
      "status": "active",
      "created_at": "2024-01-01T00:00:00Z",
      "last_login": "2024-08-10T14:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 1247,
    "pages": 25
  }
}
POST /users
Create a new user account.
Example Request
{
  "username": "newuser",
  "email": "newuser@example.com",
  "password": "secure-password",
  "role": "user"
}

Analytics

Access visitor statistics, page views, and performance metrics.

GET /analytics/stats
Get current analytics overview including visitors, page views, and performance metrics.
Example Response 200 OK
{
  "visitors": {
    "today": 1247,
    "yesterday": 1112,
    "change_percent": 12.1
  },
  "page_views": {
    "today": 3891,
    "yesterday": 3594,
    "change_percent": 8.3
  },
  "bounce_rate": 23.4,
  "avg_session_duration": "04:23"
}

Security

Monitor security status, blocked IPs, and security events.

GET /security/status
Get current security status and metrics.
Example Response 200 OK
{
  "status": "secure",
  "blocked_ips": 247,
  "failed_logins_24h": 12,
  "malware_detected": 0,
  "ssl_status": "valid",
  "last_scan": "2024-08-10T14:00:00Z"
}

System Status

Monitor system health, performance, and uptime metrics.

GET /system/health
Get system health status and performance metrics.
Example Response 200 OK
{
  "status": "operational",
  "uptime": "99.97%",
  "services": {
    "website": {
      "status": "online",
      "response_time": "23ms",
      "uptime": "99.9%"
    },
    "database": {
      "status": "online",
      "query_time": "2.1ms",
      "connections": 234
    }
  },
  "server": {
    "cpu_usage": "23%",
    "memory_usage": "67%",
    "disk_usage": "45%"
  }
}