DataSet API

Managing DataSets

DataSets enable visualizations, alerts, and user collaboration that ultimately allows businesses to make data driven decisions and then take action.  Since data a foundation to the Domo platform, it is important to maintain the accuracy and ownership of datasets.  The DataSet API enables you to automate processes to ensure DataSets have the correct information, access, and ownership.

Note: Only DataSets created with the API can be updated via APIs.

Changing DataSet owner

Often there may be a case where an owner of a DataSet has changed companies and has had their access removed or simply changed roles in a company and is no longer responsible for the maintenance of a DataSet. In these cases, the DataSet API allows you to programmatically make updates by first querying for all DataSets owned by a user and then updating each with the new owner's user ID.

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
Content-Type: application/json
Accept: application/json
Authorization: bearer <your-valid-oauth-access-token>

{
  "name": "Leonhard Euler Birthday Bash",
  "description": "VIP Guest List",
  "owner": {
    "id": 28,
    "name": "Carl Friedrich Gauss"
  },
}

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-Type: application/json

{
  "id": "4405ff58-1957-45f0-82bd-914d989a3ea3",
  "name": "Leonhard Euler Birthday Bash",
  "description": "VIP Guest List",
  "rows": 0,
  "columns": 0,
  "schema": {
    "columns": [ {
      "type": "STRING",
      "name": "Friend"
    }, {
      "type": "STRING",
      "name": "Attending"
    } ]
  },
  "owner": {
    "id": 28,
    "name": "Carl Friedrich Gauss"
  },
  "createdAt": "2016-06-21T17:20:36Z",
  "updatedAt": "2016-06-21T17:48:41Z",
"pdpEnabled": true,
  "policies": [ {
    "id": 8,
    "type": "user",
    "name": "Only Show Attendees",
    "filters": [ {
      "column": "Attending",
      "values": [ "TRUE" ],
      "operator": "EQUALS",
      "not": false
    } ],
    "users": [ 27 ],
    "groups": [ ]
  } ]
}

Updating a DataSet schema

At times it is necessary to update the DataSet's schema. Please note that if a DataSet's schema is updated.

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
Content-Type: application/json
Accept: application/json
Authorization: bearer <your-valid-oauth-access-token>

{
  "name": "Leonhard Euler Birthday Bash",
  "description": "VIP Guest List",
  "pdpEnabled": true,
  "schema": {
    "columns": [ {
      "type": "STRING",
      "name": "Friend"
    }, {
      "type": "STRING",
      "name": "Address"
    }, {
      "type": "STRING",
      "name": "Attending"
    } ]
  },
}

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-Type: application/json

{
  "id": "4405ff58-1957-45f0-82bd-914d989a3ea3",
  "name": "Leonhard Euler Birthday Bash",
  "description": "VIP Guest List",
  "rows": 0,
  "columns": 0,
  "schema": {
    "columns": [ {
      "type": "STRING",
      "name": "Friend"
    }, {
      "type": "STRING",
      "name": "Address"
    }, {
      "type": "STRING",
      "name": "Attending"
    } ]
  },
  "owner": {
    "id": 27,
    "name": "DomoSupport"
  },
  "createdAt": "2016-06-21T17:20:36Z",
  "updatedAt": "2016-06-21T17:48:41Z",
"pdpEnabled": true,
  "policies": [ {
    "id": 8,
    "type": "user",
    "name": "Only Show Attendees",
    "filters": [ {
      "column": "Attending",
      "values": [ "TRUE" ],
      "operator": "EQUALS",
      "not": false
    } ],
    "users": [ 27 ],
    "groups": [ ]
  } ]
}

Next Steps

Now that you’ve learned more ways to automate your management of DataSets in Domo, read more about other ways to extend the DataSet API:




Have additional questions?

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.