Before the Christmas / New Year holiday I started looking into Novell Service Desks APIs. This was for a plug-in which is being created for BrainShare 2013. You will be able to see it in action during the Novell keynote and also in the Central IT demo labs. If you're coming along to BrainShare 2013, please come a take look; I'll write a blog post on the inner workings at a later date. Without wanting to give away too much, the plugin automates bundle assignment within a workflow.
It goes without saying that I like APIs. APIs allow you to automate tasks that otherwise require clicking away with a mouse / keyboard which as we all know is prone to error and general boredom. You only get one life in this world and I'd rather not have the majority of mine taken up with movements of a plastic device that is mostly content with being where it is. As to repetitively hitting plastic wobbly keys ; what did they ever do to mankind to warrant such agression? It's not as if they have vast reserves of natural resources combined with leadership who's view of democracy is one man one vote.
Free the mouse! Liberate all keys ( but not the ones which require multiple key presses to get the character you require. They're too clever by half and, frankly, will be first against the wall when the revolution comes ).
Back to APIs. Whilst looking at these, it occurred to me that people might want to a little guide to starting to use them. There's a wide range of functionality available, ranging from obtaining the version of Service Desk to creating purchase orders.
Before we start, here's the ingredients that you'll need:-
1 x Novell Service Desk appliance v7.0 or later
1x PHP editor ( there's lots of them about , notepad will suffice. Geany is nice or Notepad++ )
1x PHP installed on your computer ( I'm using Ubuntu 12.04, PHP is also available for Windows fanboys and Apple Mac followers of all things shiny )
You may wonder why we're using PHP. PHP is installed on Novell Service Desk appliance so you can run the scripts that we'll create straight away. But mainly its because my Java / C# is doesn't run to much beyond 'Hello World' although I have written interrupt service routines in x86 assemble language. They were the days. //sigh//
We're going to start by creating an class that will handle communications to the webservice API calls of Novell Service Desk ( anyone mind if I refer to this as NSD from now on? No? Good ). Over the next series of articles we will expand the class to cover all of the APIs available to us. I'll also give examples how they can be used to do useful things.
For now the class allows us to authenticate to NSD, retrieve the version and logout.
The PHP code is attached to this article. Download onto a computer that has a PHP client installed ( I did mention that the Novell Service Desk appliance has PHP already ? Yes? ) and , after modification to reflect your environment, the script will return the version of NSD that you have.
If everything works out, you should see something like this:-
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.