Implementing SDL Knowledge Center Content Manager API in C#

Hi!

I'm new with SDL Knowledge Center and I was wondering how would I implement SDL Knowledge Center Content Manager API in C#. I've seen a examples but it doesn't work for me probably bacause i'm not familiar with it. Another is that, whenever i searched for c# examples ISHRemote always shows up.

Can you give me an idea on how this thing works?

What should I learn? Probably a learning path.

I really need to learn this but I don't know where to start.

Thank you.

Parents
  • Hi Nikku,

    Can you elaborate more what doesn't work? Can you authenticate? Can you execute the simple function GetVersion from Wcf/API25/Application.svc ?

    If you can then you need more understanding about the API and the product itself. ISHRemote provides some examples but mostly from the perspective of the PowerShell console.

    If you can't then that is understandable. The authentication bit is a bit tricky. Have you followed the instructions on the manual on how to create a proxy in Visual Studio and execute?

    Alex
  • Hi Alex,

    I was able to execute the GetVersion function. It works like a charm. But I think my problem is i'm not really familiar with the product, that's why I was looking for some API implementation in C# to get started. And the only sample that i've found was the GetVersion function.

    I was trying to search for a publication, get its metadata and etc..but it's very tricky mostly because I don't know what metadata should I pass as a parameter (<ishfields>). I'm also having a hard time looking for things like "pasLogicalIds", "plLngRef", and the like.

    But these APIs in C# will work fine as with the ISHRemote? I'm not really a powershell guy that's why. :)

    Thanks,
    Nikku
  • Hi Nikku,

    I understand your concern.  I wanted to make sure we were past the issue of authentication, which is a common problem for many.

    Unfortunately there are not c# samples besides the one sample you've seen that focuses mostly on getting past the authentication barrier. 

    To further use the api, a good understanding of the product is required. As far as I know that is usually provided through training session with SDL colleagues and I would suggest to reach out to them.

    But I'll give you some tips, or how I would do this the hard way

    • Read more in the documentation to get some context. 
    • Put fiddler while running Publication manager. Do a simple action at a time and try to cross-correlate the payload with the documentation. Then try the same in code.
    • Use ISHRemote samples to get a grasp of how the metadata is used. With a Fiddler trace on you can see a bit better what each cmdlet did. Sometimes its a combination.

    Before ISHRemote became available, the first two where the only options to understand the hard way. With ISHRemote this process is much more easier. Assuming you understand the basics of a programming language, PowerShell is very simple and very alike with .NET. ISHRemote makes things so much easier because you can focus on using and understanding the basic concepts of the API, without focusing too much on the specific language. PowerShell's Verb-Noun cmdlet structure provides a lot of information on what a line does. With fiddler you can see which APIs where called.

    For example take a look here. If you are still pursuing you this type of approach, I guarantee you that getting basic PowerShell knowledge to be able to trace is well worthwhile the investment to understand the API and you get to familiarize with what is the replacement of command prompt on Windows. 

     

    This is the best that I can provide.

  • Hi Alex,

    Thank you so much for your help. I think I will really need to invest time in learning PowerShell to completely understand ISHRemote.

    Regards,
    Nikku
  • You are welcome,

    In my opinion, we all need to learn powershell in the same way that linux users know the basics of bash and grep etc. PowerShell has already replaced command prompt as the default shell.

    Regarding your statement, I don't agree that you need to know a lot about PowerShell to understand ISHRemote. But some of the samples use kind of advanced powershell syntax like piping but that is not necessary. When I read the samples it feels very clear and clean and relatively not much language specific noise. But I'm definitely very much in comfort with PowerShell and I could be biased.

    There is another thread active here where both C# and PowerShell implementations have been mentioned and you might find it interesting community.sdl.com/.../47745
  • Hi Alex,

    I've downloaded the ISHRemote source code and get my hands dirty on the samples. It's very straightforward, never thought it would be very easy to comprehend. Now, I think i'm on the right track. :)

    Thank you!
Reply Children