Get Model Results

Running a model is as simple as requesting its current results. The aWhere platform will use the information previously provided about a field and planting to generate the relevant, field-specific information. For growth stage models, the results are the current stage as well as information about the most recent and next stage.

Important: Models require the use of the Fields and Plantings APIs to store important information about a field and crop. When a Field is specified for this API, it will select the most recently created Planting record to retrieve the crop and planting date.

On This Page...

API Request

API Endpoints

HTTP Verbs and URIs

GET /v2/agronomics/fields/{fieldId}/models/{modelId}/results
  • Returns the results for the specified model in the specified field.

Parameters

Parameter Description Valid Values
{fieldId} The ID of the field location for which you want weather. A string
{modelId} The ID of the model you wish to reference. Model IDs are strings provided by the aWhere APIs. A string

Query String Parameters

Query Parameter Name Description Valid Values
properties Only include these properties in the response data. If not specified, then all properties are included by default. Any properties not listed as options at the right are always included, and all child properties of a selection are included. Separate multiple choices with a comma. location
plantingDate
biofixDate
currentStage
nextStage
previousStage
gddUnits
units Each model has its own default unit types, such as Celsius or Fahrenheit for temperatures and GDDs. This parameter overrides those defaults to specify the units you wish to display. For growth stage models, this applies just to the temperature units used to calculate GDDs. The API response includes properties that indicate the units for each temperature attribute. metric
usa

Request Body

None

HTTP Headers

Remember to always send your OAuth2 Access Token in the Authorization header (see Authentication). This API doesn't require any additional headers.

API Response

Response HTTP Status Codes and Headers

This API returns standard HTTP status codes and headers for aWhere APIs. No additional headers are returned.

Response Body

Format for the Growth Stage Models

{
    "modelId": "{modelId}",
    "location":":{
        "latitude":{latitude},
        "longitude":{longitude}, 
        "fieldId":"{fieldId}",
        },
    "plantingDate":"{plantingDate}",
    "biofixDate":"{biofixDate}",
    "currentStage":{ 
        "id":"{stageId}",
        "stage":"{stageName}",
        "description":"{stageDescription}",
        "gddThreshold":{gddThreshold},
        "accumulatedGdd":{accumulatedGdd},
        "date":"{stageDate}"
        },
    "nextStage":{ 
        "id":"{stageId}",
        "stage":"{stageName}",
        "description":"{stageDescription}",
        "gddThreshold":{gddThreshold},
        "gddRemaining":{gddRemaining}
        },
    "previousStages":[{ 
            "id":"{stageId}",
            "stage":"{stageName}",
            "description":"{stageDescription}",
            "gddThreshold":{gddThreshold},
            "accumulatedGdd":{accumulatedGdd},
            "date":"{stageDate}"
           },{
            ...
           }        
        ],
    "gddUnits":"{gddUnits}",
    "_links":{ 
        "self":{"href":"{selfLink}",
        "curies":[{
            "name":"awhere",
            "href":"http://awhere.com/rels/{rel}",
            "templated":true
            }],
        "awhere:model":{"href":"{modelLink}"},
        "awhere:modelDetails":{"href":"{modelDetailsLink}"},                
        "awhere:field":{"href":"{fieldLink}"},
        "awhere:planting":{"href":"{plantingLink}"},

    }
}

Property Descriptions

Name Description
{modelID} The ID of the model being used.
location The location for which the model is running, including the geolocation and repeating the supplied Field ID.
{plantingDate} The planting date, as taken from the most recent planting record for the field.
{biofixDate} The date from which the GDDs started accumulating, as defined by the model.
currentStage, nextStage, and previousStages Each of these properties contains the details about the current, next, or previous stages respectively. previousStages is an array containing objects for each of the stages already passed.
{stageId} The ID for the stage.
{stageName} A name for the stage.
{stageDescription} A description of the stage, such as what the plant may look like.
{gddThreshold} The number of GDDs required to enter this stage.
{stageDate} The estimated date when the crop entered the stage (applies to current and previous stages).
{gddRemaining} The GDDs required to enter the next stage (applies only to the "next stage" object).
{gddUnits} The temperature units (either Celsius or Fahrenheit) used to calculate the GDDs and compare stage thresholds.
{selfLink} The URI of the Results object (the same API called to generate these results).
{modelLink} The URI of the relevant Model object.
{modelDetailsLink} The URI of the relevant Model Details object, which you can use to get the complete list of stages.
{fieldLink} The URI you can use to retrieve the field location information.
{plantingLink} The URI you can use to retrieve the planting information.