Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Allow fetching of data by URL friendly name

Found in

EPiServer.ContentDeliveryApi 1.0.0

Fixed in

EPiServer.ContentDeliveryApi 2.3.0

(Or a related package)

Created

Apr 24, 2018

Updated

Jun 22, 2022

State

Closed, Acceptance tests pass


Description

Support Friendly URL

  • Currently, Headless delivers content through a url like http://<your-site-url>/api/episerver/v2.0/content/<contentReference>. However, a client may need to retrieve content through a "Friendly Url" as in CMS (for example, http://<your-site-url>/en/alloy-plan).
  • Support CMS friendly urls, allow client to use these urls instead of ContentReference to retrieve content from Headless.
  • Support to get children and ancestors by friendly URLs. For example, http://<your-site-url>/en/alloy-plan/children, http://<your-site-url>/en/alloy-plan/ancestors.

Requests should be routed

Request headers should have 'Accept' = 'application/json'; otherwise the request is ignored and not handled by content api route.

Content language

  • Get language from request. Prioritize routed language over accept language header.
  • If the request URL contains a specific language (for example: http://localhost:51059/en/alloy-plan/), the language, in this case 'en', should be used.
  • If the request URL does not contain a specific language (for example: http://localhost:51059/), the language value specified in the Accept-Language header should be used.

Move RouteConstants to public namespace.
Still use endpoint version from v2.0 like previous versions.