Contentful Certified Professional Exam: Study Guide
Contentful Certified Professional Exam: Study Guide
Contentful Certified Professional Exam: Study Guide
Professional Exam
study guide
Whether you are in an organization that is implementing Contentful, you work for an agency
that serves Contentful clients, or you are an independent consultant, becoming a Contentful
Certified Professional can help your career by providing objective proof of your Contentful ex-
pertise.
While exam candidates who use the Study Guide tend to do better on the exam than those who
don’t, the study guide is neither a list of exam questions nor an answer key. There may be ques-
tions on the exam that aren’t covered here.
In addition to the Study Guide, here are three other ways to supplement your learning:
1. Take the Developer and Content Modeling courses available in the Contentful Learning
Center.
2. Explore the Contentful Developer Portal. Here you will find links to product documenta-
tion, forums, videos covering technical topics, and more.
3. Get hands-on experience with Contentful. If you don’t already have access to Contentful,
you can sign up for a free account.
Content Modeling
Structured content................................................................................................24
From structured content to content modeling.................................................25
Content types and fields......................................................................................26
What should you store in Contentful?................................................................27
Topics vs assemblies............................................................................................28
Fixed vs flexible assemblies ...............................................................................29
Inheritance.............................................................................................................30
Composition .........................................................................................................31
Localization............................................................................................................32
Field-level localization..........................................................................................33
Entry-level localization.........................................................................................34
Asset management...............................................................................................35
Media wrapper content types.............................................................................36
Using a DAM..........................................................................................................37
Rich text..................................................................................................................38
Extensibility
Why extensibility?.................................................................................................45
Contentful’s extensibility journey........................................................................45
What is an App?....................................................................................................46
What is the App Framework? .............................................................................46
Apps vs UI extensions..........................................................................................47
Apps use cases......................................................................................................47
Apps locations.......................................................................................................48
Webhooks
What is a webhook?.............................................................................................49
Configuring webhooks........................................................................................50
One of the main drivers causing organizations to move to Contentful is that the nature of digital
content is changing rapidly. To keep up, organizations of all kinds find themselves in the busi-
ness of creating software. In the past, digital content mostly meant websites. But today, digital
content can be displayed on a wide variety of devices—phones, watches, conversational inter-
faces, kiosks, digital billboards and many more. Contentful makes it possible to launch new digi-
tal sites quickly, reuse content between sites, and display content on any kind of digital device
(websites, mobile apps, IoT devices, VR and AR experiences, etc).
The big benefit of this modern stack is to enable digital teams to have greater agility and im-
pact by focusing on their company’s core business value and outsourcing the rest to an ecosys-
tem of purpose-built services.
There is no marketplace here because no enterprise digital leader would actually purchase
“digital experience” as a platform. DX is a strategy and approach, and no single platform or ven-
dor on this chart will get you there. We view Contentful as being the content layer in the mod-
ern enterprise digital experience stack.
Structured content
• You get a lot more flexibility by creating your content as components so it can be reused
and repurposed across products, channels, and teams
• It’s flexible enough for existing apps and future-proof for those yet to come
• It’s context-agnostic, independent from mediums, platforms, programming languages,
etc.
• It’s also not tied to opinionated data models like a traditional CMS
Decoupled architecture
• The content is decoupled from the presentation layer so your team can build unique cus-
tomer experiences
• By being born in the cloud, it was built to connect with other platforms and services
• It’s composable, allowing you to use only what you need, and adopt new features as you
grow
• It scales confidently on an enterprise-tested platform
Agile workflows
• It was born agile, purpose-built to integrate with software delivery pipelines, developer
environments, and automation
• It changes with your software and workflows
• It lets you iterate and experiment fast, inside your soft-
ware delivery pipeline
By integrating Contentful with Adobe’s personalization and analytics tools, Telus has seen a 14%
increase in conversions. And with Contentful’s infrastructure and CDNs for caching API calls
they’ve seen a 30% increase in page speed.
For you to use the content managed through the API-first CMS, you will get an API, typically a
REST API that serves the managed content, including functionality to search, filter, sort and pag-
inate the returned content.
And on top of that API, you are free to use whatever framework, methodology and language
you want.
After content is published it can be retrieved through the Content Delivery and Images APIs, as
well as the SDKs built on top of them.
For companies accepting credit card payments, Contentful offer full PCI DSS compliance. The
data centers used for storing your content and allowing it to be delivered to your users are cer-
tified for compliance with the ISO 27001 standard. And of course we are GDPR-compliant.
Scale and High Availability platform types are both PCI DSS compliant. Multi-Region Delivery In-
frastructure (MRDI) is also an option for enterprise customers, where, in the highly unlikely event
of an AWS region failure, Contentful will automatically route traffic to a second AWS region.
Contentful offers up to a 99.99% SLA for customers on MRDI.
Keep in mind
While Contentful is used across a large num-
ber of vertical industries in many different
usage scenarios, there are some use cases
that are not a good fit:
• User-generated content
• Static sites that regenerate extremely
frequently
• WYSIWYG author experience
• Countries that censor content
websites is often not a good use case for us.
User-generated content has the potential
Be excited
to flood our CMA APIs with large bursts of
These are examples of some of the very best
content posts and exceed the rate limits de-
use cases for Contentful:
signed for editorial teams, not thousands of
concurrent users. While you could consider • Enabling content operations at scale
adding a proxy server between the posting of • Building engaging, cutting edge appli-
user-generated content and Contentful, it is cations
often best to use purpose-built SaaS solution • Enabling the digital transformation
for this. journey
Static site generators create fast websites and There’s nothing more important than devel-
have great SEO. However, it can often take opment speed and velocity for forward-think-
several minutes to generate new sites after ing companies today. Contentful’s API-first
content changes. Sites that have large editori- model makes it easy for developers to learn
al teams with round-the-clock content chang- how to use the platform. They can typically be
es are often not a good use case for them. making API calls in 30 minutes.
Editors love WYSIWYG interfaces, but they Contentful’s multiple environments, web-
have two big problems: hooks and content migration API let develop-
1. They generate HTML which cannot be ers treat content as code and enable content
easily rendered on non-browser devices operations at scale.
2. They generate large blobs of unstruc-
tured content that do not promote The web is no longer just HTML pages in web
reusability. browsers. Contentful lets developers render
content on any type of digital device, and,
Finally, using Contentful in countries that im- with its easy-to-build UI extensions, integrate
pose a high degree of censorship on with modern personalization engines, DAMs,
AI tools, etc.
PR OS CO N S
PR OS CO N S
PR OS CO N S
PR OS CO N S
There are many benefits to splitting up the APIs into these four segments. The CMA is the only
one that has write-access to Contentful’s infrastructure, and we protect your content by putting
a web application firewall in front of it. There’s no need to do that with the read-only APIs.
Content authors and developers always want the latest content. They don’t want to deal with
stale, cached content. At the same time, content authors and developers need to provide users
with the fastest performance possible. That’s why we’ve put CDNs in front of the Content De-
livery API and Images APIs, while there is no CDN in front of the Content Management API and
Content Preview API. This video provides an overview of all four APIs.
This is a read-only API. Calls to this API are not cached so preview will always have the most up-
to-date content.
Contentful allows you to request an image in a different file format from what you uploaded.
You can convert between the following raster image formats: JPEG (including progressive
JPEG), GIF, PNG, and WebP. WebP images are often 45% smaller in size than the equivalent
PNG version.
Note that all of the above file formats are raster image types. You can upload images in vector
file formats such as SVG, but they will be treated as binary assets and cannot be used with the
Images API.
In addition to scaling and cropping images, the Images API allows you to choose the focus area
for cropping (e.g. top left of the image). You can also instruct the API to do facial detection for
the cropped focus area. The default is the center of the image.
The Images API supports returning an image with a varying level of quality with the “q” param-
eter. Values can be from 1 to 100, with 100 being highest. Smaller quality values will result in
small file sizes. The quality parameter is ignored for 8-bit PNGs.
Using a language-specific SDK has a number of benefits over directly calling the REST APIs.
There is typically a lot of boilerplate code required to set up and make the API call, check the
HTTP response of the result of the call, handle errors consistently, and so on. That’s why the use
of an SDK will significantly speed up your development, while also helping ensure good coding
practices.
We have SDKs for JavaScript (Node.js), PHP, Android (Java), iOS (Swift), Java, Python, Ruby and
.NET.
Contentful’s implementation of GraphQL is built on top of our core REST APIs. There’s no need
for you to create a GraphQL schema — we generate it for you based upon your content model.
Since our GraphQL implementation is built on top of our Delivery APIs, you get the benefit of
high performance due to the caching of delivery API requests using multiple CDNs. While you
can access draft content through our GraphQL implementation, we don’t support underlying
Content Management API calls that would allow for creating or updating content.
As developers and content modelers, we want to make sure we are getting the right content to
the right audience. But, often, when we think about our content, we focus too much on where
the content will live. We fixate on the interface: a website, a mobile device, a digital screen. But
this interface-centric thinking is what often leads us to trouble— endless redesigns, siloed con-
tent, and wasted time and money.
At its simplest, structured content is about separating the “content” from its “context.” To sep-
arate content from context, think of your content as pieces or chunks of data and think of your
context as the interface.
Imagine an article. The “content” is the pieces of data, such as the title, the subtitle, the image,
etc. The “context” is the mobile device, a computer, a newspaper, or any other interface.
Before we go any further, here’s some basic vocabulary you should master:
• Content Model is the overall architecture of your content. It divides up your project’s con-
tent into chunks we call content types. In other words, a content model is a collection of
content types.
• A Content Type is the structure or container for a piece of content. A content type is
made up of fields. Content types are always made from scratch by your development
team. There are no out-of-the-box content types.
• Fields (aka attributes) are different properties or characteristics for a piece of content.
Each field will be assigned a data type such as text, rich text, number, date, location, me-
dia, boolean, JSON object, or reference.
• An Entry is a piece of content based on a content type. You might think of an entry as an
“instance” of that content type. You might have hundreds or thousands of entries based
on a single content type. Entries will be created by content authors.
• A Reference is a link between two content types via a field (specifically a “reference field”).
References create relationships between content types.
• An Asset is any media file that has been uploaded to Contentful, such as images, video,
audio files, .pdfs, and more. Content types can include fields for “media,” which allow con-
tent authors to then link to uploaded assets.
For example, the image below is from the Contentful web app. It is a content type called “Hotel
Landing Page” that belongs to the content model we showed on the previous page. This con-
tent type has four fields. “Title” and “Slug” are text fields while “SEO Metadata” is a one-to-one
reference field and “Sections” is a one-to-many reference field.
The one-to-one reference field only allows content authors to link to a single entry for the con-
tent type “SEO Metadata” while the one-to-many reference field allows content authors to link
to multiple entries for a number of different content types. To create these parameters in the
Contentful web app, navigate to the specific field you want to modify and go to Settings > Vali-
dations. The images below show the validations for these two reference fields.
You can manage a variety of content in Contentful. Contentful offers many different types of
fields with different functionality and options. For example, text fields can be short or long, full-
text searchable or not.
It’s important to note that content can be more than just traditional editorial content. It can be
process metadata, such as content moderation workflow data that would otherwise have to go
into code.
Microcopy is buttons, fields, navigation. These are little bits of copy scattered across websites or
applications that need to be maintained or even localized. You can do microcopy from Content-
ful instead of baking it into code so it can be freed from the development cycle.
You can include fields that store SEO and social media data such as the title and meta descrip-
tion for a page, Open Graph meta tags to ensure the correct thumbnail image is used for shar-
ing content on social media channels, as well as additional metadata for images to help opti-
mize SEO.
TOPI C S ASSEMBLIES
As shown in the image below, one common example of an assembly is an image carousel. On
the left we have an entry for an assembly "Image Carousel" and on the right we have three en-
tries for the topic content type "Image with Caption." The entry for this "Image Carousel" assem-
bly contains references to entries for the topic content type "Image with Caption." This allows
content authors to create multiple instances of it using different photos for each instance while
the front-end code renders the carousel appropriately for each device or context.
Either of these approaches can lead to a good content model, depending on the skills and
preferences of those involved. In practice, content modeling often involves bouncing back and
forth between these two perspectives.
One way to give content authors more control over the layout of components is to use a “flexi-
ble” assembly with a one-to-many reference field. This allows content authors to reorder entries
by simply dragging and dropping.
If you want to lock down a layout into a specific template, you can create a fixed assembly with
a one-to-one reference field. In this scenario, the content author can only link to a single entry
and as a result cannot reorder content by dragging and dropping. This video shows the differ-
ences between fixed versus flexible assemblies.
In practice, many assemblies are a hybrid of both “fixed” and “flexible” with both one-to-one
and one-to-many reference fields. The content type we looked at before, “Hotel Landing Page,”
is a good example of a hybrid assembly.
Similar to the concept of inheritance in software programming, at each lower level, you only
need to specify things that are different from the levels above. In Contentful, you can achieve
this by linking content types using reference fields. With inheritance you can dramatically re-
duce the number of fields you need on each type. Common attributes get moved up to parent
types which are inherited, and maintain these common fields from the top down. Contentful
only supports single inheritance.
Imagine that you are starting an ecommerce site to sell shoes. Your first content model might
have a single “Product” content type with fields for "Name," "Manufacturer, "Color," "Shoe Size,"
"Sole Type," and "Heel Type." At this point it wouldn’t make sense to add the additional fields
needed by pants and shirts to the “Product” content type.
Instead, as shown in the image above, you can put fields that are common to all products in the
“Product” content type, and create additional content types for specific kinds of products with
fields that are specific to that content type.
While inheritance is a very powerful technique to use when designing a content model, most
models will primarily be based around the composition of content types. In the image above,
the “Press Release” content type is an assembly, while “SEO Content”, “Contact Info” and “Loca-
tion Info” are all topics.
In Contentful we use the term locale to describe the different versions of content for different
locations or, more simply, a language-region pair. Contentful enables publishing content in mul-
tiple locales with localization.
Every Space in Contentful has its own set of locales, and each locale is uniquely identified by
its ISO code (e.g. en-US). It’s important to note that locale does not just mean language. While
German is a single language, there are many different German locales. For example, there’s de-
DE for German in Germany, de-AT for German in Austria, de-CH for German in Switzerland, and
so on.
There’s always one default locale defined when you create a space, shown by default in the
Contentful web app and used for Content Delivery API queries that do not request a specific
locale.
You can add a new locale to a space in the Contentful web app or by using the Content Man-
agement API. Contentful also supports custom locales, which some Contentful users employ to
target audiences at the state/province level. This video shows how to add and set up locales.
To set this up in the Contentful web app, navigate to the field you want to have content authors
be able to localize and go to Settings. Here you will want to check the box that says Enable Lo-
calization of this Field.
This design pattern is best for cases where you want publishing of locales to be done synchro-
nously and you have smaller content types with fewer fields. Larger content types with many
duplicated localized fields might start to become too cluttered for content authors.
This video shows how to create a content model with field-level localization.
As shown in the image below, the global-level content type should be linked to the local-level
content type via a one-to-many reference field. The reference field in the global-level content
type should be localized via the field’s validation settings. This means the individual entries
don’t need to have their fields localized. The front end will query the global-level content type
to find the appropriate localized entry.
Entry-level localization is best used for cases where you want your authors to be able to publish
content asynchronously. For example, maybe you have a marketing campaign you want to roll
out in different locales staggered over several weeks. With entry-level localization, you can have
one content author publish content in US-English today and then another author publish con-
tent in DE-German next week.
This video shows how to create a content model with entry-level localization.
This video shows how media is uploaded and turned into assets via the media tab in the Con-
tentful web app.
When this is the case, we recommend creating a content type for your media that includes
those additional fields and links to an asset. Think of this as a media wrapper that holds the
asset but also holds additional information. If using this approach, you might want to check out
the Image Uploader UI Extension for flattening and simplifying the editor experience.
This video shows how to create media wrappers in the Contentful web app.
DAMs not only provide a single, searchable source of truth for an organization’s digital assets
but also provide a high degree of governance, have specialized support for asset approval
workflows as well as extensive metadata capabilities. Some DAMs, such as Cloudinary (featured
in the image above), also support adaptive bit-rate video streaming on top of high performance
image serving.
If your content authors are already storing and organizing their media in a centralized DAM,
there is no need to abandon that system. Any third party media service can be used with Con-
tentful as long as they offer an API you can query from a custom app. Create a custom app and
pull in media from virtually anywhere.
If you are using Cloudinary or Bynder as your DAM, you are in luck! We have pre-built apps for
Cloudinary and Bynder integration via in the Contentful marketplace. This video shows how you
can integrate Cloudinary with Contentful.
Rich Text provides these capabilities while maintaining a rich format on the API response. The
API response is in JSON format thereby eliminating the empty <p></p> tags (associated with
an HTML response) or shortcodes.
The rich text field gives content authors more of a WYSIWIG or classic rich text editing experi-
ence. What makes it different from Contentful’s plain text field is that you can embed pieces of
content (entries) within a body of text. The image above shows what it looks like for a content
author to edit an embedded entry in the rich text editor.
This video provides a detailed overview of everything you can do with the Rich Text field.
It is hard to develop a content model in a single pass. Take an iterative approach. Create a
content model for your content authors to test and make improvements based on what you
learned.
Note that Contentful is not a “one-size-fits-all” platform. It’s built to be extraordinarily custom-
izable to each organization and even different use cases in the same organization. That means
that content authors will need to work with you to define workflows, enable content previews,
and take advantage of other features to optimize their content authoring experience.
In addition to creating entries, content authors will also be uploading media files (images, vid-
eos, .pdfs, etc.) to create assets. We have built-in tools that allow for basic image editing, such
as scaling and cropping. This video shows how content authors create and publish assets.
Finally, we know that content authors are not just creating content. On small teams, content au-
thors are often also responsible for content operations, which are the processes, workflows, and
technologies that are required to deliver content.
As a result of these references in your content model, your content authors will be spending a
lot of time creating nested entries. The image above is an example of what this might look like
from the point of view of a content author editing entries in the Contentful web app. The entry
for content type “Image with Caption” is nested within an entry for content type “Set of Three,”
which is nested within an entry for content type “Hotel Landing Page.”
As you can imagine, too many nested entries can become burdensome for your content au-
thors to navigate. As a result, we don’t recommend setting references in your content model
more than five levels deep.
To help content authors navigate these nested entries, Contentful offers a handy feature called
the slide-in editor. The slide-in editor stacks entries on top of one another so content authors
can keep track of where they are. This video shows the slide-in-editor in action.
This is made possible by Contentful’s Preview API, which maintains the same behavior and
parameters as the Content Delivery API, but for the latest drafts of entries and assets instead of
published content. You can set up content preview links by following this guide.
This functionality isn’t exclusive to previewing content in a web browser — it also allows you to
preview your content across mobile apps, large monitors, digital kiosks, etc.
Because the Content Preview API uses an endpoint and authorization token distinct from the
Content Delivery API, there is a low risk of accidentally exposing draft content to the public.
The most straightforward way to allow content authors to localize content is through field-level
localization, which we covered on page 35.
These two videos demonstrate how content authors can localize entries and assets using field
localization.
Apps are (essentially) a small HTML5 (including CSS and JavaScript) application that exists in a
sandboxed iFrame and interacts with the Contentful web app through the Apps SDK. This SDK
is a proxy to the Content Management API and acts on behalf of the logged-on user. The Apps
code is completely customizable.
Apps can start out with something as simple as customizing the appearance of a JSON field in a
content type, and grow to provide a completely custom editorial interface for content authors.
We have built governance into the app model such that you can manage the apps you use,
public or private, at the organization and space level.
While UI extensions are building blocks for customizing a single part of the Contentful web app,
their application and ability to replicate integration across multiple spaces is limited. Taking this
into consideration, we highly recommend customers build and use apps going forward, as they
will scale even as you integrate more services with Contentful. In addition, we will continue to
release new features to apps.
The image above is an example of how you can use Apps to add extra functionality to entry
fields. The screenshot on the left shows a custom UI field that allows users to search and select
Shopify products. The screenshot on the right shows an app customization that allows users to
tag structured content in Contentful with audience IDs loaded from a project in Optimizely.
It’s easy to configure the triggers of webhooks inside of the Contentful web app. In the top
navigation bar, open Settings > Webhooks. Click Add Webhook, configure the remote host, and
click Save.
Although Contentful’s pre-built webhooks create default JSON payloads, you can easily modify
the payload. In the image above we are changing the default payload of the Slack webhook to
generate a message that shows the editorial status of a piece of content that has been modi-
fied.
This video illustrates a custom content moderation workflow using content types, custom roles
and permissions, and webhooks. This followup video shows how the previous content modera-
tion workflow was created in Contentful.
Let’s say that a large, multi-national company has one space for global content and multiple
spaces for regional content. With Contentful you could assign editors in the global content cre-
ation team the ability to both create and publish content in the global space, but then limit their
ability to only draft content in the regional spaces.
Developer and Freelance roles have been deprecated in the current product version and are
only available on select legacy plans.
Admins assign roles and permissions to users at the space level and users can have different
roles in different spaces. To configure roles and permissions in the Contentful web app, go to
the master environment for your space and from the menu bar choose Settings > Roles and
Permissions.
You can give a role a permission but then add specific exceptions. The image above shows how
the editor role can perform any kind of operation on an entry except for editing any entries be-
longing to the content type "Navigation Menu."
TEAMS
Contentful also offers some enterprise-level customers the option of teams.
Space Admins can use the teams feature to organize and streamline the administration of
groups of users and roles/permissions. With teams, there is no need to add users individually
to different spaces. Add the user to the team and then give the entire team access to different
spaces with just a few clicks. Every user within the team will inherit the role (and corresponding
permissions assigned to that role) that the team has been granted for each assigned space.
Developers who are evolving an application’s content model can use Contentful’s CLI tools built
on top of the Content Management REST API. Developers spin up one or more development
environments, similar to how they create feature branches in Git, to work in an isolated environ-
ment from content authors.
Content authors can use the web app to publish new content in draft mode. Draft content can
then be put through an approval process by having their colleagues preview their changes us-
ing the Contentful Content Preview API, and use the web app to publish their changes.
Developers can prototype content model changes in the Contentful web app, and then create
small code snippets using the Migration SDK to apply those changes programmatically. The
combination of the Migration SDK, multiple development environments, and webhooks en-
ables developers to tap into their existing CI/CD workflow tools to make large scale content
model changes. After thorough testing, the changes can be safely deployed to the master envi-
ronment used by the editorial team.
CLI TOOLS
Contentful’s command line interface tools let you use Contentful features straight from your CLI,
providing the basis for DevOps automation.
Each space always has at least one environment named “master.” Depending on their subscrip-
tion, customers might have additional environments as well. When you create a new environ-
ment inside of a space, the content model, content, locales and webhooks will by default be
copied from the master environment. However, there might be instances where you will want to
choose any other environment to be the basis for your new environment inside of that space.
Content models live inside of environments, enabling development teams to evolve a content
model in parallel for testing. They can then apply their content model changes back to the mas-
ter environment. You can manage org, space settings, users, access tokens and api keys, snap-
shots with the Contentful web app or the Content Management API.
We use spaces to separate content based on different teams or use cases unless we find that
they have a lot in common and can share content or content types between them.
Here are three tips to get the most out of your spaces:
1. Use spaces to separate content that has different teams or different use cases unless they
need to share content
2. For large scale implementations, consider putting global shared content, team shared
content and project-specific content in separate spaces
3. Roles are specific to a space—use separate spaces if the same users need different permis-
sions
As we covered on the previous page, Contentful’s spaces are like repositories. They are a child
entity of an organization. Spaces contain content, assets, and webhooks.
In order to determine which space pattern is the best fit for your organization, consider the
following questions:
1. Will governance rules (i.e. user roles and access permissions) be the same or different
among the teams and projects?
2. Will content types be the same and/or shared across projects?
3. Will projects have the same localization requirements? Same or different set of locales?
4. Is there a legal or regulatory requirement for projects?
This is a good pattern to use if one or more of the following conditions are true:
• Content types are not reusable across projects.
• Projects have different localization needs.
• Roles & permissions cannot be effectively used to create granular access controls.
• Business units have a regulatory or legal requirement to keep their project and content
separate.
In this pattern, you create one or more spaces that are designated as a global or shared space.
This allows some of the content to be shared across an organization or across specific depart-
ments while other content can be project specific.
Any front-end or any application that is used for your project can access this global shared
space using an API token and retrieve and show those assets among those projects. You then
segregate your content across business units or teams. As a result, each team or business unit
might have a space designated for their specific line of business or projects that they don’t
share with other units or other teams and can manage in an isolated way.
If you want your content authors to view that content across their business and project spaces,
your team will need to build a UI extension so you can do cross-space referencing.
Environment aliases are our solution for what we called in the past “environment promotion”
feature. Environment promotion is the ability for you to “promote” a new environment to be
served as your default environment (aka to be served from master or from the unscoped route).
It does not include git-like merging/diffing between environments (for now). Think of promotion
as “flipping a switch”- now your master/unscoped route serves content from a different environ-
ment. We decided to achieve this by turning master into an alias. In the future, we may support
user-defined aliases, but for now, master is the only one that will exist.
You no longer need the release-1 environment and can delete it, although you generally want
to keep it around for a while in case you need to do an emergency rollback.
You can now spin up a new environment based upon release-2, and follow the same approach
and switch master to it when you’re ready.
With environment aliases it is very easy to create multiple backups of development environ-
ments. New environments can be spun up in seconds through either the Contentful web app or
the Content Management API. In the event that switching the master alias to a new environment
results in problems not found during testing, you can immediately revert master to a previous
working backup environment.
This video shows how you can manage your content as code.
The “expand” phase refers to any change that adds or transform fields. Anything in this phase is
additive and will not affect the current version of your application from working properly.
The “contract” phase activities are destructive, such as deleting fields, deleting content types,
or deleting links between content types. If you have an application that has a dependency on
these fields, you want to avoid accidentally breaking that application by making sure that ap-
plication is updated to match the new fields and content types (i.e. the “expand” phase) before
you run the migration in the “contract” phase.