Documentatie/Blight-API.md

32 lines
1.1 KiB
Markdown
Raw Normal View History

2021-05-28 14:16:01 +00:00
## Blight API
[<< Home](README.md)
For the currently available public FarmMaps API you can take a look at swagger: https://test.farmmaps.eu/swagger
## API flow
* Authenticate User
2021-05-28 14:58:47 +00:00
* Create cropping scheme (if not exists)
* Create crop field (if not exists)
* Get blight advice
* Create blight advice
* Update UserInput
* Add spray
* Add irrigation
2021-05-28 14:16:01 +00:00
* Optional steps
* *Create cropfield through FarmMaps API*
* Item 'vnd.farmmaps.itemtype.cropfield' must be created with its data as specified in the api.
* Task 'vnd.farmmaps.task.blight' must be executed to create an advice. This task is automatically created for crop fields with potato and is scheduled to run at configered times to keep the advice updated.
It is also possible to executed this task at any time through the API. This will be explained in the following chapters.
**Users can poll the task api to see if a task is completed**
**This can be achieved with the task execution id obtained from calling the 'ItemTask' API.**
[Poll task status](Polling-task-status.md)
**Users can query the API for child items of a cropfield to see what items it has.**