The content store
The Content Store is a MongoDB database of almost all published content on GOV.UK.
Reading and writing to the store
Content is retrieved from the content store via the content API,
which takes a path and responds with a JSON representation of the content that should
be displayed on that path. This API is used by front-end apps but is also exposed externally
/api/content/<path>, such as https://www.gov.uk/api/content/take-pet-abroad
Content is written by the publishing API, which is used by back-end publishing apps such as Travel Advice Publisher.
Not all content exists as a standalone page like the
/take-pet-abroad example. Some
content exists as a collection that references other pieces of content, and some content
exists as meta content designed to describe a wider whole. We use
govuk-content-schemas to describe all these different content
types. The content API itself is not prescriptive about this; it takes any JSON structure.
Detailed technical information can be found in the content store documentation.
Running the application
Running the test suite
bundle exec rake
Example API output
Example API requests and corresponding responses can be found in the content store pact-broker documentation.