Clear all data within a dataset

Wipes clean all the existing data in a dataset by passing an empty array via the PUT method (i.e. Replace) and leaves behind an empty dataset. The dataset itself and its schema will be preserved though.

Example

The example provides the empty array syntax when using Curl.

curl https://api.geckoboard.com/datasets/sales.by_day/data \
  -X PUT \
  -u '222efc82e7933138077b1c2554439e15:' \
  -H 'Content-Type: application/json' \
  -d '{ "data": [] }'

Response:

{}

The example provides the empty array syntax when using Node.js.

dataset.put([]);
dataset.put([])

Example

The example provides the empty array syntax when using Ruby.

dataset.put([]) # => true
dataset.post(items, delete_by)

Example

The example provides the empty array syntax when using Python.

dataset.put([])

Response:

True
Was this article helpful?

Awesome! 👍  Thanks so much for your feedback!