Automic Workload Automation

 View Only

 How to manage HTTP return code in WebService REST

Marc Monlouis's profile image
Marc Monlouis posted Jun 30, 2025 04:18 AM

Hi community, 

I setup a WebService REST Job an it works almost good. 

It is a simple GET that reads  json datas 
In response tab of WebService, i just put all response (json path $) in a variable and decode data it in post -processing script.
But the REST api can either respond HTTP return code 200 and json datas  either 404 (not found ) if there is no data.
So i have to manage HTTP return code before processing.
Presently i have an error 'ended_abnormaly (return_code 2)' when HTTP ret code is 404 

So my questions :
Is there a way to get HTTP return code in post-processing script ?

Is there a way to get HTTP response, without transfert it in response tab, in post-processing script ?

How to avoid error message if there is no data ins response while response tab is setup.

Thanks in advance for your help 

Marc Monlouis's profile image
Marc Monlouis

Hi all, 

I found a solution, in the post below.
https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=785965

To get HTTP return code we must recover it from the WEB SERVICE REST JOBS report.
I used a Output scan and a script to manage (cancel) workflow when there is  no data available.

Hope this can help someone else.