@Christian, you also need to inlcude the method name, routing based on the http method doesn't work with the ApiController (and you don't need the Controller part like Steve mentions)
Thank you for the link. That looks exactly as an example of what i want to try to do.
But i can't open the Visual Studio Solution, or Project. I have Visual Studio 2010 on my machine.
When i just try to run the project under File > Open website, i get a "Could not load type 'Umbraco.Web.UmbracoApplication." related to the Global.asax file
learning and using the Umbraco CMS API
After CodeGarden13, i learned a bunch and meet so many smart minds, so now i thought that i would give it a go, and learn some (for me) new stuff.
First up in that list is the Umbraco API.
I (think i) have followed the documentation on creating a web api controller like explained here: http://our.umbraco.org/documentation/Reference/WebApi/
I then compiled the DLL and dropped that in my newly created Umbraco V.6.1.1 site.
Then i though that i could visit this URL = /Umbraco/Api/ProductsApiController, and that it would return my "hello World" string.
But i get nothing in return. Just a 404. Can someone help me out, please?
Try /Umbraco/Api/ProductsApi if it works like MVC you don't need the controller part
That did not work.
Any other idea?
Maybe this blog can help? http://www.nibble.be/?p=224
Jeroen
Comment author was deleted
@Christian, you also need to inlcude the method name, routing based on the http method doesn't work with the ApiController (and you don't need the Controller part like Steve mentions)
/umbraco/api/StatusApi/GetAllStatuses/
Comment author was deleted
Here is an example:
Controller: https://github.com/TimGeyssens/UmbracoSinglePageCrudApp/blob/master/SingePageCrud/Controllers/StatusApiController.cs
JS that uses controller: https://github.com/TimGeyssens/UmbracoSinglePageCrudApp/blob/master/SingePageCrud/scripts/project.js
Thank you for the link. That looks exactly as an example of what i want to try to do.
But i can't open the Visual Studio Solution, or Project. I have Visual Studio 2010 on my machine.
When i just try to run the project under File > Open website, i get a "Could not load type 'Umbraco.Web.UmbracoApplication." related to the Global.asax file
I is just not my day today :,(
Comment author was deleted
Yeah it's a vs2012 solution maybe that's why
Whups.... i haven't refreshes this page in my browser, so did not see all your posts :-0
@Tim, adding the methodname did the trick! A thanks to all of you for helping me out.
is working on a reply...