This package will add a REST-like content delivery API to Umbraco CMS. It provides a number of API endpoints to access content, search, and other functions.
- Get your content as Json or Html
- Customise your Json with pluggable components
- Create Json search endpoints for Examine queries
- Explore the
/api
endpoints - Filter your Json properties with query params
- Get Sitemap.xml out of the box
- Host multiple Headless sites on different domains
- and more...
Umbraco v11+
Find full setup details in the Wiki here
Run the following or or find the package on NuGet here
dotnet add Kruso.Umbraco.Delivery
Configure Startup.ConfigureServices() like this:
services.AddUmbracoDeliveryServices(_config);
services.AddUmbraco(_env, _config)
.AddBackOffice()
.AddWebsite()
.AddComposers()
.AddUmbracoDelivery()
.AddAzureBlobMediaFileSystem()
.Build();
And Startup.Configure() like this:
app.UseUmbracoDelivery();
app.UseResponseCompression();
app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});
- Minimal Installation and Configuration requirements. As far as possible, you should be able to Install Kruso.Umbraco.Delivery and start developing.
- Respect how Umbraco works. Use umbraco as you would expect as a content editor or developer. Kruso.Umbraco.Delivery will only return Json for a page if you want it to.
- Performance. Json documents should be returned fast and Umbraco should continue to scale well.
- Support Small Sites and Large. Many smaller sites use Umbraco as a place to implement other backend functions not related to the CMS, such as fetching data from external system. Allow developers to modify the Json data to include custom data.
- Get content in various ways. There are several ways to tweak the outputted JSON and how deep content structure that will be returned.
- Search using Umbraco's Examine API and customize both the response and how content is indexed.
- Provide SEO support. Get an XML sitemap and robots.txt. Also supports Umbraco's handling of alternative urls
- Return all Translations set up in Umbraco.
- Supports multiple sites (in multiple languages) without the need for addtional host names for your Umbraco instance.
- Supports "hybrid mode". A page can be returned as a traditional page, or as Json.
- Get information about sites and languages, and get all available routes for all documents.
- Supports secure/private preview.
As far as possible Umbraco.Delivery will work out of the box without further configuration, even for a multi-site and multi-language setup.
This package is mainly the work of @EdSoanes. It has been used in several solutions during several years, from Umbraco v8 to the latest v11. This library has recently received several new features, but the core functionality is well battle tested.
It was made public as Kruso.Umbraco.Delivery because we at Kruso love open source, and want to contribute to the community. It also keeps us on our toes when we know others will look at our code 😉.
Please read the wiki.
Some features may not be well documented. You are welcome to open an issue if you have any questions.
- Include a basic ISearchQuery. Menaing that basic search will be enabled without any coding needed.
- Simpler preview without the need for a certificate. Will be ok for sites without very high security requirements.