Share via


Connecting SCORCH API to C#.Net web reference

Now lets see on how to connect to system center orchestrator web service API to visual studio. This would help us in case if you are building an application which has to initiate or trigger a runbook and get the results and display it to the user.

So in order to connect to the API get the below details first.

  • Get the URL details of SCORCH webservice.
  • By default it is hosted under port 81 of the server.

The URL would be like this. Lets say if my SCORCH Management server is hosted on server name XXX730scorchsp001.xxx.com, then the service URL would be http://XXX730scorchsp001:81/Orchestrator2012/Orchestrator.svc

When you access the URL would get the list of runbooks.

https://jhansiranivedachalam.files.wordpress.com/2017/08/171964.png?w=730

Once you are able to access, then go to visual studio. In my case am developing web application. So we have to do the following in order to add the service reference :

  • Right click on the project name in my case it is OSMVer2
  • Click on Add service reference.

https://jhansiranivedachalam.files.wordpress.com/2017/08/addserv.png?w=730

  • Then enter the URL and click on Go, then it would show you the list of functions available.

https://jhansiranivedachalam.files.wordpress.com/2017/08/addserv1.png?w=730

  • You can use these functions to start, create jobs and runbooks and do operations like modify and delete directly code from the application.

https://jhansiranivedachalam.files.wordpress.com/2017/08/orchestratordataservice_original.png?w=730

  • Please read my other blog to check on how to start or initiate the runbook and get the output on a webpage.

Hope this helps. Have a good day.