This commit is contained in:
Auke Sytsma 2020-04-08 18:50:29 +02:00
commit fe831fd327
2 changed files with 7 additions and 11 deletions

View File

@ -39,7 +39,3 @@ To start uploading files, you need to authenticate to the API. The REST API uses
### Use-case examples
* [VRAPoten-API](/wiki/VRAPoten-API)
* [VRANbs-API](/wiki/VRANbs-API)

View File

@ -1,4 +1,4 @@
## VRANbs API v0.1
## VRANbs API v0.2
[<< Home](https://git.akkerweb.nl/FarmMaps/Documentatie/wiki/Home)
FarmMaps is an asynchronous architecture, the API flow keeps this in mind.
@ -74,8 +74,8 @@ Response 404 Item not found
##### Using VRA Nitrogen fertilization task
The VraNbs task currently supports 3 operations:
* **targetn** - calculates the target nitrogen based on target yield.
* **uptake** - creates the uptake map.
* **nitrogen** - creates the fertilization appliance map.
* **uptake** - creates the nitrogen uptake map.
* **application** - creates the nitrogen fertilization application map.
###### targetn operation
Create a 'vnd.farmmaps.itemtype.user.input' item to use in this operation.
@ -208,7 +208,7 @@ GET /api/v1/items/{code}
```
###### Uptake operation
###### Uptake map operation
Execute the VRANbsTask 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.
@ -246,19 +246,19 @@ Response 401 Not authenticated
Response 403 No WRITE permissions in item
Response 404 Item not found
###### Nitrogen operation
###### Application map operation
Execute the VRANbsTask 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. ex. uploaded isaria/data data.
The resulting nitrogen appliance map will be created as a child item under the cropfield item (this can be queried).
The resulting nitrogen application map will be created as a child item under the cropfield item (this can be queried).
> Request
```javascript
POST /api/v1/items/{code}/tasks
{
"taskType": "vnd.farmmaps.task.vranbs",
"attributes": {
"operation": "nitrogen",
"operation": "application",
"inputCode": "{itemCode}",
"plantingDate": "2020-02-01T00:00:00.000Z",
"measurementDate": "2020-06-01T00:00:00.000Z",