userObject = {
id: (integer),
username: (string),
password: (string),
salt: (string)
}
Method: POST
Path: /signup
Input:
{
username: (string),
password: (string),
}
Response:
{
id: (integer),
username: (string),
}
Method: POST
Path: /login
Input:
{
username: (string),
password: (string),
}
Response:
{
id: (integer),
username: (string),
}
Method: GET
Path: /logout
Input: None
Response: 'Logout Successful'
projectObject = {
id: (integer),
name: (string),
project_tree: (string)
}
Method: GET
Path: /api/project/
Input: None
Response: Array of projectObjects
Method: GET
Path: /api/project/
Input: projectId via route parameter
Response: projectObject
Method: POST
Path: /api/project/
Input:
{
projectSettings: {
userId: (integer),
permissionId: (integer),
}
projectProps: {
name: (string),
project_tree: (string)
}
}
Response: projectObject (newly created one)
Method: PUT
Path: /api/project/
Input: projectId via route parameter
projectProps {
id: (integer) //OPTIONAL <--- please do not to put this,
name: (string), //OPTIONAL
project_tree: (string), //OPTIONAL
}
Response: projectObject (newly updated one)
Method: DELETE
Path: /api/project/
Input: projectId via route parameter
Response: projectObject (removed one)
Method: POST
Path: /api/project/generate
Input: JSON with property username and password
Response: 200 and Object with properties token, username and userId
Method: GET
Path: /api/user/projects
Input: None but need to be authenticated
Response: Array of projectObjects