BSA: How to get the job result or run log via SOAP?

Version 3
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BladeLogic Server Automation Suite


    APPLIES TO:

    BMC BladeLogic Server Automation Suite



    PROBLEM:

     

    How can I get the job result or run log via SOAP?

     


    SOLUTION:

     

    Legacy ID:KA423247

      

    The SOAP request can be made from multiple languages and the overall process is the same.  Attached is an example in Perl.  The example script is for exporting the Deploy Job Run Log.  It takes seven arguments: appserver where webservices is running, user name, password, role, group the job is in, name of the job, target server.

    The example script runs the job and gets the job run id for the last run.  Once we have that information we can call the blcli call to export the run log:

       
    executeCommandUsingAttachmentsAndGetResponseFile("Utility","exportDeployRun",$jobGroup,$jobName,$jobRunId,"${jobName}-${jobRunId}.csv");
    This call will run the blcli   Utility exportDeployRun command which returns a csv file, which is passed in the SOAP response encoded in base64.  The response is decoded and the text of the file can be written to the local file system. 

    There are other   Utility commands to export the job result or job run log for a job run and these can also be used with the   executeCommandUsingAttachmentsAndGetResponseFile SOAP command in the same way. 

      

     


    Article Number:

    000084374


    Article Type:

    Solutions to a Product Problem



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles