Forest Details
All the following requests require a valid IDToken in the authentication header
Headers:
Authentication: Bearer {IDToken}
GET
/myforest/pk/
Required Input
pk: the id of the forest [uuid]
Response
- a status code of 200
- a JSON response containing the serialized data of the given forest
DELETE
/myforest/pk/
Required Input
pk: the id of the forest [uuid]
Response
- a status code of 204
- a text saying your forest has been deleted, using the name of the forest
PUT
/myforest/pk/
Required Input
pk: the id of the forest [uuid]
Optional Input
Any of the following keys can be update on a forest by adding them as data in the request.
forestname [string] thumbnail [IMG] shapefile [SHP] latest_analysis [date & time] condition (NOT YET IMPLEMENTED) [string] size [float] visible [Boolean]
Response
- a status code of 204
- a text saying your forest has been deleted, using the name of the forest
Errors
Error Code 400
This error code signifies a myriad of errors, most to do with bad input.
If this code is returned check for a specific reason in the response text else contact Arboair with the code & time of the API request
Error Code 401
If this error code is received the IDToken is no longer valid. Please see refresh for refreshing your tokens
Error Code 404
No forest exists with that ID