JobNetra Api
api ini adalah bagian dari aplikasi JobNetra yang digunakan untuk mengelola pengguna, otentikasi, dan prediksi keterampilan.
Endpoint
Register
- URL:
/register
- Method: POST
-
Request Body:
name
asstring
-
email
asstring
, must be unique -
password
asstring
, must be at least 8 characters -
password_confirmation
asstring
, must be at least 8 characters -
device_name
asstring
, sesuaikan dengna perangkat yang digunakan
-
Response:
{ "massage": "User created successfully", "user": { "name": "John Doe", "email": "johndeo@email.com", "updated_at": "2025-06-05T12:46:47.000000Z", "created_at": "2025-06-05T12:46:47.000000Z", "id": 3 } }
Login
- URL:
/login
- Method: POST
-
Request Body:
email
asstring
password
asstring
-
device_name
asstring
, sesuaikan dengna perangkat yang digunakan
-
Response:
{ "token": "5|u4cVRYhfhRXhbxUBMXAuHXYTsq7B9pP4xDpz6fhZ5afc9369", "user": { "id": 2, "name": "John Doe", "email": "admin@email.com", "email_verified_at": null, "created_at": "2025-05-29T14:23:05.000000Z", "updated_at": "2025-06-05T09:15:51.000000Z" } }
Logout
- URL:
/logout
- Method: DELETE
-
Headers:
Authorization: Bearer YOUR_AUTH_TOKEN
-
Response:
{ "error": false, "message": "Successfully logged out" }
Get History
- URL:
/history
- Method: GET
-
Headers:
Authorization: Bearer YOUR_AUTH_TOKEN
-
Response:
{ "message": "Latest log retrieved successfully", "data": { "id": 8, "user_id": 2, "input_skills": "aaabbbccc, ay,am , sapi, kambing, java script", "result": "{\"input_skills\": \"aaabbbccc, ay,am , sapi, kambing, java script\", \"top_predictions\": [{\"label\": \"Registered Nurse\", \"probability\": 0.007284968625754118}, {\"label\": \"Nurse Manager\", \"probability\": 0.006996749434620142}, {\"label\": \"Substance Abuse Counselor\", \"probability\": 0.0069910516031086445}]}", "timestamp": "2025-06-05 15:41:21", "created_at": "2025-06-05T15:41:21.000000Z", "updated_at": "2025-06-05T15:41:21.000000Z" } }
Reset Password (Email Link)
- URL:
/resetPassword
- Method: POST
-
Request Body:
-
email
asstring
- The email of the user who forgot their password.
-
-
Response:
{ "error": false, "message": "Password reset link sent to your email." }
Set New Password (from Email Link)
- URL:
/NewPassword
- Method: POST
-
Request Body:
-
token
asstring
- The token received in the password reset email. -
email
asstring
- The email of the user. -
password
asstring
- The new password (at least 8 characters). -
password_confirmation
asstring
- Confirmation of the new password.
-
-
Response:
{ "error": false, "message": "Password has been reset successfully." }
Change Password (Authenticated User)
- URL:
/changepassword
- Method: patch
-
Headers:
Authorization: Bearer YOUR_AUTH_TOKEN
-
Request Body:
-
current_password
asstring
- The user's current password. -
new_password
asstring
- The new password (at least 8 characters). -
new_password_confirmation
asstring
- Confirmation of the new password.
-
-
Response:
{ "error": false, "message": "Password changed successfully." }
Predict Skill
- URL:
/predict
- Method: POST
-
Headers:
Authorization: Bearer YOUR_AUTH_TOKEN
-
Request Body:
The specific structure of the request body for prediction needs to be defined based on your `PredictionController`'s `predict` method. Please replace `...` with the actual expected fields.
{ "input_skills": "...", }
-
Response:
The specific structure of the response for prediction needs to be defined based on your `PredictionController`'s `predict` method. Please replace `...` with the actual expected fields.
{ "message": "Prediction successful", "data": { "input_skills": "backend, frontend, mysql, php, java script", "top_predictions": [ { "label": "Registered Nurse", "probability": 0.00721309008076787 }, { "label": "Nurse Manager", "probability": 0.007026528939604759 }, { "label": "Family Nurse Practitioner", "probability": 0.006960407830774784 } ] } }