Insights - List By Party Id Model Id And Resource
Returns a paginated list of insight resources.
GET {endpoint}/parties/{partyId}/models/{modelId}/resource-types/{resourceType}/resources/{resourceId}/insights?api-version=2023-11-01-preview
GET {endpoint}/parties/{partyId}/models/{modelId}/resource-types/{resourceType}/resources/{resourceId}/insights?minInsightStartDateTime={minInsightStartDateTime}&maxInsightStartDateTime={maxInsightStartDateTime}&minInsightEndDateTime={minInsightEndDateTime}&maxInsightEndDateTime={maxInsightEndDateTime}&measurementFilters={measurementFilters}&ids={ids}&names={names}&propertyFilters={propertyFilters}&statuses={statuses}&minCreatedDateTime={minCreatedDateTime}&maxCreatedDateTime={maxCreatedDateTime}&minLastModifiedDateTime={minLastModifiedDateTime}&maxLastModifiedDateTime={maxLastModifiedDateTime}&maxPageSize={maxPageSize}&skipToken={skipToken}&api-version=2023-11-01-preview
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
The host name of the namespace, e.g. admaInstanceName.farmbeats.azure.net |
|
model
|
path | True |
string |
Id of the associated model. |
|
party
|
path | True |
string |
Id of the associated party. |
|
resource
|
path | True |
string |
Id of the associated resource. |
|
resource
|
path | True |
string |
Resource type associated with the record. |
|
api-version
|
query | True |
string |
The requested API version |
|
ids
|
query |
string[] |
Ids of the resource. |
|
|
max
|
query |
string (date-time) |
Maximum creation date of resource (inclusive). |
|
|
max
|
query |
string (date-time) |
Maximum insightEndDateTime time of insight resources (inclusive), sample format: yyyy-MM-ddTHH:mm:ssZ. |
|
|
max
|
query |
string (date-time) |
Maximum insightStartDateTime time of insight resources (inclusive), sample format: yyyy-MM-ddTHH:mm:ssZ. |
|
|
max
|
query |
string (date-time) |
Maximum last modified date of resource (inclusive). |
|
|
max
|
query |
integer (int32) minimum: 10maximum: 1000 |
Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50. |
|
|
measurement
|
query |
string[] |
Filters on measureKey.unit/unitValue or measureKey.value/value pairs within the Measures object. eg. "measureKey.unit eq {testValue}" where testValue is string. eg. "measureKey.value eq {testValue}" where testValue = double. |
|
|
min
|
query |
string (date-time) |
Minimum creation date of resource (inclusive). |
|
|
min
|
query |
string (date-time) |
Minimum insightEndDateTime time of insight resources (inclusive), sample format: yyyy-MM-ddTHH:mm:ssZ. |
|
|
min
|
query |
string (date-time) |
Minimum insightStartDateTime time of insight resources (inclusive), sample format: yyyy-MM-ddTHH:mm:ssZ. |
|
|
min
|
query |
string (date-time) |
Minimum last modified date of resource (inclusive). |
|
|
names
|
query |
string[] |
Names of the resource. |
|
|
property
|
query |
string[] |
Filters on key-value pairs within the Properties object. eg. "{testKey} eq {testValue}". |
|
|
skip
|
query |
string |
Skip token for getting next set of results. |
|
|
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 |
Success |
|
| Other Status Codes |
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
Insights_ListByPartyIdModelIdAndResource
Sample request
GET {endpoint}/parties/PARTY123/models/modelId/resource-types/Farm/resources/farmId/insights?api-version=2023-11-01-preview
Sample response
{
"value": [
{
"id": "insightId",
"partyId": "pjparty",
"resourceId": "farmId",
"resourceType": "Farm",
"modelId": "modelId",
"modelVersion": "1.0",
"insightStartDateTime": "2021-07-26T09:31:54Z",
"insightEndDateTime": "2021-07-26T09:31:54Z",
"measurements": {
"additionalPropKey1": {
"unit": "15m/s",
"value": 0
}
},
"createdDateTime": "2021-07-26T11:19:11Z",
"modifiedDateTime": "2021-07-26T11:19:11Z",
"eTag": "00000000-0000-0000-8210-0ef9229601d7",
"name": "insightName",
"description": "insightDescription",
"properties": {
"key1": "value1",
"key2": 123.45
}
}
],
"skipToken": "skipToken",
"nextLink": "https://{{resourceName}}.farmbeats.azure.net/insights?api-version={{apiVersion}}&skipToken=%5b%7b%22token%22%3a%22%2bRID%3a%7e23TRC%3a10%23ISA%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. |
|
Error |
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. |
|
Farm |
Resource type associated with the record. |
|
Inner |
Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document. |
| Insight |
Schema of insight resource. |
|
Insight |
Paged response contains list of requested objects and a URL link to get the next set of results. |
| 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 |
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 |
An error from the Azure AgPlatform service. |
|
| traceId |
string |
Unique trace Id. |
FarmHierarchyResourceType
Resource type associated with the record.
| Value | Description |
|---|---|
| Party | |
| Farm | |
| Field | |
| SeasonalField |
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 |
Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document. |
Insight
Schema of insight resource.
| Name | Type | Description |
|---|---|---|
| attachmentsLink |
string |
Gets link for attachments. |
| 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: 0maxLength: 500 |
Textual description of the resource. |
| eTag |
string |
The ETag value to implement optimistic concurrency. |
| id |
string |
Id of the resource. |
| insightEndDateTime |
string (date-time) |
End date to which the insight is related. |
| insightStartDateTime |
string (date-time) |
Start date to which the insight is related. |
| measurements |
<string, Measure> |
Measures to capture insights results. |
| modelId |
string |
Id of the associated model. |
| modelVersion |
string |
Version of the associated model. |
| 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: 0maxLength: 100 |
Name to identify resource. |
| partyId |
string |
Id of the associated party. |
| 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. |
| resourceId |
string |
Id of the associated resource. |
| resourceType |
Resource type associated with the record. |
|
| status |
string minLength: 0maxLength: 100 |
Status of the resource. |
InsightListResponse
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 |
Insight[] |
List of requested objects. |
Measure
Schema for storing measurement reading and unit.
| Name | Type | Description |
|---|---|---|
| unit |
string minLength: 1maxLength: 50 |
Data unit. |
| value |
number (double) |
Data value. |