アクティビティログを使用します

メモ

アカウントには、データ ハブアドオンサービスへのアクセス権が必要です。

  1. activity-log リスナーを使用して新しいスペースを作成し、 enableUUID を true に設定します。

     POST /spaces
    

    Swagger で試してください

     {
       "title": "Activity-Log Test",
       "enableUUID": true,
       "listeners": [
         {
           "id": "activity-log",
           "eventTypes": [
             "ModifySpaceEvent.request",
             "..."
           ]
         }
       ]
     }
    
  2. スペースを確認してください。 次のようなタイトルの新しいタイトルと同様に、新しいタイトルがあります。 スペースのアクティビティログ \

     GET /spaces
    

    Swagger で試してください

     [
       {
         "id": "<newSpaceId>",
         "title": "Activity-Log-Test",
         "description": null,
         "enableUUID": true,
         "createdAt": 1575271893917,
         "updatedAt": 1575271897152
       },
       {
         "id": "<activityLogSpaceId>",
         "title": "activity-log for space <newSpaceId>",
         "description": "This is an automatically created space for the history of space __<newSpaceId>__.  \nCreated on 2019-12-02 at 07:31  \n***\nModified features will be stored in this space by their original _uuid_.  \nThe original namespace properties of Data Hub will be stored within the value 'original' of the namespace '@ns:com:here:xyz:log'.  \nIMPORTANT Deleting this space while activity-log is enabled, causes the absence of history.  \n***",
         "createdAt": 1575271894028,
         "updatedAt": 1575271894028,
         "searchableProperties": {
           "@ns:com:here:xyz:log.id": true,
           "@ns:com:here:xyz:log.invalidatedAt": true,
           "@ns:com:here:xyz:log.original.updatedAt": true
         }
       }
     ]
    
  3. 新たに作成したスペースに何かを投稿します。

     PUT /spaces/<newSpaceId>/features
    

    Swagger で試してください

     {
      "type":"FeatureCollection",
      "features":[
        {
          "id": "newFeatureId",
          "type": "Feature",
          "geometry": {
            "type": "Point",
            "coordinates": [1,0]
          }
        }
      ]
     }
    
  4. アクティビティログの空き容量を確認します。

     GET /spaces/<activityLogSpaceId>/iterate
    

    Swagger で試してください

    この結果、次のような結果になります。

     {
      "type": "FeatureCollection",
      "features": [
        {
          "id": "<uuidOfFeature>",
          "type": "Feature",
          "properties": {
            "@ns:com:here:xyz": {
              "tags": [],
              "space": "<activityLogSpaceId>",
              "createdAt": 1575275435631,
              "updatedAt": 1575275435631
            },
            "@ns:com:here:xyz:log": {
              "id": "newFeatureId",
              "action": "SAVE",
              "original": {
                "space": "<newSpaceId>",
                "createdAt": 1575275435508,
                "updatedAt": 1575275435508
              },
              "invalidatedAt": 9223372036854776000
            }
          },
          "geometry": {
            "type": "Point",
            "coordinates": [
              1,
              0
            ]
          }
        }
      ]
     }
    

特定の機能を検索します

元の ID を使用して、アクティビティログで特定の機能を検索できます フィーチャの ID は文字列であるため、プロパティ検索のために引用符で囲んでください。 このリクエストは、オブジェクトのすべてのレビジョンのソートされていないリストを返します。

GET /spaces/<activityLogSpaceId>/search?p.@ns:com:here:xyz:log.id="newFeatureId"

Swagger で試してください

応答

{
  "type": "Feature",
  "id": "<uuidOfFeature>",
  "properties": {
    "@ns:com:here:xyz": {
      "tags": [],
      "space": "<activityLogSpaceId>",
      "createdAt": 1575275435631,
      "updatedAt": 1575275435631
    },
    "@ns:com:here:xyz:log": {
      "id": "newFeatureId",
      "action": "SAVE",
      "original": {
        "space": "<newSpaceId>",
        "createdAt": 1575275435508,
        "updatedAt": 1575275435508
      },
      "invalidatedAt": 9223372036854776000
    }
  },
  "geometry": {
    "type": "Point",
    "coordinates": [
      1,
      0
    ]
  }
}

フィーチャーの特定のレビジョンを検索します

フィーチャーの UUID を使用して、フィーチャーの特定のレビジョンを検索できます。

GET /spaces/<activityLogSpaceId>/features/<uuidOfFeature>

Swagger で試してください

応答 :

{
  "type": "Feature",
  "id": "<uuidOfFeature>",
  "geometry": {
    "type": "Point",
    "bbox": null,
    "coordinates": [
      1,
      0
    ]
  },
  "properties": {
    "@ns:com:here:xyz": {
      "space": "<activityLogSpaceId>",
      "createdAt": 1575275435631,
      "updatedAt": 1575275435631,
      "uuid": null,
      "puuid": null,
      "muuid": null,
      "tags": [],
      "_inputPosition": null
    },
    "@ns:com:here:xyz:log": {
      "id": "newFeatureId",
      "action": "SAVE",
      "original": {
        "space": "<newSpaceId>",
        "createdAt": 1575275435508,
        "updatedAt": 1575275435508
      },
      "invalidatedAt": 9223372036854776000
    }
  }
}

特定の時点のアクティビティログ

createdAt および invalidatedAt タイムスタンプを参照することで、特定の時点を検索できます。

GET /spaces/<activityLogSpaceId>/search?p.@ns:com:here:xyz:log.original.updatedAt=lte=1575275435508&p.@ns:com:here:xyz:log.invalidatedAt=gt=1575275435508

Swagger で試してください

レスポンス本文 :

{
  "type": "FeatureCollection",
  "features": [
    {
      "id": "<uuidOfFeature>",
      "type": "Feature",
      "properties": {
        "@ns:com:here:xyz": {
          "tags": [],
          "space": "<activityLogSpaceId>",
          "createdAt": 1575275435631,
          "updatedAt": 1575275435631
        },
        "@ns:com:here:xyz:log": {
          "id": "newFeatureId",
          "action": "SAVE",
          "original": {
            "space": "<newSpaceId>",
            "createdAt": 1575275435508,
            "updatedAt": 1575275435508
          },
          "invalidatedAt": 9223372036854776000
        }
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          1,
          0
        ]
      }
    }
  ]
}

詳細については 、「開発者ガイド On Activity - Log 」 ( アクティビティログの管理 ) にアクセスしてください。

」に一致する結果は 件です

    」に一致する結果はありません