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!

Sorry about that! Start a conversation now.

We're ready to help, 24 hours a day, 5 days a week

Get support
  • Fernanda Customer Success Avatar

    Megan

    USA
  • Hariharan Customer Success Avatar

    Hariharan

    India
  • Fernanda Customer Success Avatar

    Yasmin

    Spain
  • Luis Customer Success Avatar

    Luis

    UK
  • Richard Customer Success Avatar

    Richard

    UK
  • Fernanda Customer Success Avatar

    Fernanda

    Brazil
  • Heather Customer Success Avatar

    Kirby

    USA
  • Heather Customer Success Avatar

    Heather

    USA