POST User Info - AmayaHena/AreaDocumentation GitHub Wiki
Resume of POST User Info
On this page you'll find documentation about the following requests:
Add Area
Description: Add an Area (action/reaction) for a given user.
HTTP Request to add an Area (action/reaction) for a given user:
http://localhost:8080/UI/addArea
Body:
Type: JSON
Definition: Information about Area (action/reaction) to add
Body example:
{
"token": "$RVtoken",
"name": "$RVName",
"Area": {
"service": "$RVservice",
"Action": {
"actionType": "$RVactionType",
// this part is dynamic & depdendant to each action
},
"Reaction": {
"reactionType": "$RVreactionType",
// this part is dynamic & depdendant to each reaction
}
}
}
Body details:
RVtoken:
Definition: JWT token given on login or register
Type: JWT
RVname:
Definition: name of the area given by the user to add
Type: string
WARNING: this name must be unique, an error would be returned if that's the case
RVservice:
Definition: Name of the chosen service
Value: string
RVactionType:
Definition: Action type to check
Value: string
RVreactionType:
Definition: Reaction type to trigger
Value: string
HTTP response if successful:
Code: 200
Format: JSON
Type: UserInfo
Delete Area
Description: Delete an Area (action/reaction) for a given user.
HTTP Request to delete an Area (action/reaction) for a given user.
http://localhost:8080/UI/delArea
Body:
Type: JSON
Definition: Information about Area (action/reaction) to delete
Body example:
{
"token": "$RVtoken",
"name": "$RVname"
}
Body details:
RVtoken:
Definition: JWT token given on login or register
Type: JWT
RVname:
Definition: name of the area given by the user to delete
Type: string
HTTP response if successful:
Code: 200
Format: JSON
Type: UserInfo
Update Area
Description: Update parameters of an existing Area (action/reaction) for a given user.
HTTP Request to delete an Area (action/reaction) for a given user.
http://localhost:8080/UI/updArea
Body:
Type: JSON
Definition: Information about Area (action/reaction) to update
Body example:
{
"token": "$RVtoken",
"name": "$RVName",
"Area": {
"service": "$RVservice",
"Action": {
"actionType": "$RVactionType",
// this part is dynamic & depdendant to each action
},
"Reaction": {
"reactionType": "$RVreactionType",
// this part is dynamic & depdendant to each reaction
}
}
}
Body details:
RVtoken:
Definition: JWT token given on login or register
Type: JWT
RVname:
Definition: name of the area given by the user to update
Type: string
Object Area:
Definition: new parameters of the Area (action/reaction) to update
Type: User Info Area
HTTP response if successful:
Code: 200
Format: JSON
Type: UserInfo
Service Info
Description: Get the information for services (web & mobile).
HTTP Request to get the information for services (web & mobile):
http://localhost:8080/UI/serviceInfo
Body:
Type: JSON
Definition: Information app type
Body example:
{
"name": "$RVname"
}
Body details:
RVname:
Definition: app type
Default: "web" OR "mobile"
Type: string
HTTP response if successful:
Code: 200
Format: JSON