🎤 Builder Talk: The Story Behind Lady Gaga’s Digital Experience – 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?

Related answers

Get more help in the community Slack

TopicCategoriesFeaturedRepliesLast Updated
Filtering out duplicate slugs after a large data importSep 8, 2020
Modifying a string value via a callback in JavaScriptJun 16, 2020
How to perform a "publish" through the API/JavaScript client in Sanity.ioJul 21, 2020
I’m experiencing an error when trying to deploy `sanity graphql deploy` and getting this error point towards a node_module ```import...Jan 16, 2021
Gatsby site crashing with cryptic error, resolved by adjusting resolveReferences depthAug 18, 2020
Updating object properties in an array on a document with the Sanity clientMar 17, 2021
Discussing Sanity and Shopify integration, speed optimization, and alternativesSep 9, 2021
Making GROQ params optional in Next.js frontend API endpoint queryJan 19, 2022
Error in React/Sanity tutorial code, resolved with missing comma in querySep 29, 2021
Creating datasets with public and private documents and accessing them in the CMS.Sep 6, 2020

Related contributions

Turbo Start Sanity
- Template

The battle-tested Sanity template that powers Roboto Studio's websites

Go to Turbo Start Sanity

Schema UI - Next.js Sanity Starter
- Template

A Next.js starter template with Next.js 15, Tailwind CSS, shadcn/ui, and Sanity CMS with Live Editing. Get production-ready React components with matching Sanity schemas and queries. Build dynamic pages faster while keeping full control over customization.

Serge Ovcharenko
Go to Schema UI - Next.js Sanity Starter

The Swaddle
- Made with Sanity

A new brand identity to represent a more mature company, to signify The Swaddle’s evolution from publisher to production house, combined with an easier to navigate platform that can surface multiple content types - drawing readers through The Swaddle’s content offering.

Nightjar
Go to The Swaddle