地図フィードバック API 開発者ガイド

道路状況に関するフィードバック

冬のシーズンを経て、シカゴ市は CDOT が管理する通りに新しい路面の穴を発見しました。 道路インフラストラクチャの地理参照インベントリを作成するために、ユーザーは HEREMapFeedback API にリクエストを送信し、都市の資産の予防および予測的メンテナンスのための都市管理アクティビティをサポートします。

HTTP ヘッダーフィールド

地図フィードバック API の POST リクエストには、次の HTTP ヘッダーフィールドが必要です。

オプション 1 : apiKey 認証

Auth-Service-Id: here_app
Auth-Identifier: apikey
Auth-Secret: {YOUR_APIKEY}
Content-Type: application/vnd.here.layerObjectList+json; charset=UTF-8
Content-Disposition: application/vnd.here.layerObjectList+json; charset=UTF-8
Accept: application/vnd.here.layerObjectList+json
Accept-Charset: charset=UTF-8

オプション 2 : APP_ID/APP_CODE 認証 (廃止)

Auth-Service-Id: here_app
Auth-Identifier: {YOUR_APP_ID}
Auth-Secret: {YOUR_APP_CODE}
Content-Type: application/vnd.here.layerObjectList+json; charset=UTF-8
Content-Disposition: application/vnd.here.layerObjectList+json; charset=UTF-8
Accept: application/vnd.here.layerObjectList+json
Accept-Charset: charset=UTF-8

リクエスト

https://maphub.api.here.com/feedback/

POST リクエスト には、次の POST ボディ が必要です。

[{
  "type": "Point",
  "coordinates": [8.1109931,47.8995140,0],
  "properties": {
    "v": "2.7", 
    "appId": "{YOUR_APP_ID}",
    "error": 980,
    "domain": {
          "type": 1,
          "subType": 1,
          "timeconstraint": { 
           "type" : "seasonal", // ["temporary","allyear","seasonal"]
           "from": "2017-09-30", // format: “YYYY-MM-DD”
           "to":  "2018-03-31"
           },
          "severity": 80, // [0-100]
          "rev": true,
          "surface": 4,  
          "lanenumber": [1,2] 
    },
    "details": "Big new pothole",
    "referenceIds": [ "948902673" ]
  }
}]

レスポンス

リクエストに対する応答には、次の内容が含まれます。

  • 送信されたレビジョンを識別するグローバル一意 ID ( GUID )
  • リビジョンのステータスを追跡するための ID
  • フィードバックで送信された情報
  • タイムスタンプおよび layerID 情報
[{
  "layerId": "wikvaya/feedback/main",
  "lastUpdateTS": 1499344145783,
  "isoCountryCode": "DEU",
  "coordinates": [8.1109931,
  47.899514,
  0],
  "guid": "af89f661189a9c957ea2d6e2c06e10a2d7c33423",
  "id": -332531,
  "type": "Point",
  "createdTS": 1499344145783,
  "nodeId": "feedback",
  "properties": {
    "referenceIds": ["948902673"],
    "v": "2.7",
    "appId": "ij4d8J2efq6GwEwtKFwj",
    "domain": {
      "severity": 80,
      "rev": true,
      "surface": 4,
      "timeconstraint": {
        "type": "seasonal",
        "from": "2017-09-30",
        "to": "2018-03-31"
      },
      "subType": 1,
      "lanenumber": [1,
      2],
      "type": 1
    },
    "isocc": "DEU",
    "details": "Big new pothole",
    "error": 980
  }
}]