Boundaries - Search
按字段和交叉几何图形搜索跨各方的边界。
POST /boundaries?api-version=2023-06-01-preview
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
api-version
|
query | True |
string |
请求的 API 版本 |
请求头
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| Authorization | True |
string |
请为授权的 API 调用提供有效的持有者令牌。 请注意,如果之前尝试了未经身份验证的调用,可能需要清除浏览器缓存。 |
请求正文
| 名称 | 类型 | 说明 |
|---|---|---|
| ids |
string[] |
资源的 ID。 |
| intersectsWithGeometry | GeoJsonObject: |
GeoJSON (有关详细信息:https://geojson.org/)。 注意:坐标应采用 [经度, 纬度] 格式。 |
| maxArea |
number (double) |
边界的最大面积(含)。 |
| maxCreatedDateTime |
string (date-time) |
资源的最大创建日期(含)。 |
| maxLastModifiedDateTime |
string (date-time) |
资源(含)上次修改日期上限。 |
| maxPageSize |
integer (int32) minimum: 10maximum: 1000 |
所需的项数上限(含)。 最小值 = 10,最大值 = 1000,默认值 = 50。 |
| minArea |
number (double) |
边界的最小面积(含)。 |
| minCreatedDateTime |
string (date-time) |
资源(含)的最小创建日期。 |
| minLastModifiedDateTime |
string (date-time) |
资源(含)的上次修改日期(含)。 |
| names |
string[] |
资源的名称。 |
| parentIds |
string[] |
资源的父 ID。 |
| parentType |
它所属的父级的类型。 |
|
| propertyFilters |
string[] |
筛选 Properties 对象中的键值对。 例如“{testKey} eq {testValue}”。 |
| skipToken |
string |
跳过令牌以获取下一组结果。 |
| statuses |
string[] |
资源的状态。 |
| type |
string |
键入它所属的类型。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
成功 |
|
| Other Status Codes |
错误 标头 x-ms-error-code: string |
安全性
Authorization
请为授权的 API 调用提供有效的持有者令牌。 请注意,如果之前尝试了未经身份验证的调用,可能需要清除浏览器缓存。
类型:
apiKey
在:
header
示例
Boundaries_Search
示例请求
POST /boundaries?api-version=2023-06-01-preview
{
"ids": [
"BOUNDARY123"
],
"names": [
"John Smith's Boundary"
],
"propertyFilters": [
"RetailerId"
],
"statuses": [
"Active"
],
"minCreatedDateTime": "2021-04-22T12:53:39Z",
"maxCreatedDateTime": "2021-04-22T12:53:39Z",
"minLastModifiedDateTime": "2021-04-22T12:53:39Z",
"maxLastModifiedDateTime": "2021-04-22T12:53:39Z",
"maxPageSize": 50,
"skipToken": "string",
"parentType": "Field",
"parentIds": [
"FIELD123"
],
"intersectsWithGeometry": {
"type": "Polygon",
"coordinates": [
[
[
10.98958969116211,
45.284911882713146
],
[
11.004695892333984,
45.284911882713146
],
[
11.004695892333984,
45.29360722000945
],
[
10.98958969116211,
45.29360722000945
],
[
10.98958969116211,
45.284911882713146
]
]
]
}
}
示例响应
{
"value": [
{
"parentId": "FIELD123",
"parentType": "Field",
"area": {
"unit": "Acre",
"value": 60.405
},
"name": "John Smith's Boundary",
"description": "Some description"
}
],
"skipToken": "string",
"nextLink": "https://{{resourceName}}.farmbeats.azure.net/parties/{{partyId}}/seasonalFields/{{seasonalFieldId}}?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"
}
定义
| 名称 | 说明 |
|---|---|
|
Boundary |
边界资源元数据的架构。 |
|
Boundary |
分页响应包含请求的对象列表和 URL 链接,用于获取下一组结果。 |
|
Boundary |
它所属的父级的类型。例如 Field、SeasonalField、Zone、Prescription、PlantTissueAnalysis、ApplicationData、HarvestData、TillageData、PlantingData。 |
| Error |
Azure AgPlatform 服务中的错误。 |
|
Error |
Azure AgPlatform 服务的错误响应。 请参阅 errorResponse 参考文档 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。 |
|
Geo |
GeoJSON 对象类型。 |
|
Inner |
包含错误列表的内部错误。请参阅 innerError 参考文档 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object。 |
| Measure |
用于存储度量读取和单位的架构。 |
|
Multi |
MultiPolygon 几何图形。 |
| Point |
点几何图形。 |
| Polygon |
多边形几何图形。 |
|
Search |
SearchAllBoundaries 和 SearchBoundaries 参数。 |
BoundaryMetadata
边界资源元数据的架构。
| 名称 | 类型 | 说明 |
|---|---|---|
| area |
用于存储度量读取和单位的架构。 |
|
| createdBy |
string |
由用户/租户 ID 创建。 |
| createdDateTime |
string (date-time) |
创建资源的日期时间,示例格式:yyyy-MM-ddTHH:mm:ssZ。 |
| description |
string minLength: 0maxLength: 500 |
资源的文本说明。 |
| eTag |
string |
实现乐观并发的 ETag 值。 |
| id |
string |
唯一的资源 ID。 |
| modifiedBy |
string |
由用户/租户 ID 修改。 |
| modifiedDateTime |
string (date-time) |
上次修改资源的日期时间,示例格式:yyyy-MM-ddTHH:mm:ssZ。 |
| name |
string minLength: 0maxLength: 100 |
用于标识资源的名称。 |
| parentId |
string |
它所属的父级的 ID。 |
| parentType |
它所属的父级的类型。 |
|
| partyId |
string |
群 ID。 |
| properties |
属于资源的键值对的集合。 每对不能具有大于 50 个字符的键,并且不能具有大于 150 个字符的值。 注意:最多可以为资源提供 25 个键值对,仅支持字符串、数字和日期/时间(yyyy-MM-ddTHH:mm:ssZ) 值。 |
|
| source |
string minLength: 2maxLength: 100 |
资源的源。 |
| status |
string minLength: 0maxLength: 100 |
资源的状态。 |
| type |
string |
键入它所属的类型。 |
BoundaryMetadataListResponse
分页响应包含请求的对象列表和 URL 链接,用于获取下一组结果。
| 名称 | 类型 | 说明 |
|---|---|---|
| nextLink |
string |
指向列表中的下一页结果的延续链接(绝对 URI)。 |
| skipToken |
string |
用于检索下一页的令牌。 如果为 null,则没有其他页面。 |
| value |
请求的对象列表。 |
BoundaryParentType
它所属的父级的类型。例如 Field、SeasonalField、Zone、Prescription、PlantTissueAnalysis、ApplicationData、HarvestData、TillageData、PlantingData。
| 值 | 说明 |
|---|---|
| Field | |
| SeasonalField | |
| Zone | |
| Prescription | |
| PlantTissueAnalysis | |
| ApplicationData | |
| PlantingData | |
| TillageData | |
| HarvestData |
Error
Azure AgPlatform 服务中的错误。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string minLength: 1 |
服务器定义的错误代码集。 |
| details |
Error[] |
导致此报告错误的特定错误的详细信息数组。 |
| innererror |
包含错误列表的内部错误。请参阅 innerError 参考文档 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object。 |
|
| message |
string minLength: 1 |
错误的人工可读表示形式。 |
| 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。 |
GeoJsonObjectType
GeoJSON 对象类型。
| 值 | 说明 |
|---|---|
| Point | |
| Polygon | |
| MultiPolygon |
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。 |
Measure
用于存储度量读取和单位的架构。
| 名称 | 类型 | 说明 |
|---|---|---|
| unit |
string minLength: 1maxLength: 50 |
数据单元。 |
| value |
number (double) |
数据值。 |
MultiPolygon
MultiPolygon 几何图形。
| 名称 | 类型 | 说明 |
|---|---|---|
| coordinates |
number[] (double) |
获取或设置 GeoJSON 对象的坐标。 它必须是多边形数组,每个多边形都包含线性环的列表。 对于具有以上一个环的多边形,第一个必须是外环,任何其他环都必须是内部环。 |
| type | string: |
GeoJSON 对象类型。 |
Point
点几何图形。
| 名称 | 类型 | 说明 |
|---|---|---|
| coordinates |
number[] (double) |
获取或设置此点的坐标。 它必须是 2D 或 3D 系统的 2 或 3 个元素的数组。 |
| type | string: |
GeoJSON 对象类型。 |
Polygon
多边形几何图形。
| 名称 | 类型 | 说明 |
|---|---|---|
| coordinates |
number[] (double) |
获取或设置 GeoJSON 对象的类型。 它必须是线性环坐标数组的数组。 对于具有以上一个环的多边形,第一个必须是外环,任何其他环都必须是内部环。 |
| type | string: |
GeoJSON 对象类型。 |
SearchBoundaryQuery
SearchAllBoundaries 和 SearchBoundaries 参数。
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| ids |
string[] |
资源的 ID。 |
|
| intersectsWithGeometry | GeoJsonObject: |
GeoJSON (有关详细信息:https://geojson.org/)。 注意:坐标应采用 [经度, 纬度] 格式。 |
|
| maxArea |
number (double) |
边界的最大面积(含)。 |
|
| maxCreatedDateTime |
string (date-time) |
资源的最大创建日期(含)。 |
|
| maxLastModifiedDateTime |
string (date-time) |
资源(含)上次修改日期上限。 |
|
| maxPageSize |
integer (int32) minimum: 10maximum: 1000 |
50 |
所需的项数上限(含)。 最小值 = 10,最大值 = 1000,默认值 = 50。 |
| minArea |
number (double) |
边界的最小面积(含)。 |
|
| minCreatedDateTime |
string (date-time) |
资源(含)的最小创建日期。 |
|
| minLastModifiedDateTime |
string (date-time) |
资源(含)的上次修改日期(含)。 |
|
| names |
string[] |
资源的名称。 |
|
| parentIds |
string[] |
资源的父 ID。 |
|
| parentType |
它所属的父级的类型。 |
||
| propertyFilters |
string[] |
筛选 Properties 对象中的键值对。 例如“{testKey} eq {testValue}”。 |
|
| skipToken |
string |
跳过令牌以获取下一组结果。 |
|
| statuses |
string[] |
资源的状态。 |
|
| type |
string |
键入它所属的类型。 |