Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello all,
I am new to Umbraco, and trying hard to get API working. I just need something simple like /umbraco/api/articles?articleAuthor=john wick
Here's what I've tried:
Edit: trying to call the api: Am I doing anything wrong here?
Thanks in advance!
Hi How are trying to call the controller from the screenshot?
It should be yoursite.com/umbraco/api/products/getallproducts
Hello,
I've attached my postman get request result up there!
Thanks!
Can you add
[System.Web.Http.HttpGet] public IEnumerable<string> GetAllProducts()
And of course remember to build
Did this, but still the same.
I can't find any guide to build the project in Visual Studio Code. I assume starting IIS Express will build it?
I think you need to build it.
Do you have a normal visual studio?
I googled build in vs code and my first result is this https://code.visualstudio.com/docs/languages/csharp
Hi again
See the last answer here https://our.umbraco.com/forum/using-umbraco-and-getting-started/88122-install-umbraco-locally-with-visual-studio-code
And maybe rename the controller folder to "Controllers"
FINALLY! I found the solution!! After all the trouble while trying to move my existing website from VS Code to Visual Studio, and build them
In order to have Visual Studio Code to "build" the website, all the .cs code must be in App_Code folder, as such: Result:
Thanks for your help!!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to get Content via API, with condition, using plugin or webapi?
Hello all,
I am new to Umbraco, and trying hard to get API working. I just need something simple like /umbraco/api/articles?articleAuthor=john wick
Here's what I've tried:
Edit: trying to call the api: Am I doing anything wrong here?
Thanks in advance!
Hi How are trying to call the controller from the screenshot?
It should be yoursite.com/umbraco/api/products/getallproducts
Hello,
I've attached my postman get request result up there!
Thanks!
Can you add
And of course remember to build
Did this, but still the same.
I can't find any guide to build the project in Visual Studio Code. I assume starting IIS Express will build it?
I think you need to build it.
Do you have a normal visual studio?
I googled build in vs code and my first result is this https://code.visualstudio.com/docs/languages/csharp
Hi again
See the last answer here https://our.umbraco.com/forum/using-umbraco-and-getting-started/88122-install-umbraco-locally-with-visual-studio-code
And maybe rename the controller folder to "Controllers"
FINALLY! I found the solution!! After all the trouble while trying to move my existing website from VS Code to Visual Studio, and build them
In order to have Visual Studio Code to "build" the website, all the .cs code must be in App_Code folder, as such: Result:
Thanks for your help!!
is working on a reply...