Try our conversational search powered by Generative AI!

Feature request for custom content delivery api endpoints?


Where do one put in a feature request for custom content delivery api endpoints for CMS 12+?

namespace EPiServer.ContentApi.ApiConventions.Internal
  [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
  internal class ContentApiControllerAttribute : Attribute

This attribute - can you make it public so you can create custom content delivery api endpoints easy?

As far as I understand this activates filters and convetions so the json is formatted correctly.

Then you use the ObjectResultWithHeaders action result to with [Produces] attribute to format the end result.

[ResponseCache(Location = ResponseCacheLocation.None, NoStore = true)]
public abstract class BaseJsonApiController : ControllerBase
	protected IActionResult ToObjectResult<T>(T? value, int statusCode = 200, Dictionary<string, string>? headers = null)
		where T : class =>
		new ObjectResultWithHeaders<T>(value!, statusCode, headers ?? new Dictionary<string, string>());


And a final question:

What is the point of [JsonFormatter] attriubte and JsonFormattedResult if EPi it self doesn't use it for this type of conversions?

Edited, Oct 19, 2023 5:48

Hi Carl, Optimizely have a feedback forum at where you can post both feature requests and general ideas.

Oct 27, 2023 11:51
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.