Skip to content

C242-PS148/CloudComputing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudComputing

Dokumentasi Learning Path Cloud Computing

Link Deploy: https://checkmate-506488875993.asia-southeast2.run.app

Dokumentasi API's

Endpoint Register Metode POST: https://checkmate-506488875993.asia-southeast2.run.app/api/register

Request Body Form-data: image

Response:

201 Created

{

"status": "success",

"message": "User registered successfully"

}

400 Bad Request

{

"status": "error",

"message": "Email already exists"

}

500 Internal Server Error

{

"status": "error",

"message": ""

}

Endpoint Login Metode POST: https://checkmate-506488875993.asia-southeast2.run.app/api/login

Headers bearer

Request Body:

{

"email": "zain",

"password": "password123"

}

Respons 201 Create:

{

"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTczMzgzNjQzOCwianRpIjoiNDNhMzA4ZTYtNmIyZS00MWQ2LWE0NTAtODUyZWVkMmM0MmVhIiwidHlwZSI6ImFjY2VzcyIsInN1YiI6InphaW4iLCJuYmYiOjE3MzM4MzY0MzgsImNzcmYiOiJkYjRkYzAzNC1iMDMzLTQ4ZmYtYWViZi0wOWJmMWNlZWFmMzgiLCJleHAiOjE3MzM4NDM2Mzh9.0OXNrJbzKcLRqHBJRnwVRVH91PCjjUNd9UKuj9_B9m4",

"message": "Login successful",

"status": "success",

"user": {

    "email": "zain@gmail.com",
    
    "role": "siswa",
    
    "student_number": null,
    
    "username": "zain"
    
}

}

401 Unauthorized

{

"status": "error",

"message": "Invalid credentials"

}

500 Internal Server Error

{

"status": "error",

"message": ""

}

Endpoint Update Profile Metode PUT: https://checkmate-506488875993.asia-southeast2.run.app/api/update_profile

Headers: bearer

Request Body Form-data: image

Response

200 OK

{

"status": "success",

"message": "Profile updated successfully"

}

422 Unprocessable Entity

{

"status": "error",

"message": "Missing required fields: <field_name>"

}

500 Internal Server Error

{

"status": "error",

"message": ""

}

Endpoint Get Profile Metode GET: https://checkmate-506488875993.asia-southeast2.run.app/api/get_profile

Headers: bearer

Response

200 OK

{

"data": {

    "email": "joel@gmail.com",
    
    "profile_image": "https://storage.googleapis.com/storage-images-checkmate/profile_images/097b0957-e8de-4c98-ae27-8985403e4dab.png",
    
    "qualification": "Guru Tetap",
    
    "role": "guru",
    
    "student_number": "",
    
    "subject": "Matematika",
    
    "username": "joel"
    
},

"status": "success"

}

401 Unauthorized

{

"status": "error",

"message": "User not authenticated"

}

500 Internal Server Error

{

"status": "error",

"message": ""

}

Page Siswa

Endpoint Leaderboard Tertinggi GET: (hanya siswa yang bisa) https://checkmate-506488875993.asia-southeast2.run.app/api/leaderboard

Headers: bearer

Response:

{

"leaderboard": [

    {
    
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/210e96a4-2ae6-42bf-b7a5-6628568f18d9.jpg",
        
        "semester_total_point": 10,
        
        "student_id": 3,
        
        "student_name": "liza"
        
    },
    
    {
    
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/08bdd73a-0ba2-4638-af28-4d7f99233095.jpg",
        
        "semester_total_point": 0,
        
        "student_id": 5,
        
        "student_name": "zain"
        
    },
    
    {
    
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/9d6ea3df-6a0f-4a53-ae82-b188ab91f748.jpg",
        
        "semester_total_point": 0,
        
        "student_id": 4,
        
        "student_name": "nabila"
        
    }
    
],

"status": "success"

}

Endpoint Leaderboard Terendah GET: (hanya siswa yang bisa) https://checkmate-506488875993.asia-southeast2.run.app/api/leaderboard?sort_order=asc

Headers: bearer

Response:

{

"leaderboard": [

    {
    
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/08bdd73a-0ba2-4638-af28-4d7f99233095.jpg",
        
        "semester_total_point": 0,
        
        "student_id": 5,
        
        "student_name": "zain"
        
    },
    
    {
    
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/9d6ea3df-6a0f-4a53-ae82-b188ab91f748.jpg",
        
        "semester_total_point": 0,
        
        "student_id": 4,
        
        "student_name": "nabila"
        
    },
    
    {
    
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/210e96a4-2ae6-42bf-b7a5-6628568f18d9.jpg",
        
        "semester_total_point": 10,
        
        "student_id": 3,
        
        "student_name": "liza"
        
    }
    
],

"status": "success"

}

