Hi,
I'm querying an external web service from which I receive a response in JSON format. I'm then trying to chain this output to another query and specifying the path of payload as "path".
However, no matter if I use {{ctx.first.payload}} or {{ctx.chain.first.payload}}, etc. I'm always getting this error response:
{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "could not parse input for watch [my_watch]. expected an object representing input [path], but found [VALUE_STRING] instead"
}
],
"type": "parse_exception",
"reason": "could not parse input for watch [my_watch]. expected an object representing input [path], but found [VALUE_STRING] instead"
},
"status": 400
}
Is it possible to somehow get the output of web service response in 1st input http request and use it as input for second input (which uses aggregation on first's output) ?
Also, is there a way to change the format of {{ctx.trigger.triggered_time}} while using in http input request ?
Update:
I am now able to access the http json response as chain input, however, while doing so, I can see some additional keys are being generated for each object inside the array.
Actual HTTP Response:
As a result, when I try to parse the payload for match filter criteria, I get the following exception: ParsingException[Unknown key for a START_OBJECT in [script].]
Any idea what could be going wrong here and how it can be resolved ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.