here olp上传及获取元数据信息

上传数据流程图

1 olp初始化服务接口

https://sab.metadata.data.api.platform.here.com/metadata/v1/catalogs/hrn:here:data::olp-navinfo:wangpengtest

2上传数据

https://publish.data.api.platform.here.com/publish/v2/catalogs/hrn:here:data::olp-navinfo:wangpengtest/layers/as12443565/publications/v2-6277bf14-4788-4eab-b665-f3b730ff82d6/partitions

3发布服务

https://publish.data.api.platform.here.com/publish/v2/catalogs/hrn:here:data::olp-navinfo:wangpengtest/publications/v2-6277bf14-4788-4eab-b665-f3b730ff82d6

1 初始化服务接口--post方法,指定参数layerids,hrn,返回publication的id

https://publish.data.api.platform.here.com/publish/v2/catalogs/hrn:here:data::olp-navinfo:wangpengtest/publications

参数:

{
  "layerIds": [
    "as12443565"
  ],
  "versionDependencies": [
    {
      "direct": true,
      "hrn": "hrn:here:data::olp-navinfo:wangpengtest",
      "version": 1
    }
  ]
}

返回值:

{

    "catalogId": "wangpengtest",

    "catalogVersion": -1,

    "details": {

        "expires": 1574937169175,

        "message": "Publication has been initialized",

        "modified": 1574677969175,

        "started": 1574677969175,

        "state": "initialized"

    },

    "id": "v2-352dbef3-edb6-455c-b3ee-ee47e12239b2",

    "layerIds": [

        "as12443565"

    ],

    "versionDependencies": [

        {

            "direct": true,

            "hrn": "hrn:here:data::olp-navinfo:wangpengtest",

            "version": 1

        }

    ]

}

2上传数据

https://volatile-blob.data.api.platform.here.com/blobstore/v1/catalogs/hrn:here:data::olp-navinfo:wangpengtest/layers/as12443565/data/csupload1126-1

上传数据时会指定datahandle

3挂载元数据信息

https://publish.data.api.platform.here.com/publish/v2/catalogs/hrn:here:data::olp-navinfo:wangpengtest/layers/as12443565/publications/v2-a798585f-3bc5-4e14-96d7-e22a945c1d4d/partitions

{

  "partitions": [

    {

      "partition": "314010583",

      "dataHandle": "csupload1126-1",

      "checksum": "ff7494d6f17da702862e550c907c0a91",

      "compressedDataSize": 152417,

      "dataSize": 250110,

      "timestamp": 1519219235

    }

  ]

}至此,数据即可在here olp平台中见到了

4 提交publication

https://publish.data.api.platform.here.com/publish/v2/catalogs/hrn:here:data::olp-navinfo:wangpengtest/publications/v2-a123eff9-28b1-4f7e-a73d-c69c053b45a5

 

5下载元数据信息

https://sab.metadata.data.api.platform.here.com/metadata/v1/catalogs/hrn:here:data::olp-navinfo:wangpengtest/layers/as12443565/partitions

在header中添加 additionalFields为指定的要返回的字段,如checksum等

 

发布了243 篇原创文章 · 获赞 36 · 访问量 14万+

猜你喜欢

转载自blog.csdn.net/A873054267/article/details/103243056
今日推荐