Zoomdata Version

Generating 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 web page or application. When generating a key, you have the option of setting an expiration date and time for it.

Security keys were formerly 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

To generate a security key in a Linux environment:

  1. Use your terminal to enter the following command:

    curl -v --user <username:password> http://<yourcompanyurl>/api/sources/<id>/key?source=<Real+Time+Sales> --insecure

    Replace:

    • <username:password> with your actual credentials

    • <yourcompanyurl> with the URL for your Zoomdata deployment, usually yourcompany.com/zoomdata.

    • <Real+Time+Sales> with the 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. For example:

      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.

Generating a Security Key from a Web Browser

To generate a security key from a web browser:

  1. Enter your Zoomdata service URL in the address bar:

    https://<yourcompanyurl>/api/sources/<id>/key?source=<Real+Time+Sales>

    Replace:

    • yourcompanyurl with the URL for your Zoomdata deployment, usually yourcompany.com/zoomdata

    • Real+Time+Sales with the 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. For example:

      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 web page 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.

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/api/sources/<id>/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.

Was this topic helpful?