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,
I would like to get the Umbraco API URL. How can I do that in C# or javascript?
Currently, I have an API URL like this:
http://localhost:62195/umbraco/api/Elmanagement/GetAllEmployees
So on front-end, how can I get the api url when I only know a part of My API Controller:
/api/Elmanagement/GetAllEmployees
The extant part of API URL is hard to get if the port is change, or site uploaded onto other domain etc....
Like this:
http://mydomain/umbraco/api/Elmanagement/GetAllEmployees
or
http://mybusinessdomain/umbraco/api/Elmanagement/GetAllEmployees
So the part of Umbraco back office url is always changeable. So is there a way to get the back-office url of Umbraco?
Hi Nguyen,
Are you using UmbracoApiController?
All locally declared Umbraco api controllers will be routed under the url path of:
~/Umbraco/Api/[YourControllerName]
E.g ~/Umbraco/Api/Products/GetAllProducts
Read more - https://our.umbraco.org/documentation/reference/routing/webapi/
Thanks,
Alex
is working on a reply...
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.
Continue discussion
How to get Umbraco API URL?
Hello,
I would like to get the Umbraco API URL. How can I do that in C# or javascript?
Currently, I have an API URL like this:
So on front-end, how can I get the api url when I only know a part of My API Controller:
The extant part of API URL is hard to get if the port is change, or site uploaded onto other domain etc....
Like this:
or
So the part of Umbraco back office url is always changeable. So is there a way to get the back-office url of Umbraco?
Hi Nguyen,
Are you using UmbracoApiController?
All locally declared Umbraco api controllers will be routed under the url path of:
~/Umbraco/Api/[YourControllerName]
E.g ~/Umbraco/Api/Products/GetAllProducts
Read more - https://our.umbraco.org/documentation/reference/routing/webapi/
Thanks,
Alex
is working on a reply...
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.