Endpoint Student Recap all model per tanggal GET: (hanya siswa yang bisa & siapa yang login) https://checkmate-506488875993.asia-southeast2.run.app/api/student-recap?date=2024-12-10

Headers: bearer

Response:

{

"recap_data": {

    "attendance_status": "Terlambat",
    
    "date": "2024-12-10 14:35:10",
    
    "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/08bdd73a-0ba2-4638-af28-4d7f99233095.jpg",
    
    "mood_status": "sad",
    
    "point": 10,
    
    "semester_total_point": 60,
    
    "student_id": 5,
    
    "tie_status": "Tidak Ada Dasi",
    
    "username": "zain"
    
},

"status": "success"

}

Endpoint Student Recap Model Absen per tanggal GET: (hanya siswa yang bisa & siapa yang login) https://checkmate-506488875993.asia-southeast2.run.app/api/student-recap/attendance-status?date=2024-12-12

Headers: bearer

Response:

{

"attendance_data": {

    "date": "2024-12-12 07:52:15",
    
    "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/08bdd73a-0ba2-4638-af28-4d7f99233095.jpg",

    "point": 10,
    
    "semester_total_point": 60,
    
    "status_absen": "Hadir",
    
    "student_id": 5,
    
    "username": "zain"
    
},

"status": "success"

}

Endpoint Student Recap Model Mood per tanggal GET: (hanya siswa yang bisa & siapa yang login) https://checkmate-506488875993.asia-southeast2.run.app/api/student-recap/mood-status?date=2024-12-12

Headers: bearer

Response:

{

"mood_data": {

    "date": "2024-12-12 07:52:15",
    
    "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/08bdd73a-0ba2-4638-af28-4d7f99233095.jpg",

    "point": 10,
    
    "semester_total_point": 60,
    
    "status_mood": "sad",
    
    "student_id": 5,
    
    "username": "zain"
    
},

"status": "success"

}

Endpoint Student Recap Model Atribut per tanggal GET: (hanya siswa yang bisa & siapa yang login) https://checkmate-506488875993.asia-southeast2.run.app/api/student-recap/tie-status?date=2024-12-10

Headers: bearer

Response:

{

"status": "success",

"tie_data": {

    "date": "2024-12-12 07:52:15",
    
    "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/08bdd73a-0ba2-4638-af28-4d7f99233095.jpg",

    "point": 10,
    
    "semester_total_point": 60,
    
    "status_dasi": "Tidak Ada Dasi",

    "student_id": 5,
    
    "username": "zain"
    
}

}

Page Guru

Endpoint Guru Recap Absen Siswa GET: (hanya guru yang bisa)

https://checkmate-506488875993.asia-southeast2.run.app/api/attendance-status

Headers: bearer

Response:

{

"attendance_status_data": [

    {
    
        "date": "2024-12-10 20:55:43",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/07180d83-0aab-4468-969b-c28823484640.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_absen": "Terlambat",
        
        "student_id": 4,
        
        "username": "nabila"
        
    },
    
    {
    
        "date": "2024-12-10 20:55:33",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/ca86eb39-9002-47c8-858e-5994d607e210.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_absen": "Terlambat",
        
        "student_id": 5,
        
        "username": "zain"
        
    },
    
    {

        "date": "2024-12-10 20:55:13",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/67139251-a253-4395-9997-f1faeea93e25.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_absen": "Terlambat",
        
        "student_id": 3,
        
        "username": "liza"
        
    }
    
],

"debug_info": {

    "queried_date": "All dates",
    
    "total_records": 3
    
},

"status": "success"

}

Endpoint Guru Recap Mood Siswa GET: (hanya guru yang bisa) https://checkmate-506488875993.asia-southeast2.run.app/api/mood-status

Headers: bearer

Response:

{

"debug_info": {

    "queried_date": "All dates",
    
    "total_records": 3
    
},

"mood_status_data": [

    {

        "date": "2024-12-10 20:55:43",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/07180d83-0aab-4468-969b-c28823484640.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_mood": "sad",
        
        "student_id": 4,
        
        "username": "nabila"
        
    },
    
    {
    
        "date": "2024-12-10 20:55:33",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/ca86eb39-9002-47c8-858e-5994d607e210.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_mood": "sad",
        
        "student_id": 5,
        
        "username": "zain"
        
    },
    
    {
    
        "date": "2024-12-10 20:55:13",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/67139251-a253-4395-9997-f1faeea93e25.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_mood": "angry",
        
        "student_id": 3,
        
        "username": "liza"
        
    }
    
],

"status": "success"

}

