リクエストの作成
HERE Geofencing API に対する一般的なリクエストには、次の表に示す基本的な要素が含まれています。また、このリクエストにはリソース固有のパラメータやデータが含まれている場合があります。
/v8/geofence
Use the CLE resources to manage geofence layers|Query which geofence geometries of a certain layer cover or are close to the given asset position.
GET only, specify request details via query parameters
One of the resource names supported by the service, see [Supported Resources](supported-resources.md)|
|Format|Supported formats:
- `.json`
| |
|API Key|`&apiKey=\{YOUR\_API\_KEY\}`|Substitute your own unique `apikey`. For more information, see the [Identity & Access Management Developer Guide](https://here-tech.skawa.fun/documentation/identity-access-management/dev_guide/index.html).|
|Application Code|`&app_code=\{YOUR\_APP\_CODE\}`|Substitute your own unique `app_code`. For more information, see the [Identity & Access Management Developer Guide](https://here-tech.skawa.fun/documentation/identity-access-management/dev_guide/index.html).|
|Application Id|`&app_id=\{YOUR\_APP\_ID\}`|Substitute your own unique `app_id`. For more information, see the [Identity & Access Management Developer Guide](https://here-tech.skawa.fun/documentation/identity-access-management/dev_guide/index.html).|
This example request uses HTTP GET to check if an asset is inside or outside of a particular geofence polygon.
```language-html
https://geofencing.hereapi.com/v8/geofence
?apiKey=\{YOUR\_API\_KEY\}
&layer_ids=123
&key_attribute=NAME
&proximity=39.1066,-94.61,500
注 : この例では、 HERE API キー を使用してリクエストを認証します。 使用可能な認証オプションについては、『 Identity & Access Management 開発者ガイド』を参照してください。
注 : 上記の例では、次の WKT ファイルがサービスにアップロードされていることを前提としています。
ID NAME ABBR WKT
1 Kansas KS POLYGON((-102.0 40.0,-102.0 37.0,-94.619 37.0,-94.619 39.1074,-95.310 40.0))