Search code examples
apigee

how to capture the http status code from service callout in Apigee


Please let me know how to capture the HTTP status code received from a 3rd party invoke using Service Callout policy. I need this to do some conditional checks in flow.

Thanks


Solution

  • Finally got it with some experimentation

    context.getVariable("calloutResponse.status.code");
    

    Cheers!!