The HaciendaOps API allows users to update tasks, including the completion status of a task or modifying the due date.
To start the instance, run the following command:
cd /HaciendaOps/api
json-server -w hfg-db.json
/task
Content-Type: application/json
Return Body:
{
"id": 1,
"title": "Morning irrigation",
"description": "Water the plants in Garden A",
"task_type": "Watering",
"due_date": "2024-06-05",
"completed": false,
"kaizen_notes": "Consider shifting to sunrise-only watering to reduce evaporation."
},
{
"id": 2,
"title": "Apply compost",
"description": "Use organic compost in Zone B",
"task_type": "Fertilizing",
"due_date": "2024-06-06",
"completed": false
}
/task/{completetaskId}
Content-Type: application/json
Request Body:
{
"completed": true,
}
/task/{completetaskId}
Content-Type: application/json
Response Body:
{
"id": 3,
"title": "Clip weeds",
"description": "Remove the weeds from Garden C",
"task_type": "Pruning",
"due_date": "2024-06-07",
"completed": false,
"kaizen_notes": "N/A"
}
You can now update existing tasks in HaciendaOps.