Core
  1. Statistics
Core
  • Introduction
    • What is Core
    • HTTP Statuses
    • Request
    • Responses
    • Meta
    • Limit & Pagination
    • Query Parameters
  • Quick Start
    • Letters
  • Auth
    • Sign In with Email and Password
      POST
    • Get the Current Session
      GET
    • Sign Out the Current User
      POST
  • Users
    • Get All Users
      GET
    • Create a User
      POST
    • Retrieve an Existing User
      GET
    • Delete an Existing User
      DELETE
    • Update an Existing User
      PATCH
    • Get Current User
      GET
    • Update Current User
      PATCH
    • Get Current User Devices
      GET
    • Retrieve User Devices by User ID
      GET
    • Update Own Profile Image
      POST
    • Update User Image
      POST
    • Reset User Password
      PATCH
    • Get User Login History
      GET
  • Staff
    • Get All Staff
    • Retrieve an Existing Staff
    • Create a Staff
    • Delete an Existing Staff
    • Update an Existing Staff
  • Teachers
    • Get All Teachers
    • Retrieve an Existing Teacher
    • Create a Teacher
    • Delete an Existing Teacher
    • Update an Existing Teacher
  • Students
    • Get All Students
    • Retrieve an Existing Student
    • Create a Student
    • Delete an Existing Student
    • Update an Existing Student
    • Import Bulk Students
  • Roles
    • Get All Roles
    • Create a Role
    • Retrieve an Existing Role
    • Update an Existing Role
    • Delete an Existing Role
    • Get All Eligible Users for Role
    • Get All Members of Role
    • Add Bulk Member to Role
    • Remove Bulk Members from Role
  • Classes
    • Get All Classes
    • Create a Class
    • Delete an Existing Student Copy
    • Create a Class Copy
  • Statistics
    • Teachers
      • Get Teacher Gender Stats
      • Get Teacher Religion Distribution
      • Get Teacher Employment Stats
      • Get Teacher Age Stats
    • Students
      • Get Student Gender Stats
      • Get Student Religion Distribution
      • Get Student Weight Stats
      • Get Student Height Stats
      • Get Student Age Stats
      • Get Student Transportation Stats
      • Get Student Class Stats
    • Staffs
      • Get Staffs Gender Stats
      • Get Staffs Religion Distribution
      • Get Staffs Age Stats
      • Get Staffs Employment Stats
    • Users
      • Retrieve User Summary
    • Get All Stats
      GET
  • Letters
    • Get All Letters
    • Retrieve an Existing Letter
    • Create a Letter
    • List User Letter
    • List Current User Letter
    • List Recipients
  • Letter Actions
    • Initiate a Letter Action
  • Files
    • Create a Presigned URL
  • Schemas
    • Schemas
      • Letter
        • LetterHistory
        • LetterStatus
        • LetterType
      • User
        • UserProfile
      • Address
      • Meta
      • Base
      • bloodType
      • Religion
      • Gender
      • ParentInfo
      • Error
      • GenderStats
      • ReligionDistribution
      • WeightStats
      • HeightStats
      • AgeStats
      • TransportationStats
      • ClassStats
      • EducationHistoryObject
      • EmploymentStats
      • Location
      • EconomyStats
      • Actor
    • Model
      • User
      • Teacher
      • Staff
      • Student
      • Letter
      • Class
      • Roles
    • LoginHistory
  1. Statistics

Get All Stats

Developing
GET
/stats
Returns the array of summary, staffs, teachers, and students data.

Request

None

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://sims.sman1samarinda.sch.id/api/stats'

Responses

🟢200OK
application/json
Body

Example
{
    "success": true,
    "message": "OK.",
    "meta": {},
    "errors": [],
    "result": {
        "students": {
            "total": 1043,
            "gender": {
                "male": 120,
                "female": 120,
                "malePercentage": 50,
                "femalePercentage": 50
            },
            "religion": [
                {
                    "religion": "ISLAM",
                    "count": 150,
                    "percentage": 68.2
                },
                {
                    "religion": "ISLAM",
                    "count": 150,
                    "percentage": 68.2
                },
                {
                    "religion": "ISLAM",
                    "count": 150,
                    "percentage": 68.2
                }
            ],
            "weight": {
                "averageWeight": 48.7,
                "minWeight": 30,
                "maxWeight": 90,
                "weightRanges": [
                    {
                        "range": "41-50 kg",
                        "count": 5
                    }
                ]
            },
            "height": {
                "averageHeight": 155.6,
                "minHeight": 140,
                "maxHeight": 170,
                "heightRanges": [
                    {
                        "range": "141-150 cm",
                        "count": 8
                    },
                    {
                        "range": "141-150 cm",
                        "count": 8
                    },
                    {
                        "range": "141-150 cm",
                        "count": 8
                    }
                ]
            },
            "age": {
                "averageAge": 16.5,
                "minAge": 15,
                "maxAge": 18,
                "ageRanges": [
                    {
                        "age": 15,
                        "count": 40
                    },
                    {
                        "age": 15,
                        "count": 40
                    }
                ]
            },
            "transportation": [
                {
                    "transportType": "Sepeda Motor",
                    "count": 100,
                    "percentage": 31.8
                }
            ],
            "class": [
                {
                    "className": "X MIPA 2",
                    "studentCount": 30,
                    "educationLevel": 7
                },
                {
                    "className": "X MIPA 2",
                    "studentCount": 30,
                    "educationLevel": 7
                }
            ]
        },
        "teachers": {
            "total": 73,
            "gender": {
                "male": 120,
                "female": 120,
                "malePercentage": 50,
                "femalePercentage": 50
            },
            "religion": [
                {
                    "religion": "ISLAM",
                    "count": 150,
                    "percentage": 68.2
                },
                {
                    "religion": "ISLAM",
                    "count": 150,
                    "percentage": 68.2
                },
                {
                    "religion": "ISLAM",
                    "count": 150,
                    "percentage": 68.2
                }
            ],
            "age": {
                "averageAge": 16.5,
                "minAge": 15,
                "maxAge": 18,
                "ageRanges": [
                    {
                        "age": 15,
                        "count": 40
                    },
                    {
                        "age": 15,
                        "count": 40
                    },
                    {
                        "age": 15,
                        "count": 40
                    }
                ]
            },
            "employment": [
                {
                    "name": "PPPK",
                    "count": "18"
                }
            ]
        },
        "staff": {
            "total": 13,
            "gender": {
                "male": 120,
                "female": 120,
                "malePercentage": 50,
                "femalePercentage": 50
            },
            "religion": [
                {
                    "religion": "ISLAM",
                    "count": 150,
                    "percentage": 68.2
                },
                {
                    "religion": "ISLAM",
                    "count": 150,
                    "percentage": 68.2
                }
            ],
            "age": {
                "averageAge": 16.5,
                "minAge": 15,
                "maxAge": 18,
                "ageRanges": [
                    {
                        "age": 15,
                        "count": 40
                    },
                    {
                        "age": 15,
                        "count": 40
                    }
                ]
            },
            "employment": [
                {
                    "name": "PNS",
                    "count": "11"
                },
                {
                    "name": "PPPK",
                    "count": "80"
                }
            ]
        },
        "classes": {
            "total": 36
        }
    }
}
🟠401Unauthorized
🟠403Forbidden
🔴500Server Error
Modified at 2025-10-30 10:58:38
Previous
Retrieve User Summary
Next
Get All Letters
Built with