Task or job assigned to specific customers, which are carried out in a specified produce field in a given period. They might be received from the master data system as planned tasks, from the data collectors as jobs completed. The values follow the definition of “task” according to ISO 11783:10. Tasks have status (planned (1), active (2), paused (3), completed (4) sample (5) or aborted (6)) in a number of separate periods, and data might be received from multiple devices in different time periods (see measurement inputs). Typically partfields and periods can be assigned to the tasks (not mandatory), and as optional values, responsible worker, crop type, operation, process and farm might be set. Measurement inputs can be linked to the tasks, ensuring logical relationship with the rest of the data Automatic filled attributes:
GET /task/3?filter[JWToken]=’ba1af54ec3f014f765e8172f9a86dc2a’ HTTP/1.1 Accept: application/vnd.api+json
HTTP/1.1 200 OK Content-Type: application/vnd.api+json { "meta":{ "JWToken": "ba1af54ec3f014f765e8172f9a86dc2a" }, "links": { "self": "http://api.visiblefarm.net/task/3" }, "data":[{ "type": " task ", "id": "3", "attributes": { "TaskName": "Időszak 1.", "TaskStatus": "Running", }, "relationships": { "customer": { "data": { "id": "1", "type": "customer" } }, "period": { "data": { "id": "17", "type": "period" } }, "farm": { "data": { "id": "0", "type": "farm" } }, "partfield": { "data": { "id": "130", "type": "partfield" } }, "responsible": { "data": { "id": "8", "type": "responsible" } }, "culturalpractise": { "data": { "id": "0", "type": "culturalpractise" } }, "croptype": { "data": { "id": "1", "type": "croptype" } }, } }], "included": [{ "type": "customer", "id": "1", "attributes": { "CustomerName": "Agro Bt.", "Description": "Lett egy új comment", "Address": "Messze", "Contact": "Nagy László", "Mail": "info@agrobt.hu", "Phone": "+36 30 111 2222", } },{ "type": "period", "id": "17", "attributes": { "PeriodName": "2017 / 2018", "StartTime": "2017-11-01T00:00:00.000Z", "StopTime": "2018-10-31T23:59:00.000Z" } },{ "type": "partfield", "id": "130", "attributes": { "PartFieldName": "WETZL-1-16", "Description": "", "Area": "12.00", } },{ "type": "worker", "id": "8", "attributes": { "WorkerName": "Traktoros Ludwig", "Address": "tanya 2", "Phone": "+36 70 344 4443", "Reference": "bármi" } },{ "type": "croptype", "id": "1", "attributes": { "CropTypeName": "Kukorica", "VariatyCode": "KAL21", } "relationships": { "variaty": { "data": { "id": "1", "type": "cropvariaty" } }, } }] }
POST /tasktime HTTP/1.1 Content-Type: application/vnd.api+json Accept: application/vnd.api+json { "meta":{ "JWToken": "ba1af54ec3f014f765e8172f9a86dc2a" }, "data":[{ "type": "tasktime", "attributes": { "Task": "3", "StartTime": "2018-06-01T08:00:00.000Z ", "StopTime": "2018-06-30T23:00:00.000Z ", "Device_ID": "1703", "Device_ID": "253", } }] }
GET /tasktime/?filter[JWToken]=’ba1af54ec3f014f765e8172f9a86dc2a’&filter[task_id]=3 HTTP/1.1 Accept: application/vnd.api+json