POST
/login
The user logs in
The user logs in
Request body parameters
username
Type:
String
The username of the user who wishes to log in.
password
Type:
String
The user's password.
POST
/activities
Create a new user activity
The user logs a new activity that they did (This endpoint is not yet ready).
Request body parameters
username
Type:
String
The username of the user who did the activity.
startTime
Type:
String
The date and time the activity started.
endTime
Type:
String
The date and time the activity ended.
activity
Type:
String
The name of the activity. The value can only be one of the existing activityType values.
POST
/activityTypes
Create a new Activity Type
Create a new type of activity that a user can do.
Request body parameters
type
Type:
String
The name of the new activity type.
GET
/logs/{username}
Get all existing logs of the user in a week by week format, stating the week number, year, and whether all hours have been logged for the week.
Get all existing logs of the user
Path parameters
username
The username for which the logs have to be fetched.
Query string parameters
(None)
GET
/logs/iscomplete/{username}
States whether the user has added all the required logs, up to the present day or week. If they have not completed, then the response also shows the incomplete weeks.
States whether the user has added all the required logs
Path parameters
username
The username for which completedness has to be determined.
Query string parameters
(None)
GET
/activities/{username}
Get all activities logged for a user since the beginning of time. It provides the name of the activity, as well as the start date, end date, and duration of the activity.
Get all activities logged for a user.
Path parameters
username
The username for which the activities have to be fetched.
Query string parameters
(None)
GET
/activityTypes
Get all existing activity types.
Get all existing activity types
Path parameters
(None)
Query string parameters
(None)
(None as of now. This needs to be discussed later.)
DELETE
/activities/{id}
Delete a particular activity.
Delete a particular activity.
Path parameters
id
The id of the activity to be deleted.
DELETE
/activityTypes/{id}
Delete a particular activity type.
Delete a particular activity type.
Path parameters
id
The id of the activity type to be deleted.