Data Lens Developer's Guide

Uploading Data from a File

To upload data directly from a CSV file with the Data Lens REST API, you need to specify the name of the file in the request body. The request body's mime-type is multipart/form-data with one mandatory part having the key name and the mime-type file.

To ingest a data file, do the following:

  1. Create an empty dataset with a POST including the following request body:
    {
        "name": "Name of your new dataset",
        "description": "Description of your new dataset, can be empty"
      }
    to this resource:
    https://datalens.api.here.com/v1/datasets?app_id={YOUR_APP_ID}&app_code={YOUR_APP_CODE}
    You will receive a response body that contains the new dataset ID.
  2. Define form data with the key name and the mime-type file, specifying the CSV file to upload, and POST to this resource:
    https://datalens.api.here.com/v1/datasets/[dataset_id]?app_id={YOUR_APP_ID}&app_code={YOUR_APP_CODE}
    where [dataset_id] is the dataset ID received in the previous step.
  3. Optionally, you can check the progress of the data ingestion by sending a GET to the following resource:
    https://datalens.api.here.com/v1/jobs/[job_id]?app_id={YOUR_APP_ID}&app_code={YOUR_APP_CODE}
      
    where [job_id] is the job ID included in the response of the previous step.

You can also upload data and append it to an existing dataset. The uploaded data is first validated against the dataset schema. To append data instead of replacing the dataset contents, add another form field of type text containing the key append and the value 1.

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.