Copied to clipboard

Flag this post as spam?

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


  • Luke Alderton 192 posts 509 karma points
    Feb 06, 2014 @ 14:25
    Luke Alderton
    1

    Getting nodes from another Umbraco website

    Hi,

    I want to access data from another Umbraco site, for example: I'd like to have the ability to do something like Umbraco.Content(nodeId) that would get nodes from another existing website instead of the current one. I'm just wondering if this is possible and if it is, could anyone provide me with some examples.

    FYI: Both websites would be running on the same server.

    Thanks in advance,
    Luke

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 06, 2014 @ 14:27
    Ismail Mayat
    0

    Luke,

    What version of umbraco are you using? If v6 you have umbraco web api so you can expose rest api to get you the content.

    Regards

    Ismail

  • Luke Alderton 192 posts 509 karma points
    Feb 06, 2014 @ 15:07
    Luke Alderton
    0

    One site is running v6.1.6, the other is running v4.7.1, I want to read data from the 4.7.1 website and load it into the v6.1.6 site. I can put the code on either of the websites.

    I'd assume I could push data to the v6.1.6 website from the v4.7.1?

    Thanks for responding so quick. I'm sorry my reply was not equally as quick.

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 06, 2014 @ 15:13
    Ismail Mayat
    0

    Luke,

    On the 616 do you just want to display the content or do you actually want to grab the content and insert into 6.1.6? If you want to just display then on the 471 setup a rest feed using webapi. If you want to push the data then on publish on 4.7.1 you can use something like urest http://our.umbraco.org/projects/backoffice-extensions/urest and create a new document on the 6.1.6. You might need to tweak urest to get it to work with 6.

    Regards

    Ismail

  • Luke Alderton 192 posts 509 karma points
    Feb 06, 2014 @ 15:19
    Luke Alderton
    0

    I want to grab a node and all its decendants from the v4.7.1 website and add them all under a node within the v6.1.6 website. So would you say using urest is the way to go?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 06, 2014 @ 15:24
    Ismail Mayat
    100

    Ah ok so you can then install urest on the 471 site and from 616 make a request to the documents part see http://urest4umb.codeplex.com/wikipage?title=Documents&referringTitle=Documentation this will give you back json you can then parse that and create the nodes. You will need to ensure the doc types are present on both sites.

    Regards

    Ismail

  • Luke Alderton 192 posts 509 karma points
    Feb 06, 2014 @ 15:28
    Luke Alderton
    0

    Okay, I'll take a look into it, thanks for getting back to me so quickly.

  • Luke Alderton 192 posts 509 karma points
    Feb 07, 2014 @ 10:48
    Luke Alderton
    0

    I'm having some toruble authenticating with uRest, the response I get from the server after submitting my username and password is:

    {"Username":null,"Password":null,"Type":0,"Value":"93a06c84f04e2b7cabdc2a3c7307be245d2947ee"}

    Any ideas?

    Thanks.

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Feb 07, 2014 @ 11:00
    Ismail Mayat
    0

    Luke,

    Can you raise this issue in the urest forum hopefully matt can pick up on it. I have never used urest myself.

    Regards

    Ismail

  • Luke Alderton 192 posts 509 karma points
    Feb 07, 2014 @ 11:16
    Luke Alderton
    0

    Ah, it's okay, I was foolishly doing a POST instead of a GET to 'get' data from the server. I guess I'm allowed to make mistakes though, it is Friday after all. :P

Please Sign in or register to post replies

Write your reply to:

Draft