Endpoint Guru Recap Atribut Siswa GET: (hanya guru yang bisa) https://checkmate-506488875993.asia-southeast2.run.app/api/tie-status

Headers: bearer

Respons:

{

"debug_info": {

    "queried_date": "All dates",
    
    "total_records": 3
    
},

"status": "success",

"tie_status_data": [

    {
    
        "date": "2024-12-10 20:55:43",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/07180d83-0aab-4468-969b-c28823484640.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_dasi": "Tidak Ada Dasi",
        
        "student_id": 4,
        
        "username": "nabila"
        
    },
    
    {
    
        "date": "2024-12-10 20:55:33",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/ca86eb39-9002-47c8-858e-5994d607e210.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_dasi": "Tidak Ada Dasi",
        
        "student_id": 5,
        
        "username": "zain"
        
    },
    
    {
    
        "date": "2024-12-10 20:55:13",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/67139251-a253-4395-9997-f1faeea93e25.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_dasi": "Tidak Ada Dasi",
        
        "student_id": 3,
        
        "username": "liza"
        
    }
    
]

}

Endpoint Guru Recap Seluruh Model Siswa GET: (hanya guru yang bisa) https://checkmate-506488875993.asia-southeast2.run.app/api/teacher-recap

Headers: bearer

Response:

{

"attendance_data": [

    {
    
        "date": "2024-12-10 20:55:43",

        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/07180d83-0aab-4468-969b-c28823484640.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_absen": "Terlambat",
        
        "status_dasi": "Tidak Ada Dasi",
        
        "status_mood": "sad",
        
        "student_id": 4,
        
        "username": "nabila"
        
    },
    
    {

        "date": "2024-12-10 20:55:33",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/ca86eb39-9002-47c8-858e-5994d607e210.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_absen": "Terlambat",

        "status_dasi": "Tidak Ada Dasi",
        
        "status_mood": "sad",
        
        "student_id": 5,
        
        "username": "zain"
        
    },
    
    {
    
        "date": "2024-12-10 20:55:13",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/67139251-a253-4395-9997-f1faeea93e25.jpg",

        "point": 0,
        
        "semester_total_point": 0,
        
        "status_absen": "Terlambat",
        
        "status_dasi": "Tidak Ada Dasi",
        
        "status_mood": "angry",
        
        "student_id": 3,
        
        "username": "liza"
        
    }
    
],

"debug_info": {

    "queried_date": "All dates",
    
    "total_records": 3
    
},

"status": "success"

}

Endpoint Predict All Metode POST: (hanya guru yang bisa) https://checkmate-506488875993.asia-southeast2.run.app/api/predict-all

Headers: bearer

Request:

Body form-data:

Content-Type: multipart/form-data

Body:

{

"file": "<image_file>"

}

Response:

{

"results": {

    "predict_absen": {
    
        "attendance_count": 0,
        
        "confidence": 0.9589236974716187,
        
        "datetime": "2024-12-10 20:55:42 +0700",
        
        "image_url": "https://checkmate-506488875993.asia-southeast2.run.app/storage/attendance_images/07180d83-0aab-4468-969b-c28823484640.jpg",
        
        "predicted_name": "nabila",
        
        "send_message": [
        
            "Siswa Nabila Terlambat dan (Tidak Ada Dasi) pada 2024-12-10 20:55:42 +0700."
            
        ],
        
        "status_absen": "Terlambat"

    },
    
    "predict_dasi": {
    
        "confidence": 1.0,
        
        "predicted_class": "Tidak Ada Dasi"
        
    },
    
    "predict_mood": {
    
        "class_probabilities": {
        
            "angry": 0.25641950964927673,
            
            "happy": 0.17951296269893646,
            
            "neutral": 0.1502477526664734,
            
            "sad": 0.4138197898864746
            
        },
        
        "confidence": 0.4138197898864746,
        
        "predicted_class_name": "sad"
        
    }
    
},

"status": "success"

}

Akun Guru Terdaftar:

Bisa menggunakan email atau username

"email": "joel@gmail.com"

"password": "password123"

"email": "yoga@gmail.com"

"password": "password123"

"email": "krisna@gmail.com"

"password": "password123"

"email": "mike@gmail.com"

"password": "password123"

Akun Siswa Terdaftar:

Bisa menggunakan email atau username

"email": "liza"

"password": "password123"

"email": "zain" "password": "password123"

"email": "nabila" "password": "password123"

About

Dokumentasi Learning Path Cloud Computing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published