2 Replies Latest reply on Sep 1, 2019 7:31 PM by Paul Robins

    Invoking Automation API in a Web Services job

    Paul Robins
      Share This:

      Hi all,

      I'm trying to invoke the Control-M Automation API in a Web Services job.

      Once I have a token I can invoke a service quite successfully.

      e.g.

      However I don't know how to invoke the /session/login service to get a token in this manner. I can set Method to POST and update the Path, but how can I provide the user credentials given they are in JSON format not simple input parameters?

      Has anyone succeeded in doing this?

      Thanks!

      Paul.

        • 1. Re: Invoking Automation API in a Web Services job
          Paul Robins

          For anyone interested, I've gotten this far so far:
          Generate login token job:

          Subsequent AAPI job:

           

          So my next challenge is to find a way to obscure the AAPI credentials in the first job....

          1 of 1 people found this helpful
          • 2. Re: Invoking Automation API in a Web Services job
            Paul Robins

            I believe a correct connection profile which includes token retrieval would look something like this, however this "Job Preset" format is not supported by BMC.

             

            "The Job Preset field in the connection profile does not allow for spaces or a mix of literal values and variables, and therefore the authentication field as Automation API requires it ("Bearer $token") cannot be sent. CAR00157536 has been opened to make this possible in a future release or fix pack for Control-M for Web Services, Java and Messaging."

             

            This will be the end of my investigations until a future version of WJM.

            Hope this helps someone following the same path!

            Cheers,

            Paul