I have a strange problem.  I tried to access the cluster master via the
rest api with curl in a bash shell script.  In the previous version, it
works fine.  I make the request, pipe it to JQ and filter out the elements
that I want.  I do the exact same command as in the shell script and it
works fine on the command line (produces json). In the shell script I
redirected the output to a file and it is in XML.  I tried setting the
header value for curl (-H 'Accept: application/json') but it doesn't have
an affect in the shell.

Here's the command that I'm using:
curl -H 'Accept: application/json' -s1 -k -E/path/to/pemfile
https://${MASTER_URL}/nifi-api/cluster
| jq -c '.systemDiagnostics | .flowFileRepositoryStorageUsage'

in the script this causes the "parse error: Invalid numeric literal at line
1, column 6" error.

Instead of piping to jq, if I redirect to a file, the file contains XML.

Any thoughts?

Reply via email to