Data Lens Developer's Guide

Publishing a Query

After you create a query, it is "private" by default. This means that only query owners can request the query results. You can choose to allow access to your query to unauthenticated users, which you would need to do when you want to publish a visualization that uses the query.

To publish one or more queries, you first define a JSON request body containing the IDs of the queries to make public:

{
  "queries": {
    "visibility": "public",
    "ids": [
      "QUERY_ID_1",
      "QUERY_ID_2",
      "QUERY_ID_3"
     ]
  }
}

You then send this in an authenticated POST request to:

https://datalens.api.here.com/v1/publishing?app_id={YOUR_APP_ID}&app_code={YOUR_APP_CODE}

To do this in Postman (see Using Postman):

  1. Paste the URL above into Postman's URL bar.
  2. Set the request type (next to the URL bar) to POST.
  3. Select Body and switch to raw.
  4. Enter the request payload with a list of one or more query IDs, as shown above, into the Body input field.
  5. Click Send.

The response will look something like this:

{
  "queries": {
    "ids": [
      "0ba17e521ea1472db51a8cfc09fc1155"
    ],
    "visibility": "public"
  }
}

Likewise, you can set a query to private by sending the request above with the "visibility" property set to "private".

Note that if you do not want to make your queries public for your application, you can authenticate with JavaScript inside your app; see here for instructions.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.