diff --git a/VRAHerbicide-API.md b/VRAHerbicide-API.md index f0f2f87..0146ca1 100644 --- a/VRAHerbicide-API.md +++ b/VRAHerbicide-API.md @@ -25,7 +25,7 @@ For the currently available public FarmMaps API you can take a look at swagger: * This is an asynchronous process and can take a while before all data is collected in FarmMaps. * *Upload own data* * IF shape data, convert to geotiff. - * Querying predefined herbicide agents (for input constants if none available beforehand) + * Querying predefined herbicide agents * Task 'vnd.farmmaps.task.vraherbicide' must be executed to create an application map. * Task 'vnd.farmmaps.task.taskmap' can be executed to create a taskmap. * Download item data (tiff of shape) @@ -65,34 +65,27 @@ 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 'agents' array content. +A list of herbicide agents can be requested by getting the "vnd.farmmaps.itemtype.codelist.fm006" items from farmmaps. > Request ```javascript -GET /api/v1/items/?it=vnd.farmmaps.package.vra.herbicide +GET /api/v1/items/?it=vnd.farmmaps.itemtype.codelist.fm006 ``` > Response 201 ```javascript -{ +[ +{ "code": "....", - "data": { - "agents": [ - { - "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" - } - ] + // .... + "data": + { + "code": "0001", + "crop": "zetmeelaardappelen", + "name": "arcade_challenge_olie", + ... } -} +}, +... +] ``` Response 400 Itemtype not found @@ -117,19 +110,7 @@ POST /api/v1/items/{code}/tasks "attributes": { "inputCode": "{itemCode}", "extraInputCode": "{extraItemCode}", - "agent": { - "SoilType": "Dalgrond", - "ExtraInputType": "Lutum", - "MinDosis": 2, - "MaxDosis": 3, - "A": 0.1428, - "B": 1.285714, - "C": 1, - "D": 97, - "E": 3, - "P": 1, - "Crop": "Zetmeelaardappelen" - } + "agentCode": "0001" } } ``` @@ -141,19 +122,7 @@ POST /api/v1/items/{code}/tasks "attributes": { "inputCode": "{itemCode}", "extraInputCode": "{extraItemCode}", - "agent": { - "SoilType": "Dalgrond", - "ExtraInputType": "Lutum", - "MinDosis": 2, - "MaxDosis": 3, - "A": 0.1428, - "B": 1.285714, - "C": 1, - "D": 97, - "E": 3, - "P": 1, - "Crop": "Zetmeelaardappelen" - } + "agentCode": "0001" } } ```