Home App Docs Github

New Model Option with the default setting true becomes false on all existing pages

When creating a new option under model option https://builder.io/models there with a boolean value and default setting = true. All existing pages get the setting = false. This cause us to go through every single page and change it to true.

Can you help me bulk fix this?

Hi Peter, thanks for reaching out. You are correct that default values are not applied retroactively. This is intentional since automating data migrations could unintended issues for our customers. The best way of bulk editing your content is to use our Write API: https://www.builder.io/c/docs/write-api

In other words, fetch your content with our Content API (https://www.builder.io/c/docs/query-api). And then iterate over the results and send a PATCH or PUT request to the Write API with whatever updates you’d like to make to the content entries.

Please let me know if you need any additional help with using those APIs!