Share via


Harvest Data - List

Returns a paginated list of harvest data resources across all parties.

GET /harvest-data?api-version=2023-06-01-preview
GET /harvest-data?minTotalYield={minTotalYield}&maxTotalYield={maxTotalYield}&minAvgYield={minAvgYield}&maxAvgYield={maxAvgYield}&minTotalWetMass={minTotalWetMass}&maxTotalWetMass={maxTotalWetMass}&minAvgWetMass={minAvgWetMass}&maxAvgWetMass={maxAvgWetMass}&minAvgMoisture={minAvgMoisture}&maxAvgMoisture={maxAvgMoisture}&minAvgSpeed={minAvgSpeed}&maxAvgSpeed={maxAvgSpeed}&sources={sources}&associatedBoundaryIds={associatedBoundaryIds}&minOperationStartDateTime={minOperationStartDateTime}&maxOperationStartDateTime={maxOperationStartDateTime}&minOperationEndDateTime={minOperationEndDateTime}&maxOperationEndDateTime={maxOperationEndDateTime}&minOperationModifiedDateTime={minOperationModifiedDateTime}&maxOperationModifiedDateTime={maxOperationModifiedDateTime}&minArea={minArea}&maxArea={maxArea}&ids={ids}&names={names}&propertyFilters={propertyFilters}&statuses={statuses}&minCreatedDateTime={minCreatedDateTime}&maxCreatedDateTime={maxCreatedDateTime}&minLastModifiedDateTime={minLastModifiedDateTime}&maxLastModifiedDateTime={maxLastModifiedDateTime}&maxPageSize={maxPageSize}&skipToken={skipToken}&api-version=2023-06-01-preview

URI Parameters

Name In Required Type Description
api-version
query True

string

The requested API version

associatedBoundaryIds
query

string[]

Boundary IDs associated with operation data.

ids
query

string[]

Ids of the resource.

maxArea
query

number (double)

Maximum area for which operation was applied (inclusive).

maxAvgMoisture
query

number (double)

Maximum AvgMoisture value (inclusive).

maxAvgSpeed
query

number (double)

Maximum AvgSpeed value (inclusive).

maxAvgWetMass
query

number (double)

Maximum AvgWetMass value (inclusive).

maxAvgYield
query

number (double)

Maximum AvgYield value (inclusive).

maxCreatedDateTime
query

string (date-time)

Maximum creation date of resource (inclusive).

maxLastModifiedDateTime
query

string (date-time)

Maximum last modified date of resource (inclusive).

maxOperationEndDateTime
query

string (date-time)

Maximum end date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ (inclusive).

maxOperationModifiedDateTime
query

string (date-time)

Maximum modified date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ (inclusive).

maxOperationStartDateTime
query

string (date-time)

Maximum start date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ (inclusive).

maxPageSize
query

integer (int32)

minimum: 10
maximum: 1000

Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.

maxTotalWetMass
query

number (double)

Maximum Total WetMass value (inclusive).

maxTotalYield
query

number (double)

Maximum Yield value (inclusive).

minArea
query

number (double)

Minimum area for which operation was applied (inclusive).

minAvgMoisture
query

number (double)

Minimum AvgMoisture value(inclusive).

minAvgSpeed
query

number (double)

Minimum AvgSpeed value(inclusive).

minAvgWetMass
query

number (double)

Minimum AvgWetMass value(inclusive).

minAvgYield
query

number (double)

Minimum AvgYield value(inclusive).

minCreatedDateTime
query

string (date-time)

Minimum creation date of resource (inclusive).

minLastModifiedDateTime
query

string (date-time)

Minimum last modified date of resource (inclusive).

minOperationEndDateTime
query

string (date-time)

Minimum end date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ (inclusive).

minOperationModifiedDateTime
query

string (date-time)

Minimum modified date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ (inclusive).

minOperationStartDateTime
query

string (date-time)

Minimum start date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ (inclusive).

