Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Developer 2 posts 72 karma points
    May 31, 2024 @ 09:55
    Developer
    0

    Override API '/umbraco/backoffice/umbracoapi/content/GetById'

    I want to override the /umbraco/backoffice/umbracoapi/content/GetById API and add additional processing to that call. Simply I want to validate some custom content added by me(through a package)

    When I check the documentation I did not find any Umbraco API do do this. I found below solutions,

    1. Use a Middleware to intercept the necessary requests and modify the response body.
    2. Use JavaScript code on frontend to process the content(using html and JS files on my package)
    3. Use DelegatingHandler to intercept and modify response body

    Is there any standard way to do this ?

  • Bishal Tim 22 posts 111 karma points c-trib
    Jun 01, 2024 @ 14:10
    Bishal Tim
    0

    hello there,

    maybe you can find something here,

    https://apidocs.umbraco.com/v13/ui/#/api/umbraco.resources.contentResource

  • Steffen Hornbæk Nielsen 54 posts 165 karma points
    Jun 03, 2024 @ 11:34
    Steffen Hornbæk Nielsen
    0

    I normally use the Hijacking "way" of doing this. It's simple and easy to understand and use.

    https://docs.umbraco.com/umbraco-cms/reference/routing/custom-controllers

Please Sign in or register to post replies

Write your reply to:

Draft