Storyblok is the API based & Headless CMS. It has a really good, clean and structured JSON for you as developer and a CMS with truevisual preview.
Basically, editor will create content. Developers create content type (here we call Component) freely. Because we gave “free” to developers, they might create a lot, and introduce wasted.
Storyblok does not (???) have a good way to find and delete those wasted components, so here is my approach:
- Get all story via REST API (use Postman or Firefox)
https://api.storyblok.com/v1/cdn/stories?token=YOUR_API_TOKEN_HERE_fZLadiRvwtt
- Copy your response (all stories JSON) to paste to text editor (I use Sublime Text)
- Reformat the response (easier to read)
- Search for
"components: "
- Then select all occurences (Alt-Enter, then Home, Shift-End)
- Cut all occurences and paste to the editor (Ctrl-X, Ctrl-V)
- Select menu: `Edit / Permute lines / Unique`
==> now we have a list of “inuse Components”
Go to your space to delete unuse components http://app.storyblok.com/#!/me/spaces/SPACEID/components