Publish Data to Catalogs
To publish data to a catalog:
- Register your app and generate app credentials.
- Publish to the appropriate layer type:
Note
You must have a HERE platform account to proceed. If you do not have an account, contact your organization's HERE platform administrator and request to be invited to the HERE platform as described in Add and Manage Groups.
Register Your App and Generate App Credentials
In order for your application to write data to the HERE platform, you must register your application by generating an ID and credentials for the application. For instructions, see Manage Apps.
Once you have registered your application, share the catalog with the app. For instructions, see Share a Catalog.
Note
You cannot publish data to a catalog unless the catalog is shared with the app ID.
Publishing to a Versioned Layer or Volatile Layer
To publish data to a versioned or volatile layer, use HERE platform Data Client Library. The Data Client Library provides Java/Scala libraries for publishing data to HERE platform catalogs.
Set Up Your Development Environment
Make sure your system has the required software installed. The required software is listed in Prerequisites. Your environment is set up correctly if there are no errors.
Note
In Prerequisites, ignore steps 7 and 8 in the section titled "Get Credentials". These do not apply to Marketplace users.
Add the Data Client Library to Your Project
By means of the HERE Maven Wagon plugin, you can integrate the Data Client Library into Maven projects. For SBT projects, you can use the unofficial HERE SBT Resolver plugin.
Maven Project
To use the Data Client Library in your Maven project, add the following snippet to your pom.xml
file:
<repositories>
<repository>
<id>HERE_PLATFORM_ARTIFACT</id>
<layout>default</layout>
<url>here+artifact-service://artifact-service</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.here.platform.data.client</groupId>
<artifactId>data-engine_2.11</artifactId>
<version>1.1.30</version>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>com.here.platform.artifact</groupId>
<artifactId>artifact-wagon</artifactId>
<version>2.0.5</version>
</extension>
</extensions>
</build>
</repositories>
SBT Project
To use the Data Client Library in your SBT project, add the following snippet to your projects/plugins.sbt
file:
addSbtPlugin("com.here.platform.artifact" % "sbt-resolver" % "2.0.14")
And add the following snippet in your build.sbt
file:
resolvers += "HERE_PLATFORM_ARTIFACT" at "here+artifact-service://artifact-service"
libraryDependencies += "com.here.platform.data.client" %% "data-engine" % "1.1.30"
Note
The SBT resolver plugin is provided 'as is' and not officially part of Marketplace. While there is no official support by HERE, you may still raise issues via GitHub.
HERE may be able to help.
Use the Data Client Library to Write Data to a Versioned or Volatile Layer
Now that you have set up your environment, see Publish Data in the Data Client Library Developer Guide for information on using the Data Client Library to publish data to a catalog.
Publish to a Stream Layer
To publish data to a stream layer, use the ingest
REST API.
To get started, you must get credentials and an authorization token for your REST requests. See the sections "Get Credentials" and "Get an Authorization Token" in the Data API Guide's Get Started.
Next, get the base URL for the ingest
API for the catalog you want to publish using the api-lookup
service. See the section "Get the API Bse URLs for a Catalog" in the Data API Guide's Get Started.
Once you have credentials and an authorization token, you can publish data following the instructions in the section Publish 1 MB or Less of Data in Publish Data to a Stream Layer.
Note
Marketplace users must use the ingest
API to write data to a stream layer, so you must follow the procedure described in "Publish 1 MB or Less of Data" to publish data to a stream layer. This is necessary so that metrics can be calculated.
Here are the key concepts you should understand related to HERE platform data: