Ok this is a bit weird...I received an e-mail about a new message on this thread saying "'m not quite sure what to look for on the link you sent Jan ?" - Now I'm puzzled about whether you deleted the post because you figured it out or if there is a bug on the forum. I've seen this behavior 1-2 times before. If you did not delete the message then please let me know since I'm going to try and create an issue about it :-)
So did you manage to figure it out or do you need me to try and clarify things?
No, it's cloud only and it's going to stay that way - I had got an idea that it was at some point going to be possible to download the headless version at a later stage but Niels confirmed that it's not going to happen and be cloud only in this tweet https://twitter.com/thechiefunicorn/status/1043454285265166341 :-)
But you can achieve pretty much the same using web api so I guess it makes pretty good sense.
I totally understand from a business standpoint the want to keep a product like Headless under wraps and managed by Umbraco and the cloud.
Put a bug into Niel's ear to think about a local Headless and maybe making it a local license model or something. Could be like the Forms license or something a monthly license model You don't pay your bill, your headless stops working locally too. Or on a per domain basis. $9.99/month or something like that. Best of both worlds. We could get install it locally and Umbraco gets its cut to pay it's developers and keep the lights on.
Heck, you don't even need to expose the source code for the license or anything like that. Just compile the license DLL, heck, even encrypt it and ping your servers to validate the install, and we can host it on our own hosting for Headless. Just a thought.
WebAPI could work for us too, but we already do that, but needing to know a the properties, etc., versus Umbraco just outputting the JSON of all content, helps. I guess there is the XML too.
I did write something, but figured it out before you saw the message ! hehe
I think I almost have it.
Right now I have this ( thanks to Oleksandr!)
public class GetDataController : UmbracoApiController
{
public class PVSUser
{
public string firstname { get; set; }
public string lastname { get; set; }
public string phone { get; set; }
public string altEmail { get; set; }
}
// Get send from email and recivere email
public object GetWidgetsData()
{
var contentService = Services.ContentService;
var widgets = contentService.GetById(1154).Children();
var test = new List<PropertyCollection>();
foreach (var widget in widgets)
{
test.Add(widget.Properties);
}
return test;
}
}
But still have some issue with properties as dropdowns and nested content that are display like this:
Did you have any luck figuring this one out? I'm not quite sure how to deal with the nesting but surely it must be possible - Unfortunately I have not got my hands dirty with this since I have some backend colleagues doing this for me when needed :)
But I can try getting some pointers from them unless you already figured it out or someone of the other bright minds in here chime in before that.
Node to Json
Hey,
Anyone that can point me in a direction if I want to pull data from children nodes and convert each node data to Json.
The nodes has different properties.
Hi Thomas
You can do that using WebApi controllers - You can learn more about how that works in Umbraco here https://our.umbraco.com/Documentation/Reference/Routing/WebApi/ - Then you can make some endpoints, which you can consume using Node.
You could also consider trying the Umbraco headless beta here https://umbraco.com/headless/ but that might not be what you currently need assuming that you need something that is ready for production? You can learn more about Headless in and Node following the documentation here https://our.umbraco.com/documentation/Umbraco-Cloud/Headless/Headless-Node-Client/
Hope this helps!
/Jan
I have thought of headless. But yeah, need it for production. but thanks, if will give it at look.
Hi Thomas
Ok this is a bit weird...I received an e-mail about a new message on this thread saying "'m not quite sure what to look for on the link you sent Jan ?" - Now I'm puzzled about whether you deleted the post because you figured it out or if there is a bug on the forum. I've seen this behavior 1-2 times before. If you did not delete the message then please let me know since I'm going to try and create an issue about it :-)
So did you manage to figure it out or do you need me to try and clarify things?
Cheers,
Jan
Is there a way to run Umbraco Headless locally or download the project?
Hi Carlos
No, it's cloud only and it's going to stay that way - I had got an idea that it was at some point going to be possible to download the headless version at a later stage but Niels confirmed that it's not going to happen and be cloud only in this tweet https://twitter.com/thechiefunicorn/status/1043454285265166341 :-)
But you can achieve pretty much the same using web api so I guess it makes pretty good sense.
But there's still the old REST API https://github.com/umbraco/UmbracoRestApi but it's discontinued but still usable thought.
/Jan
Hi Jan,
Thanks for responding back.
I totally understand from a business standpoint the want to keep a product like Headless under wraps and managed by Umbraco and the cloud.
Put a bug into Niel's ear to think about a local Headless and maybe making it a local license model or something. Could be like the Forms license or something a monthly license model You don't pay your bill, your headless stops working locally too. Or on a per domain basis. $9.99/month or something like that. Best of both worlds. We could get install it locally and Umbraco gets its cut to pay it's developers and keep the lights on.
Heck, you don't even need to expose the source code for the license or anything like that. Just compile the license DLL, heck, even encrypt it and ping your servers to validate the install, and we can host it on our own hosting for Headless. Just a thought.
WebAPI could work for us too, but we already do that, but needing to know a the properties, etc., versus Umbraco just outputting the JSON of all content, helps. I guess there is the XML too.
Hey Jan :)
I did write something, but figured it out before you saw the message ! hehe
I think I almost have it.
Right now I have this ( thanks to Oleksandr!)
But still have some issue with properties as dropdowns and nested content that are display like this:
Hi Thomas
Did you have any luck figuring this one out? I'm not quite sure how to deal with the nesting but surely it must be possible - Unfortunately I have not got my hands dirty with this since I have some backend colleagues doing this for me when needed :)
But I can try getting some pointers from them unless you already figured it out or someone of the other bright minds in here chime in before that.
/Jan
Hey Jan !
I did :) (sorry for the late late reply) been stuck with this project)
I managed to pull all the data from each widget (node) and assigned the doc type alias as key and the content as value :)!
is working on a reply...