Can't seem to POST z_getoperation status

I’m trying to get data through POST z_getoperationstatus.

My method is this:

But I get this error message and I have no idea how to solve it:

{ result: null,
  error: { code: -1, message: 'JSON value is not an array as expected' },
  id: null }

Can anyone tell me what I’m doing wrong?

Check out the example zcash-cli help z_getoperationstatus which returns as an example:

zcash-cli z_getoperationstatus ‘[“operationid”, … ]’
curl --user myusername --data-binary ‘{“jsonrpc”: “1.0”, “id”:“curltest”, “method”: “z_getoperationstatus”, “params”: [’[“operationid”, … ]’] }’ -H ‘content-type: text/plain;’

So as per the error message looks like you need an extra array in there.

Yep, there are two arrays involved here:

  • JSON-RPC positional arguments are represented as an array.
  • z_getoperationstatus takes an array of operation IDs as its first positional argument.

Looks a bit funky when there’s only one argument, but oh well.

1 Like