Skip to main content

API

Dromo Data APIs

The following are APIs you can use to fetch information about uploads. These require a backend API key, which you need to pass as a as a header param called X-Dromo-License-Key.

NOTE

This backend API key is different than your frontend license key. Please use the "Backend" license key from your Dromo Dashboard.

Fetch uploaded data

In order to fetch the data your user uploaded, you can make GET requests to the following endpoint:

https://app.dromo.io/api/v1/upload/<uploadId>/data/
note

This endpoint only returns 10,000 rows at a time (per request). To specify which rows to return, you can pass in optional parameters start and end to specify the rows you want. For exmaple: https://app.dromo.io/api/v1/upload/<uploadId>/data/?start=0&end=10 would return 11 items, indexed 0 to 10.

For example, if you sample the first two rows of an uploaded file, this is the response you would get:

{
"data": [
{
name: "Jack",
email_address: "jack@thehill.com",
},
{
name: "Jill",
email_address: "jill@thehill.com",
}
],
"start": 0,
"end": 1,
"total_num_rows": 2
}

Fetch upload metadata

To get data about the upload, you can make a GET request to the following endpoint:

https://app.dromo.io/api/v1/upload/<uploadId>/metadata/

The expected response takes the following shape:

{
"id": "<uploadId>",
"import_identifier": "Contacts",
"raw_upload": {
"filename": "customerLocalFileName.xls"
},
"user": {
"id": "1",
"name": "Jane Doe",
"email": "jane@dromo.io",
"company_id": "Dromo",
"company_name": "12345"
},
"total_num_rows": 200,
"created_date": "2021-08-01T21:21:41.271419Z"
}

Delete uploaded data

In order to delete any user uploaded data, you should make a POST request to the following endpoint. Please note that this is permanent and not reversible.

https://app.dromo.io/api/v1/upload/<uploadId>/delete/

Note: if the file was deleted successfully the endpoint will return HTTP 200 with no body.

Fetch all uploads

This endpoint returns a list of all uploads the organization has made. The list is sorted from newest to oldest. Include the query parameter: ?development_mode=true to see uploads made in development mode.

Make a GET requests to the following endpoint:

https://app.dromo.io/api/v1/uploads/
note

This endpoint only returns 1,000 uploads at a time (per request). To specify which uploads to return, you can pass in optional parameters start and end to specify the uploads you want. For exmaple: https://app.dromo.io/api/v1/uploads/?start=0&end=10 would return 11 items, indexed 0 to 10.

For example, if you request the first two uploads (out of a total of 54) you might see something like this:

{
"start": 0,
"end": 1,
"total_num_uploads": 54,
"data": [
{
"id": "ad650705-efce-40b2-9316-12e6e3ec8dd9",
"import_identifier": "data upload",
"raw_upload": {
"filename": "short_names_email_csv.csv"
},
"user": {
"id": "1",
"name": "Jeff",
"email": "jeff@dromo.io",
"company_id": "12345",
"company_name": "DataCo"
},
"created_date": "2022-07-05T22:44:13.905224Z",
"upload_status": "PROCESSED",
"total_num_rows": 11,
"invalid_row_indexes": [
4,
8
]
},
{
"id": "ec68a6da-fd92-4a00-90c7-e26035792205",
"import_identifier": "data upload",
"raw_upload": {
"filename": "short_names_email_csv.csv"
},
"user": {
"id": "test",
"name": null,
"email": null,
"company_id": null,
"company_name": null
},
"created_date": "2022-07-01T19:09:41.254521Z",
"upload_status": "PROCESSED",
"total_num_rows": 9,
"invalid_row_indexes": [
2,
3,
4,
8
]
}
]
}