From abab9a6fdd3258c6b0b184fc3572e49753752849 Mon Sep 17 00:00:00 2001 From: Mark van der Wal Date: Wed, 15 Apr 2020 10:51:00 +0000 Subject: [PATCH] Update page 'VRAHerbicide API' --- VRAHerbicide-API.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/VRAHerbicide-API.md b/VRAHerbicide-API.md index a1a7abc..6edcd4c 100644 --- a/VRAHerbicide-API.md +++ b/VRAHerbicide-API.md @@ -64,13 +64,47 @@ Response 403 No WRITE permissions in item Response 404 Item not found ###### Querying predefined herbicide agents. +A list of herbicide agents can be requested by finding the "vnd.farmmaps.package.vra.herbicide" items, taking the first item found and reading it's data field content. +> Request +```javascript +GET /api/v1/items/?it=vnd.farmmaps.package.vra.herbicide +``` +> Response 201 +```javascript +{ + "code": "....", + "data": [ + { + "name": "Liberator", + "SoilType": "Dalgrond", + "ExtraInputType": "Lutum", + "MinDosis": 2, + "MaxDosis": 3, + "A": 0.1428, + "B": 1.285714, + "C": 1, + "D": 97, + "E": 3, + "P": 1, + "Crop": "Zetmeelaardappelen" + } + ] +} +``` + +Response 400 Tasktype not found +Response 401 Not authenticated +Response 403 No READ permissions in item +Response 404 Items not found ###### Creating an application map with the VRAHerbicide task Execute the task with the item code of the cropfield as parameter inside {code}. Use the input map code inside {itemCode}, specifying an inputCode for the input data item. {itemCode} needs the code of the data input item passed into it. -An **optional** {extraItemCode} can be passed inside the 'extraInputcode' field to process herbicide from 2 inputs. +An **optional** {extraItemCode} can be passed inside the 'extraInputcode' field to process herbicide from 2 inputs. +Fill in the agent field with an agent gotten from the herbicide agents query discussed above. + The resulting application map will be created as a child item of the cropfield item (this can be queried). > Request ```javascript