POST api/measurement/measurementmethod
The connection to calculate SNS Index using the Measurement Method
Request Information
Authorization is required
Response Codes
- OK (200)
- BadRequest (400)
- Unauthorized (401)
- NotFound (404)
URI Parameters
None.
Body Parameters
measurementmethodName | Description | Type | Additional information |
---|---|---|---|
CropGroupId |
The Crop Group in the field being grown |
integer |
None. |
SeasonId |
the Season that the crop was sown during, required only if using the Shoot Number or Crop Height methods for Cereals or Other Arable crops |
integer |
None. |
Step1ArablePotato |
Inputs for Measurement Method Step 1 (for Arable or Potato crops - section 4 & section 5) |
measurementmethodstep1arablepotato |
None. |
Step1Veg |
Inputs for Measurement Method Step 1 (for Veg crops - section 6) |
measurementmethodstep1veg |
None. |
Step2 |
Inputs for Measurement Method Step 2, note that for potato crops inputs for this step are not required |
measurementmethodstep2 |
None. |
Step3 |
Inputs for Measurement Method Step 3 |
measurementmethodstep3 |
None. |
Request Formats
application/json, text/json
Sample:
{ "CropGroupId": 1, "SeasonId": 1, "Step1ArablePotato": { "Depth0To30Cm": 1, "Depth30To60Cm": 1, "Depth60To90Cm": 1 }, "Step1Veg": { "DepthCm": 1, "DepthValue": 1 }, "Step2": { "ShootNumber": 1, "GreenAreaIndex": 1.0, "CropHeight": 1 }, "Step3": { "Adjustment": 1, "OrganicMatterPercentage": 1 } }
application/xml, text/xml
Sample:
<measurementmethod xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RB209_WebApi.Models.Measurement"> <CropGroupId>1</CropGroupId> <SeasonId>1</SeasonId> <Step1ArablePotato> <Depth0To30Cm>1</Depth0To30Cm> <Depth30To60Cm>1</Depth30To60Cm> <Depth60To90Cm>1</Depth60To90Cm> </Step1ArablePotato> <Step1Veg> <DepthCm>1</DepthCm> <DepthValue>1</DepthValue> </Step1Veg> <Step2> <CropHeight>1</CropHeight> <GreenAreaIndex>1</GreenAreaIndex> <ShootNumber>1</ShootNumber> </Step2> <Step3> <Adjustment>1</Adjustment> <OrganicMatterPercentage>1</OrganicMatterPercentage> </Step3> </measurementmethod>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
measurementmethodoutputName | Description | Type | Additional information |
---|---|---|---|
SnsValue |
The SNS Value (kg N/ha) |
integer |
None. |
SnsIndex |
The SNS Index |
integer |
None. |
Response Formats
application/json, text/json
Sample:
{ "SnsValue": 1, "SnsIndex": 2 }
application/xml, text/xml
Sample:
<measurementmethodoutput xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RB209_WebApi.Models.Measurement"> <SnsIndex>2</SnsIndex> <SnsValue>1</SnsValue> </measurementmethodoutput>