2 Replies Latest reply on Sep 11, 2020 5:11 PM by Rick Westbrock

    How can we get the runId of existing job via AAPI?

    Rick Westbrock
      Share This:

      I have a use case where I am writing an external script that calls Automation API to put a SMART folder on hold. I can use "run jobs:status::get" with a search query to get the folder's Order ID however "run jobs::hold" requires the runId instead and runId is not returned by jobs:status::get.

       

      My conundrum is that the documentation for many of the actions says "The jobId is used to reference a specific job and is returned by the ctm run status" however in my case the SMART folder was ordered automatically at new day, not via AAPI.(I think that text should say "returned by the ctm run" instead as run status also requires the runId.)

       

      Is there any way for me to find the runId via AAPI in this case? The super kludgy workaround would be to pass the order ID back and run an OS job to call ctmpsm on the CTM/Server's agent but that's pretty ugly (I suppose the agent where the script is running could make an SSH call to the CTM/Server to execute ctmpsm instead).