A utility to help you pull content from a server remotely. It's like Sitecore.Ship but completely inversed. I used Sitecore.Ship very much as my northstar on this, and I am sure the code will show that as well.
It uses the Sitecore Serialization API to process requests and return the serialized item(s). Security is managed thru a specified whitelist of servers that the GET commands are accepted from.
TBH, not even sure at the moment. My ultimate goal was to also include a proper Sitecore package that would allow a secondary server, lets say a QA or Dev server to issue syncs in the form of commands from a context menu or ribbon in the Sitecore shell. Those requests would call out to the server running Sitecore.Grab
, grab the serialized item(s) and then sync those items into the current content tree. Right now this project contains the latter half of that vision, the service to return the serialized string.
Should be as easy as:
-
Clone, download, whatever, just get these files into your local machine
-
Build the project on its own and add the
Sitecore.Grab.dll
or add all the source to your solution -
Update your
web.config
by making the following changes (all changes are also included in web.config.transform):- add
<section name="nancyFx" type="Nancy.Hosting.Aspnet.NancyFxSection" />
to your<configSections>
node, - add
<remove name="Nancy" /><add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="/services/*" />
to the very bottom of your<handlers>
node, - add add `
- add
and
to the very bottom of the
node in your
web.config`
- Deploy all the things
-
Sanity check:http://<yourserver>/services/about
-
issue a get request to
http://<yourserver>/services/package/create/items/{itemId}/{databaseName}/{boolGenerateSubItems}
I would like to create a well defined package to allow a secondary server to call out to a master type server running the Grab service. That package would include context menu items, ribbon commands, and some dataitems to define a configuration (what items to match on between the two servers etc). On top of that, what I would like to do is get this nearly production ready and into a NuGet package at some point in time.