Automic Workload Automation

Expand all | Collapse all

REST API Web Service task - parsing the response

  • 1.  REST API Web Service task - parsing the response

    Posted 06-13-2018 03:30 PM

    Hi. I could use the communities help (again). One of our vendors is updating their API (from v1 to v2) and the new version's response page has changed. Long story short, I need to get the "alertId: " from the results of my request.  

     

    I need to store the “alertId” into a variable so, I am using the Response page in the Web Service tab of the REST job/object. 

    I am able to parse for the “requestId” (highlighted in green) but NOT the "alertId" (highlighted in yellow). I tried several approaches but i'm unsuccessful. Any ideas?

     

    Output: 

     

    • Try 1 - The job does not fail but the value is apparently not being pulled.

     

    Try 2 - The job does fail 

     

     

     



  • 2.  Re: REST API Web Service task - parsing the response

    Posted 12-20-2018 09:33 AM

    Resolution:

    We were able to get the alertId value by putting the following the following $.data.alertId as an expression. Be aware that the expression is case sensitive.



  • 3.  Re: REST API Web Service task - parsing the response

    Posted 12-20-2018 09:54 AM

    Hi JohnTorres603474 ,

     

    Thanks so much for sharing the solution with the community. Really appreciated.

     

    Octavie