你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Sensor Events - List
返回传感器事件数据的列表。 查询的时间跨度一次限制为 90 天。 返回未提供 startDateTime 和 endDateTime 时过去 90 天的事件。
GET {endpoint}/sensor-events?sensorId={sensorId}&sensorPartnerId={sensorPartnerId}&api-version=2023-11-01-preview
GET {endpoint}/sensor-events?sensorId={sensorId}&sensorPartnerId={sensorPartnerId}&startDateTime={startDateTime}&endDateTime={endDateTime}&excludeDuplicateEvents={excludeDuplicateEvents}&api-version=2023-11-01-preview
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
endpoint
|
path | True |
string uri |
命名空间的主机名,例如 admaInstanceName.farmbeats.azure.net |
api-version
|
query | True |
string |
请求的 API 版本 |
sensor
|
query | True |
string |
关联传感器的 ID。 |
sensor
|
query | True |
string |
关联的传感器合作伙伴的 ID。 |
end
|
query |
string date-time |
搜索传感器事件的结束时间 (包括) ,示例格式:yyyy-MM-ddTHH:mm:ssZ。 如果提供分数,则截断到秒。 |
|
exclude
|
query |
boolean |
标记以排除重复事件并仅采用最新事件 (默认值:false) 。 |
|
start
|
query |
string date-time |
搜索传感器事件的开始时间 (包括) ,示例格式:yyyy-MM-ddTHH:mm:ssZ。 如果提供分数,则截断到秒。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
Authorization | True |
string |
请为授权的 API 调用提供有效的持有者令牌。 请注意,如果之前尝试过未经身份验证的调用,则可能需要清除浏览器缓存。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
错误 标头 x-ms-error-code: string |
安全性
Authorization
请为授权的 API 调用提供有效的持有者令牌。 请注意,如果之前尝试过未经身份验证的调用,则可能需要清除浏览器缓存。
类型:
apiKey
在:
header
示例
SensorEvents_List
示例请求
GET {endpoint}/sensor-events?sensorId=S124&sensorPartnerId=Davis&startDateTime=2018-01-01T00:00:43Z&endDateTime=2019-01-01T00:00:43Z&excludeDuplicateEvents=True&api-version=2023-11-01-preview
示例响应
{
"value": [
{
"partyId": "prbhad-party",
"eventDateTime": "2018-01-01T00:30:00Z",
"ingestionDateTime": "2021-09-20T05:56:09Z",
"measures": {
"soil_moisture": {
"unit": "m",
"value": 30.1
}
}
},
{
"partyId": "prbhad-party",
"eventDateTime": "2018-01-01T00:31:00Z",
"ingestionDateTime": "2021-09-20T05:56:09Z",
"measures": {
"soil_moisture": {
"unit": "m",
"value": 31.1
}
}
}
]
}
定义
名称 | 说明 |
---|---|
Error |
Azure AgPlatform 服务出错。 |
Error |
来自 Azure AgPlatform 服务的错误响应。 有关 ErrorResponse 参考文档,请参阅 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses 。 |
Farm |
资源类型。 |
Geo |
用于存储资源类型和资源 ID 的架构。 |
Inner |
包含错误列表的内部错误。有关 InnerError 参考文档,请参阅 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object 。 |
Sensor |
传感器事件响应模型。 |
Sensor |
分页响应包含请求的对象列表和用于获取下一组结果的 URL 链接。 |
Error
Azure AgPlatform 服务出错。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
服务器定义的错误代码集。 |
details |
Error[] |
有关导致此报告错误的特定错误的详细信息数组。 |
innererror |
包含错误列表的内部错误。有关 InnerError 参考文档,请参阅 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object 。 |
|
message |
string |
错误的用户可读表示形式。 |
target |
string |
错误的目标。 |
ErrorResponse
来自 Azure AgPlatform 服务的错误响应。 有关 ErrorResponse 参考文档,请参阅 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses 。
名称 | 类型 | 说明 |
---|---|---|
error |
Azure AgPlatform 服务出错。 |
|
traceId |
string |
唯一跟踪 ID。 |
FarmHierarchyGeoResourceType
资源类型。
名称 | 类型 | 说明 |
---|---|---|
ApplicationData |
string |
|
Field |
string |
|
HarvestData |
string |
|
PlantTissueAnalysis |
string |
|
PlantingData |
string |
|
Prescription |
string |
|
SeasonalField |
string |
|
TillageData |
string |
|
Zone |
string |
GeoResource
用于存储资源类型和资源 ID 的架构。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID。 |
type |
资源类型。 |
InnerError
包含错误列表的内部错误。有关 InnerError 参考文档,请参阅 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object 。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
包含错误提供的特定错误代码。 |
innererror |
包含错误列表的内部错误。有关 InnerError 参考文档,请参阅 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object 。 |
SensorEvent
传感器事件响应模型。
名称 | 类型 | 说明 |
---|---|---|
associatedResource |
用于存储资源类型和资源 ID 的架构。 |
|
eventDateTime |
string |
传感器事件观察的 DateTime。 |
ingestionDateTime |
string |
传感器事件引入到数据存储的 DateTime。 |
measures |
传感器度量值。 |
|
partyId |
string |
关联方的 ID。 |
sensorId |
string |
传感器的 ID。 |
sensorPartnerId |
string |
传感器合作伙伴的 ID。 |
SensorEventListResponse
分页响应包含请求的对象列表和用于获取下一组结果的 URL 链接。
名称 | 类型 | 说明 |
---|---|---|
nextLink |
string |
列表中下一页结果的继续链接(绝对 URI)。 |
skipToken |
string |
检索下一页时使用的令牌。 如果为 null,则没有其他页。 |
value |
请求的对象列表。 |