# Stats

# Get System Stats

GET
/stats

# Example Request

curl --location --request GET 'https://yourwebsite.com/api/login' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_key}' \
--header 'Authorization: Bearer {api_key}'

# Example Response

When currently authenticated user is administrator (has Admin role):

{
  "users_per_month": {
    "January": 0,
    "February": 0,
    "March": 1,
    "April": 0,
    "May": 0,
    "June": 0,
    "July": 0,
    "August": 2,
    "September": 0,
    "October": 0,
    "November": 0,
    "December": 0
  },
  "users_per_status": {
    "total": 3,
    "new": 2,
    "banned": 0,
    "unconfirmed": 1
  },
  "latest_registrations": [
    {
      "id": 123,
      "first_name": "John",
      "last_name": "Doe",
      "username": "johndoe",
      "email": "[email protected]",
      "phone": "+381641234567",
      "avatar": "http://yourwebsite.com/users/milos-avatar.jpg",
      "address": "Some random street, 123, Serbia",
      "country_id": 688,
      "role_id": 1,
      "status": "Active",
      "birthday": "1989-01-03",
      "last_login": "2017-04-27 16:47:59",
      "two_factor_country_code": 381,
      "two_factor_phone": "6412345678",
      "two_factor_options": {
        "option1": 4,
        "option2": "option value"
      },
      "created_at": "2017-04-20 16:47:59",
      "updated_at": "2017-04-27 10:47:59"
    },
    "..."
  ]
}

When currently authenticated user is not and administrator. Response will contain number of activities per day for last two weeks:

{
  "2019-08-07": 0,
  "2019-08-08": 0,
  "2019-08-09": 0,
  "2019-08-10": 0,
  "2019-08-11": 0,
  "2019-08-12": 0,
  "2019-08-13": 0,
  "2019-08-14": 0,
  "2019-08-15": 0,
  "2019-08-16": 6,
  "2019-08-17": 2,
  "2019-08-18": 4,
  "2019-08-19": 2,
  "2019-08-20": 0
}