Create Task
You can use POST method to create a new Task.
Request:
POST /api/task?taskname=Sales&assignee=sam&[startdate]=2021/03/12&[duedate]=2021/03/12&[status]=open&[followers]=john,wilson &[percentage]=10&[priority]=High&[description]=Test Description&[chatroomname]=Marketing
assignee –> Username
followers -> Username1,Username2
status -> Open|Hold|Closed
priority -> High|Normal|Low
chatroomname -> Name of chatroom
Response:
Status: 200 OK { "success":true }
Update Task
To update a existing task, you can use PUT method.
PUT /api/task?taskid=2&taskname=Sales&assignee=sam&[startdate]=2021/03/12&[duedate]=2021/03/12&[status]=open&[followers]=john,wilson&[percentage]=10&[priority]=High&[description]=Test Description&[chatroomname]=Marketing
Response:
Status: 200 OK { "success":true }
Delete Task
To delete a Task, you can use DELETE method.
Request:
DELETE /api/task/[taskid]
Response
Status: 200 OK { "success":true }
Retrieving a Task
To retrieve a task, you can use GET method.
Request:
GET /api/task/[taskid]
Response
{ "row":{ "taskid": 1, "taskname": "Test Task", "startdate": "2021/03/12 18:30", "duedate": "2021/03/13 18:30", "assignee": "Sam", "status": "Open", "percentage": 20, "priority": "High" "description": "Test Description", "followers": "John, Wilson", "chatroomname": "" }, "success":true }
Retrieving all tasks
To retrieve all tasks, you can use GET method.
Request:
GET /api/task
Response
{ "row":[{ "taskid": 1, "taskname": "Test Task", "startdate": "2021/03/12 18:30", "duedate": "2021/03/13 18:30", "assignee": "Sam", "status": "Open", "percentage": 20, "priority": "High" "description": "Test Description", "followers": "John,Wilson", "chatroomname": "" }, { "taskid": 2, "taskname": "Test Task2", "startdate": "2021/03/12 18:30", "duedate": "2021/03/13 18:30", "assignee": "John", "status": "Hold", "percentage": 50, "priority": "Normal" "description": "Test Description", "followers": "Sam, Wilson", "chatroomname": "Marketing" }], "success":true }