Contentful logo

Contentful Community

How to access other space's content models without having to copy

Hi Team!

In my current project, I am planning to have an approach where there are several spaces that will be used yet they all kind of have similar content models.

I stumbled to this export tool but it seems like what it does is to make backup entities to another space, while what I want to project here is to share, in my case, content models without having to copy them to the target space.

Do you think this is possible to do?

Thankss, looking forward for the input :slight_smile:

Hi @aldi.putra,

The functionality of contentful-export is more or less included in the Contentful CLI these days. You can import content models with the command:

contentful space export --space-id <SPACE_ID> --management-token <MANAGEMENT_TOKEN> --skip-content --skip-roles --skip-webhooks

This will result a JSON file containing the exported content models. You can then import them into another space with the command:

contentful space import --space-id <SPACE_ID> --management-token <MANAGEMENT_TOKEN> --content-file <FILENAME>.