Zoomdata Version

Generating a Security Key

OVERVIEW

This article explains how to generate a security key. You need to have a security key to access your Zoomdata server and its charts, API, and data from a third-party webpage or application. When generating a key, you have the option of setting an expiration date and time for it.

Security keys formerly have been described as 'API keys'. This usage has been updated.

The instructions provided below also details the methods to generate a security key in a Linux environment or from any web browser.

PREREQUISITES

To generate a security key to access the Zoomdata Server, you must have network access to it.

GENERATING A Security KEY IN A LINUX ENVIRONMENT

  1. Use your terminal to enter the following command:
    curl -v --user [username:password]
    http:// yourcompanyurl /service/sources/key?source= [Real+Time+Sales] --insecure

    in which:

    • username:password is replaced with your actual credentials
    • yourcompanyurl is replaced with the URL for your Zoomdata deployment, usually yourcompany.com/zoomdata.
    • Real+Time+Sales is replaced with the with the chart source that you want to access, replacing spaces in the name with plus signs (+). You can grant access to multiple sources, provided you have access to them all, by separating multiple source names with commas but not spaces, like so:
      source=Real+Time+Sales,Housing+Sales,HR+Records
  2. Identify the security key in the generated output. For more information about identifying the security key, see Identifying the Security Key below.

GENERATING A Security Key FROM A WEB BROWSER

  1. Enter your Zoomdata service URL in the address bar:
    https:// yourcompanyurl /service/sources/key?source= Real+Time+Sales

    in which:

    • yourcompanyurl is replaced with the URL for your Zoomdata deployment, usually yourcompany.com/zoomdata .
    • Real+Time+Sales is replaced with the with the chart source that you want to access, replacing spaces in the name with plus signs (+). You can grant access to multiple sources, provided you have access to them all, by separating multiple source names with commas but not spaces, like so:
      source=Real+Time+Sales,Housing+Sales,HR+Records
  2. Press Enter . Enter your user ID and password if you are prompted to do so.
  3. Click Login to open a webpage with an outputted JSON object.
  4. Identify the security key in the generated output. For more information about identifying the security key, see Identifying the Security Key below.

Setting an Expiration Date for the Key

Optionally, you can set an expiration date for a security key while generating it. To add an expiration date to a security key, append the expiration date to the end of the request in the following format.

&expirationDate=yyyy-mm-ddThh:mm:ss.sss

The capital T separates the date part from the time part of the date-time parameter. A completed example of a correct request follows.

https://www.yourcompany.com/zoomdata/service/sources/key?source=Real+Time+Sales &expirationDate=2015-09-15T19:15:30.000

The key generated in the example expires on 15 September 2015 at 7:15:30 p.m., according to the Zoomdata server's local time.

IDENTIFYING THE Security KEY

Within the outputted JSON object, the security key is identified by the label token and is enclosed in quotation marks, which are not part of the security key itself. Example output:

{ "id": "5910e8eee4b0e9185cd048fd", "accountId": "5898841fe4b0c9dbdb601337", "created": "2017-05-08 21:53:50.117", "expire": "2027-05-08 21:53:50.117", "createdBy": "admin", "securityKeyType": "SOURCE", "objectIds": [ "59079206e4b0efde29135495" ], "token": "BldSqp2yBq" }
If you specified an expiration date and time for the key, details of the expiration date and time are included in the output.
In Zoomdata 2.3, 2.4, and 2.5 prior to patch releases 2.3.21, in 2.4.10, 2.5.4, you referenced the security key by its id. Starting with these patch releases and in future versions of Zoomdata, use token. Security keys already generated will function correctly when referenced by id; starting with these patch releases, new security keys must be referenced by their token.