✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

Browsing raw data and wiping all data in a Sanity instance discussed.

7 replies
Last updated: Apr 28, 2020
Is there a way to browse the raw data in a Sanity instance without creating a schema for it for Studio? I am working my way from a boilerplate project down to what I need, and I have some old documents referencing my documents so I can’t delete them
Apr 28, 2020, 7:00 PM
Yes! For example by curling the HTTP endpoints https://www.sanity.io/docs/http-api
Apr 28, 2020, 7:05 PM
Is there a way to wipe all data in the instance?
Apr 28, 2020, 7:06 PM
There is a lot of garbage objects since I deleted most of the boilerplate schemas
Apr 28, 2020, 7:06 PM
The easiest way is to delete the dataset
Apr 28, 2020, 7:07 PM
right
Apr 28, 2020, 7:07 PM
There’s also this, but requires at least the sanity.json I think. Or maybe you can run it with project id and dataset name as env variables https://github.com/sanity-io/sanity-recipes/blob/master/snippets/deleteDocsByFilter.js
Apr 28, 2020, 7:09 PM
deleting and recreating the dataset worked, thanks!
Apr 28, 2020, 7:09 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?