Hello, i want to know if there is a way to merge the newly created content models in one environment to another if they are created with the web UI of Contentful and using the CLI for this. Let’s say i have a “dev” and “test” environments which basically are equal but i decided to add two more models in “test” using the web UI and now i want them to be merged into the “dev” env. Is this possible to do via the CLI and how if so?
There is the content model migration tool (contentful-migration/README.md at master · contentful/contentful-migration · GitHub) which now belongs to Contentful CLI tool.
However, I never used it, our content models are not big so it is bearable to copy them manually.
Is there a way to do it without the CLI tool but as a library?
Yes, there are many SDK to do it, or with Postman. Your tool will have to query from the “test” space and update the “dev” space.
You could do it with Content Management API.
In the .NET SDK, there are methods like GetContentType, GetContentTypes, CreateOrUpdateContentType.