Copied to clipboard

Flag this post as spam?

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


  • Morten Jensen 41 posts 104 karma points
    Nov 20, 2014 @ 09:11
    Morten Jensen
    0

    Standard WebAPI rounting not working

    Hello dear Umbracians

    I have managed to setup an UmbracoApiController for my custom apis. I can get http://domain/umbraco/api/controller/action to work fine. But i really want to be very restful and therefore i need a GetAll/Index result with the following url http://domain/umbraco/api/controller/ - But cant get it to work

     

    Working: http://domain/umbraco/api/Products/GetAllProducts

    Not-working: http://domain/umbraco/api/Products

     

    I have tried with a lot of differend method names (Get, GetAll, GetAllProducts, GetProducts ect.). And read the http://our.umbraco.org/documentation/Reference/WebApi/ a 1000 times and the asp.net webapi docs aswell.

    How is Umbraco doit the routing and what am i missing?

     

  • Jeroen Breuer 4909 posts 12266 karma points MVP 5x admin c-trib
    Nov 20, 2014 @ 12:10
    Jeroen Breuer
    0

    Hello,

    I don't think that is supported. You always need to add the method name add the end of the url.

    Jeroen

  • Morten Jensen 41 posts 104 karma points
    Nov 24, 2014 @ 15:00
    Morten Jensen
    0

    Jeroen: Thats really ashame, but it is deffently an answer i can use :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies