DataSet API

Import and Export Data

Leveraging the power of Domo’s data pipeline can be achieved extended with the flexibility of the DataSet API import and export capabilities.  The Domo platform allows you to easily store, transform, aggregate, and query data. As a result, your data can then power rich visualizations or just as easily be shared with other external systems by executing an export of your Domo DataSet.

NOTE: In order to import or export data you must first have a DataSet created. To learn how to create a DataSet, utilize the DataSet Quickstart.

The following details are provided to fully understand the capabilities of the DataSet API for importing and exporting data:

Prepare data for import

As you begin the process of importing your data we we recommend you first review Domo’s data format specifications before you import.

Known limitation
The DataSet API only supports importing data in CSV format

Choosing update method

Once creating a new DataSet via the API, store the DataSet's dataset_id or simply retrieve preferred dataset_id through the DataSet API.

With the dataset_id, it is important to choose the appropriate updateMethod when importing data via the API. The two choices available are either to APPEND or REPLACE the data that currently exists in the DataSet. Choosing APPEND will incrementally create new rows of data to the dataset as they are imported through the API. REPLACE will completely remove the existing data and refresh the DataSet with all data from the last import via the API.

Defining which method to use when importing data with the API is done through the updateMethod parameter as shown in the example below:

PUT https://api.domo.com/v1/datasets/{DATASET_ID}/data?updateMethod=APPEND 

In the example above, any data will be added to bottom of the DataSet.

Import Data

Once you've chosen the type of updateMethod for the data you plan to import you will then need to use the dataset_id to make the following request:

Sample Request

See it in your language

See this sample request in Java, Python.
PUT https://api.domo.com/v1/datasets/317970a1-6a6e-4f70-8e09-44cf5f34cf44/data
Content-Type: text/csv
Authorization: bearer <your-valid-oauth-access-token>

1,2,3
4,5,6
7,8,92

Domo will return a response of success or error for the outcome of data being imported into DataSet.

Sample Response

HTTP/1.1 204 No Content

Export Data

Domo enables you the power to export data that has been prepared and transformed through Domo's data platform.  

When requesting an export of a DataSet, you may choose to include the column headers and the name of the file.  

You will then need to use the dataset_id again in your request as seen below. In this example you will notice the resulting file exported will include column headers and will be named "Q4_Sales_Data".

Sample Request

See it in your language

See this sample request in Java, Python.
GET https://api.domo.com/v1/datasets/317970a1-6a6e-4f70-8e09-44cf5f34cf44/data?includeHeader=true&fileName=Q4_Sales_Data.csv 
Accept: text/csv
Authorization: bearer <your-valid-oauth-access-token>

Domo will return a response of success or error for the outcome of data being imported into DataSet.

Sample Response

HTTP/1.1 200 OK
Content-Disposition: attachment; filename=Q4_Sales_Data.csv

first,second,third
1,2,3
4,5,6
7,8,92

Next Steps

Explore more about the DataSet API now that you know how to import and export data.




Need additional help?

No problem, we'd love to help. Explore our documentation, answers to frequently asked questions, or join other developers in Domo's Developer Forum.  For further help, feel free to email us or contact our sales team.