Using the Upload API

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

See Managing Connectors and Connector Servers for general instructions on enabling the Upload API connector.

After the connector has been set up, you can create data source configurations that specify the necessary connection information and identify the data you want to use. See Manage Data Source Configurations for more information. After data sources are configured, they can be used to create dashboards and charts from your data. See Creating Dashboards and Creating Charts.

Zoomdata Feature Support

The Upload API connector supports all Zoomdata features, except for the following features:

  • Custom SQL queries
  • Fast distinct values
  • Kerberos authentication
  • Multivalued fields
  • Nested fields
  • Partitions
  • Progress reporting
  • Text search
  • User delegation

Setting Up the Upload API Data Source

  1. Log into Zoomdata as an administrator.
  2. Select Sources.
  3. Select Upload API.
  4. Specify the name of your source and add a description (if desired).
  5. Click .
  6. On the Sampling page, enter your sample data. The supported formats are CSV or JSON. You can also upload sample data from a file.
  7. Select Preview to view your data.
  8. Click .
  9. On the Fields Tab, edit the data shown for the source. For more information and steps, see Manage Data Source Configurations.
  10. Click .
  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. Click .
  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.
  15. Click to save your changes. After 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: Appending Data

In the following example, the Upload API accepts an array of JSON objects. 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 a number, you can not upload new rows in which the value of the price field is a string.

curl -v --user <username>:<password> 'https://<Your_Zoomdata_Server>/
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 

Example: Clearing Previously Uploaded Data

In the example below, the Upload API will clear all previously uploaded data from the data source with the ID of <YourDataSourceId>.

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