Executing a Runbook via SC Orchestrator web service

6,358

Yes, you can send an HTTP POST message using an XML request payload that has the runbook ID and the parameter values. There are some examples available on the web, including this request example and this code example.

If you are able to use PowerShell, there is an Orchestrator Web Service PowerShell module that takes care of all the details for you and simplifies using the web service.

Share:
6,358

Related videos on Youtube

Paul S.
Author by

Paul S.

Updated on September 18, 2022

Comments

  • Paul S.
    Paul S. almost 2 years

    Is it possible to launch a Orchestrator Runbook via the web service only? I know you can access the web service via, http://server01.contoso.com:81/Orchestrator2012/Orchestrator.svc, but is it possible to execute a runbook? If so what would be the correct syntax using the following GUID:247474a3-9f5f-411f-b877-4886262f230a.

    Running System Center 2012 R2.

    Thanks

    • Noah Stahl
      Noah Stahl about 9 years
      What environment are you looking to invoke the runbook from. Command line, code, other?
    • Paul S.
      Paul S. about 9 years
      Ideally I was thinking of using a SharePoint list, with the required inputs, and kicking off the runbook. I don't want the runbook constantly polling Sharepoint, thus I want the run book to launch on demand. A way around this at the moment is using the Orchestrator Console website, and it seems to work, albeit, a little clunky and way more information than I want for end users to see.
    • Noah Stahl
      Noah Stahl about 9 years
      OK. My first choice would be to have Orchestrator as the responsible party for performing actions by polling for requests, since you can provide extra error handling, retries, logging, etc. The overhead of polling is likely negligible -- have you seen evidence otherwise, or why the reason to avoid it? Barring that, I'd try to work with a SharePoint workflow to call the Orchestrator web service, although I haven't tried this personally. See e.g. msdn.microsoft.com/en-us/library/office/dn567558.aspx.
    • Noah Stahl
      Noah Stahl about 9 years
      For an example of polling SharePoint list from Orchestrator runbook: automys.com/library/asset/…
  • Paul S.
    Paul S. about 9 years
    Thanks Noah, I've already seen these articles. I'm just not sure how to make this work.