minTotalWetMass
query

number (double)

Minimum Total WetMass value(inclusive).

minTotalYield
query

number (double)

Minimum Yield value(inclusive).

names
query

string[]

Names of the resource.

propertyFilters
query

string[]

Filters on key-value pairs within the Properties object. eg. "{testKey} eq {testValue}".

skipToken
query

string

Skip token for getting next set of results.

sources
query

string[]

Sources of the operation data.

statuses
query

string[]

Statuses of the resource.

Request Header

Name Required Type Description
Authorization True

string

Please provide a valid bearer token for authorized API calls. Note that you might need to clear your browser cache if you tried un-authenticated calls before.

Responses

Name Type Description
200 OK

HarvestDataListResponse

Success

Other Status Codes

ErrorResponse

Error

Headers

x-ms-error-code: string

Security

Authorization

Please provide a valid bearer token for authorized API calls. Note that you might need to clear your browser cache if you tried un-authenticated calls before.

Type: apiKey
In: header

Examples

HarvestData_List

Sample request

GET /harvest-data?api-version=2023-06-01-preview

Sample response

{
  "value": [
    {
      "partyId": "PARTY123",
      "id": "HARVESTOP123",
      "source": "Manual",
      "name": "Harvest data for North Farm",
      "description": "some description",
      "status": "Active",
      "operationStartDateTime": "2021-04-21T06:49:30Z",
      "operationEndDateTime": "2021-04-21T06:49:30Z",
      "operationModifiedDateTime": "2021-04-21T06:49:30Z",
      "associatedBoundaryId": "NORTHFARM2021CORNBOUNDARY",
      "area": {
        "unit": "acre",
        "value": 50
      },
      "totalYield": {
        "unit": "kilos",
        "value": 1400
      },
      "avgYield": {
        "unit": "kilosperacre",
        "value": 28
      },
      "totalWetMass": {
        "unit": "kilos",
        "value": 500
      },
      "avgWetMass": {
        "unit": "kilosperacre",
        "value": 10
      },
      "avgMoisture": {
        "unit": "percent",
        "value": 14.61
      },
      "avgSpeed": {
        "unit": "kmsperhour",
        "value": 7.2
      },
      "harvestProductDetails": [
        {
          "productName": "VAR1",
          "area": {
            "unit": "acre",
            "value": 30
          },
          "totalYield": {
            "unit": "kilos",
            "value": 900
          },
          "avgYield": {
            "unit": "kilosperacre",
            "value": 30
          },
          "totalWetMass": {
            "unit": "kilos",
            "value": 300
          },
          "avgWetMass": {
            "unit": "kilosperacre",
            "value": 10
          },
          "avgMoisture": {
            "unit": "percent",
            "value": 16.4
          }
        }
      ],
      "properties": {
        "Region": "Europe",
        "CountyCode": 123
      },
      "attachmentsLink": "https://<resource-name>.farmbeats.azure.net/party/{{partyId}}/attachments?api-version={{apiVersion}}&resourceIds={{harvestDataId}}&resourceTypes=HarvestData",
      "createdDateTime": "2021-04-21T06:49:30Z",
      "modifiedDateTime": "2021-04-21T06:49:30Z",
      "eTag": "cb00a3ac-0000-0100-0000-601d21ec0000"
    }
  ],
  "skipToken": "string",
  "nextLink": "https:/{{resourceName}}.farmbeats.azure.net/parties/{{partyId}}/harvestData?api-version={{apiVersion}}&skipToken=%5b%7b%22token%22%3a%22%2bRID%3a%7ehK8eAKzdo1MNnwcAAAAAAA%3d%3d%23RT%3a1%23TRC%3a10%23ISV%3a2%23IEO%3a65551%23FPC%3aAQ2fBwAAAAAAD58HAAAAAAA%3d%22%2c%22range%22%3a%7b%22min%22%3a%22%22%2c%22max%22%3a%22FF%22%7d%7d%5d"
}

