When using the HTTP job to send a post request to a RESTful web service, is it possible to configure acceptable return codes, similar to how we define them using EXITCODE for Windows/Linux jobs?
If the agent receives 200 as an HTTP response, it shows as failed in ESP. Does the web service need to be modified to return 0 on success (instead of something in the 200-299 range), or is this a configuration problem on the ESP side?
There is no option in ESP to code that a 200 is acceptable for a HTTP_JOB type. It will need to be coded so it ends with a zero. The only valid parameters are shown below.
You can specify the following optional statements for an HTTP job:
This is what I assumed, but was wondering if there were other solutions on the agent/plugin side that might be available. Thank you for your reply!
When the agent gets 200 from the application (HTTP), it will automatically send completion code of 0 to the manager.
TCP/IP Controller Plugin.Transmitter pool thread <Regular:1>.CybTargetHandlerChannel.call[:687] - Attempting to send: 20180723 0XXXXXXX+0400 DE_R12 AGENT HTTP_WS/ON_HOLD_TEST.1/MAIN STATE COMPLETE SetEnd Status("Code:200 Status: OK") Cmpc(0) Plugin(appservices) User(AGENT) Host(de_linux)
The manager should receive exit code 0, if you are not getting something like above (check transmitter.log), then Application plugin may not have been configured/installed properly.
Do you have any more concerns?
Thank you for your feedback,