Insights - Create Or Update
建立或更新深入解析實體。
PATCH {endpoint}/parties/{partyId}/models/{modelId}/resource-types/{resourceType}/resources/{resourceId}/insights/{insightId}?api-version=2023-11-01-preview
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
endpoint
|
path | True |
string uri |
命名空間的主機名,例如 admaInstanceName.farmbeats.azure.net |
insight
|
path | True |
string |
深入解析資源的標識碼。 |
model
|
path | True |
string |
相關聯模型的標識碼。 |
party
|
path | True |
string |
相關聯對象的標識碼。 |
resource
|
path | True |
string |
相關聯資源的標識碼。 |
resource
|
path | True |
string |
與記錄相關聯的資源類型。 |
api-version
|
query | True |
string |
要求的 API 版本 |
要求標頭
Media Types: "application/merge-patch+json"
名稱 | 必要 | 類型 | Description |
---|---|---|---|
Authorization | True |
string |
請為授權的 API 呼叫提供有效的持有人令牌。 請注意,如果您之前嘗試了未驗證的呼叫,您可能需要清除瀏覽器快取。 |
要求本文
Media Types: "application/merge-patch+json"
名稱 | 類型 | Description |
---|---|---|
description |
string |
資源的文字描述。 |
insightEndDateTime |
string |
深入解析相關的結束日期。 |
insightStartDateTime |
string |
深入解析相關的開始日期。 |
measurements |
<string, Measure> |
擷取深入解析結果的量值。 |
modelVersion |
string |
相關聯的模型版本。 |
name |
string |
用於識別資源的名稱。 |
properties |
屬於資源的索引鍵值組集合。 每個配對不能有大於 50 個字元的索引鍵,而且不能有大於 150 個字元的值。 注意:最多可以針對資源提供 25 個索引鍵值組,而且只支援字串、數位和日期時間 (yyyy-MM-ddTHH:mm:ssZ) 值。 |
|
status |
string |
資源的狀態。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
成功 |
|
201 Created |
建立時間 |
|
Other Status Codes |
[錯誤] Headers x-ms-error-code: string |
安全性
Authorization
請為授權的 API 呼叫提供有效的持有人令牌。 請注意,如果您之前嘗試了未驗證的呼叫,您可能需要清除瀏覽器快取。
Type:
apiKey
In:
header
範例
Insights_CreateOrUpdate
Sample Request
PATCH {endpoint}/parties/pjparty/models/BiomassModelId/resource-types/Farm/resources/farmId/insights/insightId?api-version=2023-11-01-preview
{
"modelVersion": "1.0",
"insightStartDateTime": "2021-07-26T09:31:54.043Z",
"insightEndDateTime": "2021-07-26T09:31:54.043Z",
"measurements": {
"additionalPropKey1": {
"unit": "15m/s",
"value": 0
}
},
"name": "insightName",
"description": "insightDescription",
"properties": {
"key1": "value1",
"key2": 123.45
}
}
Sample Response
{
"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
}
},
"attachmentsLink": "https://contosa.farmbeats.azure.net/party/pjparty/insight-attachments/insightId?api-version=2023-11-01-preview&modelId=modelId&resourceType=Farm&resourceId=farmId",
"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
}
}
{
"id": "insightId",
"partyId": "pjparty",
"resourceId": "farmId",
"resourceType": "Farm",
"modelId": "modelId",
"modelVersion": "1.0",
"attachmentsLink": "https://contosa.farmbeats.azure.net/party/pjparty/insight-attachments/insightId?api-version=2023-11-01-preview&modelId=modelId&resourceType=Farm&resourceId=farmId",
"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
}
}
定義
名稱 | Description |
---|---|
Error |
來自 Azure AgPlatform 服務的錯誤。 |
Error |
來自 Azure AgPlatform 服務的錯誤回應。 請參閱 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses ErrorResponse 參考檔。 |
Farm |
與記錄相關聯的資源類型。 |
Inner |
包含錯誤清單的內部錯誤。請參閱 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object InnerError 參考檔。 |
Insight |
深入解析資源的架構。 |
Measure |
儲存測量讀取和單位的架構。 |
Error
來自 Azure AgPlatform 服務的錯誤。
名稱 | 類型 | Description |
---|---|---|
code |
string |
伺服器定義的錯誤碼集。 |
details |
Error[] |
導致此錯誤之特定錯誤的詳細數據陣列。 |
innererror |
包含錯誤清單的內部錯誤。請參閱 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object InnerError 參考檔。 |
|
message |
string |
人類可閱讀的錯誤表示法。 |
target |
string |
錯誤的目標。 |
ErrorResponse
來自 Azure AgPlatform 服務的錯誤回應。 請參閱 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses ErrorResponse 參考檔。
名稱 | 類型 | Description |
---|---|---|
error |
來自 Azure AgPlatform 服務的錯誤。 |
|
traceId |
string |
唯一追蹤標識碼。 |
FarmHierarchyResourceType
與記錄相關聯的資源類型。
名稱 | 類型 | Description |
---|---|---|
Farm |
string |
|
Field |
string |
|
Party |
string |
|
SeasonalField |
string |
InnerError
包含錯誤清單的內部錯誤。請參閱 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object InnerError 參考檔。
名稱 | 類型 | Description |
---|---|---|
code |
string |
包含錯誤所提供的特定錯誤碼。 |
innererror |
包含錯誤清單的內部錯誤。請參閱 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object InnerError 參考檔。 |
Insight
深入解析資源的架構。
名稱 | 類型 | Description |
---|---|---|
attachmentsLink |
string |
取得附件的連結。 |
createdBy |
string |
由使用者/租使用者標識碼建立。 |
createdDateTime |
string |
建立資源的日期時間,範例格式:yyyy-MM-ddTHH:mm:ssZ。 |
description |
string |
資源的文字描述。 |
eTag |
string |
要實作開放式並行存取的ETag值。 |
id |
string |
資源的標識碼。 |
insightEndDateTime |
string |
深入解析相關的結束日期。 |
insightStartDateTime |
string |
深入解析相關的開始日期。 |
measurements |
<string, Measure> |
擷取深入解析結果的量值。 |
modelId |
string |
相關聯模型的標識碼。 |
modelVersion |
string |
相關聯的模型版本。 |
modifiedBy |
string |
由使用者/租使用者標識碼修改。 |
modifiedDateTime |
string |
上次修改資源的日期時間,範例格式:yyyy-MM-ddTHH:mm:ssZ。 |
name |
string |
用於識別資源的名稱。 |
partyId |
string |
相關聯對象的標識碼。 |
properties |
屬於資源的索引鍵值組集合。 每個配對不能有大於 50 個字元的索引鍵,而且不能有大於 150 個字元的值。 注意:最多可以針對資源提供 25 個索引鍵值組,而且只支援字串、數位和日期時間 (yyyy-MM-ddTHH:mm:ssZ) 值。 |
|
resourceId |
string |
相關聯資源的標識碼。 |
resourceType |
與記錄相關聯的資源類型。 |
|
status |
string |
資源的狀態。 |
Measure
儲存測量讀取和單位的架構。
名稱 | 類型 | Description |
---|---|---|
unit |
string |
數據單位。 |
value |
number |
數據值。 |