Just noticed that my external integration data action is returning undefined in the success output mapping, even though the HTTP response is clearly valid JSON. I am using the GetRESTProxy snippet to call a local staging endpoint. The request succeeds (200 OK), but the subsequent ASSIGN action fails to populate the variable.
Here is the snippet logic:
var proxy = GetRESTProxy('myEndpoint');
var response = proxy.Get('/api/v1/status');
// response.Body is valid JSON: {"status": "healthy", "code": 200}
I am mapping the output in the Data Action configuration:
{
"outputs": {
"healthStatus": "$.status"
}
}
The variable healthStatus comes back as undefined in the flow debugger.
- Verified the JSON structure via Postman; the path
$.statusis correct and returns the string “healthy”. - Tried changing the mapping to
$.Body.statusandresponse.status, but both result in undefined or type errors.
Is the GetRESTProxy returning a wrapped object that requires a different JSONPath syntax? Or is there a specific field I need to reference for the raw body?