-
Notifications
You must be signed in to change notification settings - Fork 2
Assignment API Documentaion
Snehal_Patare edited this page Mar 4, 2022
·
6 revisions
- Success:
{
"status" : "success",
"session_id" : "", etc
}
- Failure:
{
"status" : "error",
"message" : ""
}
- http://localhost:8088/api/users/{id} - GET (fetch one user resource)
- http://localhost:8088/api/users - POST (create new user)
- http://localhost:8088/api/users - GET (fetch all users)
- http://localhost:8088/api/users/{id} - DELETE (delete one user)
- http://localhost:8088/api/users/{id} - PUT (Update the user resource)
- http://localhost:8088/api/fetch_history - POST (Getting History data based on Logged in user)
- http://localhost:8088/api/post_history - POST (Entry and update in history table)
- http://localhost:8088/addUser (POST)- add user data
* Inputs needed: {
"session_id" : "Snehal",
"status" : 1,
"modified_by" : 123,
"modified_at" : " 2022-02-06 18:31:36"
}
Output :
{
"status" : "Success",
"message" : "User Created"
}
- Error message
{
"status" : "Error",
"message" : "User already exist"
}
- http://localhost:8088/addUserSearchRecord (POST) - add user history data
- Input needed :
{
"session_id" : "Snehal",
"place_name" : "MN",
"data_link" : "C:temp",
"searched_time" : "Hello",
"location_searched_at" : " 2022-02-06 18:31:36"
}
{
"status" : "Success",
"message" : "User History added"
}
- Error message if the location doesn't exist in list
{
"status" : "Error",
"message" : "Location not exist"
}
- Error message : No user
{
"status" : "Error",
"message" : "User not found"
}
- http://localhost:8088/getUserSearchHistory (POST)- add user history data *Input Needed:
"session_id" : "Snehal"
}
Output : {
"place_name": "KIND",
"data_link" "abcd",
"searched_time": "12/13/2021",
"location_searched_at": "09/12/2012"
}