Definitions

Name Description
Error

An error from the Azure AgPlatform service.

ErrorResponse

An error response from the Azure AgPlatform service. See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses for ErrorResponse reference document.

HarvestData

Schema of harvest data resource.

HarvestDataListResponse

Paged response contains list of requested objects and a URL link to get the next set of results.

HarvestProductDetail

Schema of product used during harvesting.

InnerError

Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document.

Measure

Schema for storing measurement reading and unit.

Error

An error from the Azure AgPlatform service.

Name Type Description
code

string

minLength: 1

Server-defined set of error codes.

details

Error[]

Array of details about specific errors that led to this reported error.

innererror

InnerError

Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document.

message

string

minLength: 1

Human-readable representation of the error.

target

string

Target of the error.

ErrorResponse

An error response from the Azure AgPlatform service. See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses for ErrorResponse reference document.

Name Type Description
error

Error

An error from the Azure AgPlatform service.

traceId

string

Unique trace Id.

HarvestData

Schema of harvest data resource.

Name Type Description
area

Measure

Schema for storing measurement reading and unit.

associatedBoundaryId

string

Optional boundary ID of the field for which operation was applied.

attachmentsLink

string

Link for attachments.

avgMoisture

Measure

Schema for storing measurement reading and unit.

avgSpeed

Measure

Schema for storing measurement reading and unit.

avgWetMass

Measure

Schema for storing measurement reading and unit.

avgYield

Measure

Schema for storing measurement reading and unit.

createdBy

string

Created by user/tenant id.

createdDateTime

string (date-time)

Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

description

string

minLength: 0
maxLength: 500

Textual description of the resource.

eTag

string

The ETag value to implement optimistic concurrency.

harvestProductDetails

HarvestProductDetail[]

Harvest product details.

id

string

Unique resource ID.

modifiedBy

string

Modified by user/tenant id.

modifiedDateTime

string (date-time)

Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

name

string

minLength: 0
maxLength: 100

Name to identify resource.

operationEndDateTime

string (date-time)

End date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ.

operationModifiedDateTime

string (date-time)

Modified date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ. Note: this will be specified by the source provider itself.

operationStartDateTime

string (date-time)

Start date-time of the operation data, sample format: yyyy-MM-ddTHH:mm:ssZ.

partyId

string

Party ID which belongs to the operation data.

properties

A collection of key value pairs that belongs to the resource. Each pair must not have a key greater than 50 characters and must not have a value greater than 150 characters. Note: A maximum of 25 key value pairs can be provided for a resource and only string, numeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.

source

string

minLength: 2
maxLength: 100

Source of the resource.

status

string

minLength: 0
maxLength: 100

Status of the resource.

totalWetMass

Measure

Schema for storing measurement reading and unit.

totalYield

Measure

Schema for storing measurement reading and unit.

HarvestDataListResponse

Paged response contains list of requested objects and a URL link to get the next set of results.

Name Type Description
nextLink

string

Continuation link (absolute URI) to the next page of results in the list.

skipToken

string

Token used in retrieving the next page. If null, there are no additional pages.

value

HarvestData[]

List of requested objects.

HarvestProductDetail

Schema of product used during harvesting.

Name Type Description
area

Measure

Schema for storing measurement reading and unit.

avgMoisture

Measure

Schema for storing measurement reading and unit.

avgWetMass

Measure

Schema for storing measurement reading and unit.

avgYield

Measure

Schema for storing measurement reading and unit.

productName

string

minLength: 1
maxLength: 100

Name of the product.

totalWetMass

Measure

Schema for storing measurement reading and unit.

totalYield

Measure

Schema for storing measurement reading and unit.

InnerError

Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document.

Name Type Description
code

string

Specific error code than was provided by the containing error.

innererror

InnerError

Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document.

Measure

Schema for storing measurement reading and unit.

Name Type Description
unit

string

minLength: 1
maxLength: 50

Data unit.

value

number (double)

Data value.