API Reference
Create Report
POST
Create a report, then download it with Get Report once it has generated.
By default, repeating the same request within an hour returns the same report. Send Cache-Control: no-cache to always generate a new one, or set the window in seconds, as in Cache-Control: max-age=3600.
x-api-key?stringAn API key issued by AgriWebb. Send this or authorization.
cache-control?stringControl if or how long the report should be cached before generating a new one
Body
application/json- body
type*"animal-load-by-paddock.v1"Value in
"animal-load-by-paddock.v1"tenantType*"farm"Value in
"farm"tenantId*stringLength
1 <= lengthreportingPeriodStart*integerRange
0 <= value <= 9007199254740991reportingPeriodEnd*integerRange
0 <= value <= 9007199254740991The new report, or the report with the same type, tenant and reporting period created within the cache window. Download it from links.download.
application/json- response
data*links*curl -X POST "https://example.com/v2/report" \ -H "Content-Type: application/json" \ -d '{ "type": "animal-load-by-paddock.v1", "tenantType": "farm", "tenantId": "string", "reportingPeriodStart": 0, "reportingPeriodEnd": 0 }'{ "data": { "type": "animal-load-by-paddock.v1", "tenantType": "farm", "tenantId": "string", "reportingPeriodStart": 0, "reportingPeriodEnd": 0, "id": "string", "status": "pending", "creationDate": 0, "lastModifiedDate": 0 }, "links": { "download": "https://api.agriwebb.com/v2/report/{id}" }}