Zoomdata Version

Using the Upload API

You can use the Zoomdata Upload API to dynamically upload and stream your data in real-time. Setting up and configuring an Upload API connector has two parts:

The table below lists information on the features Upload API.

Supports Distinct Count? Yes
Supports Live Mode/ Playback? Yes
Supports Group-by Time? Yes
Supports Multi Group-by Charts? Yes
Supports Histogram? Yes
Supports Box Plot? Yes
Supports Derived Fields? Yes
Custom SQL Capable? No
Supports Last Value? No

Setting up your upload api DATASOURCE

  1. Log into Zoomdata.
  2. Select Sources.
  3. Select Upload API.
  4. Specify the name of your source and add a description (if desired).
  5. Select Next.
  6. On the Sampling page, enter your sample data. The supported formats are CSV, JSON, or XML. You can also upload sample data from a file.
  7. Select Preview to view your data.
  8. Select Next.
  9. On the Fields page, you can edit the data show for the source. For more information and steps, see Connecting to Data.
  10. Select Next.
  11. On the Refresh page, you can set the refresh rates or your data. If you want to schedule a refresh of all your data, you can do so by selecting Schedule and then selecting an option. If you only want certain fields within your data to be refreshed, select Configuration.
  12. You can use the sample cURL calls to clear previously stored data or add additional data to the source. The example cURL calls can be found on the API Endpoints page.
  13. Select Next.
  14. On the Charts page, you can:
    • Edit Global Default Settings.
    • Select the Standard and, if available, Custom chart styles to be used with the data source.
    • Set default parameters (group, sub-group, colors, sorting, and so on) for each chart style.

Select Finish to save your changes. Once your data connection has been established, it is listed under My Data Sources.

Working with the upload api

There are two operations that can be performed using the Upload API: appending additional data and clearing previously uploaded data. The data source wizard offers convenient example cURL requests but the APIs can be leveraged from your preferred development platform.

Remember to modify the example cURL requests to include your own Zoomdata credentials, replacing the placeholders for username and password.

curl -v --user username:password YourServer

Example: Append Data

curl -v --user username:password 'https://YourZoomdataServer/zoomdata/api/upload/YourDataSourceId?accountId=YourAccountId' -X POST -H "Content-Type: application/json" -d '[{"price":100.5,"venue_id":"V678","venue_name":"Pizza Barn"}]' --insecure

In the example above, the Upload API accepts an array of JSON objects.  Please note that the object field types must match those used to create the Upload API source originally.  For example, if the value of the price field is an number, you can not upload new rows in which the value of the price field is a string.

Example: Clearing previously uploaded data

curl -v --user username:password 'https://YourZoomdataServer/api/upload/YourDataSourceId?accountId=YourAccountId' -X DELETE --insecure

In the example above, the Upload API will clear all previously uploaded data from the datasource with the Id of YouDataSourceId.

Was this topic helpful?