p =
subprocess.Popen(’’‘curl -XGET “http://xyz:80/_sql?format=txt” -H “Content-Type: application/json” -d’{ “query”: "DESC “vmanagestats*” "}’ ‘’’ , shell=True, stdout=subprocess.PIPE)
(output, err) = p.communicate()
print(output,err)
Error: (’{“error”:{“root_cause”:[{“type”:“x_content_parse_exception”,“reason”:"[1:13] [sql/query] failed to parse object"}],“type”:“x_content_parse_exception”,“reason”:"[1:13] [sql/query] failed to parse object",“caused_by”:{“type”:“json_parse_exception”,“reason”:“Unexpected character (‘v’ (code 118)): was expecting comma to separate Object entries\n at [Source: (org.elasticsearch.common.io.stream.InputStreamStreamInput); line: 1, column: 21]”}},“status”:400}’, None)