2

I have been doing some reading on Sitecore.Services.Client framework for a project for which I am required to use and consume Sitecore as a data repository. The data in Sitecore will be some Html content blocks as well as some Dictionary items for the pages that are not hosted in Sitecore CMS. What are the minimum Sitecore assemblies I should need to reference in my project?

migrated from sitecore.meta.stackexchange.com Oct 31 '16 at 18:35

This question came from our discussion, support, and feature requests site for developers and end users of the Sitecore CMS and multichannel marketing software.

  • This setup intrigues me. Are you storing the HTML as a field value? Or getting html from rendered presentstion? – Pete Navarra Oct 31 '16 at 19:21
  • I am trying to create an EntityService controller and an ItemService controller to fetch data as needed from Sitecore. Also, I need to understand how can I call these services from JavaScript. – Hetal Dave Nov 1 '16 at 12:53
  • Off the cuff, I'd advise taking a look at how Sitecore (through SPEAKUI) is using AJAX to call JSON service controllers to fetch item formation. You might be able to more effectively create a SPEAKUI application that provides the functionality you're looking for. – Pete Navarra Nov 1 '16 at 13:13
3

As per the Sitecore Nuget feed, https://sitecore.myget.org/feed/sc-packages/package/nuget/Sitecore.Services.Client, these are the required assemblies/frameworks needed by the Sitecore.Services.Client assembly:

  1. .NET Framework 4.5 (or higher depending on the Sitecore version being used)
  2. Sitecore.Kernel
  3. Sitecore.Services.Core
  4. Microsoft.Extensions.DependencyInjection.Abstractions (= 1.0.0)
  • 1
    The naming is a bit confusing here. The documentation and config file refer to Sitecore.Services.Client, but in order to use the API, you do not reference that dll. You need to reference Sitecore.Services.Core, if anything. – Adam Conn Nov 1 '16 at 23:55
  • @AdamConn That's good to know, thanks Adam! – Søren Engel Nov 2 '16 at 8:06
3

You don't need to reference any Sitecore dlls in order to be able to use the Sitecore REST API. These APIs are defined in the developer's guide available on SDN.

(This document does not seem to have been ported to doc.sitecore.net yet, so SDN is where you need to get it.)

Referencing Sitecore.Services.Core will give you access to a .NET API, so you aren't working with REST calls directly.

Ironically, you don't need to reference Sitecore.Services.Client. That dll is used during installation. It is highly unlikely you need to reference this assembly in your project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.