How to reference different wallets with curl JSONRPC requests Bitcoin core I have a headless Bitcoin core 0.17.1 running on Debian 10, and have created a second wallet &quot;johns-wallet&quot;.
I'd like to get the walletinfo (or any wallet request) of that specific wallet via curl, not the cli.
The Bitcoin core API reference doesn't offer an example of how to target different wallets when not using the CLI (and neither did my Google search).
I've tried:
curl --user johnsmith --data-binary '{&quot;jsonrpc&quot;: &quot;1.0&quot;, &quot;id&quot;:&quot;curltest&quot;, &quot;method&quot;: &quot;getwalletinfo&quot;, &quot;params&quot;: [] }' -H 'content-type: text/plain;' bitcoind:18332/wallets/johns-wallet/

and also
curl --user johnsmith --data-binary '{&quot;jsonrpc&quot;: &quot;1.0&quot;, &quot;id&quot;:&quot;curltest&quot;, &quot;method&quot;: &quot;getwalletinfo&quot;, &quot;params&quot;: [&quot;/wallets/johns-wallet/&quot;] }' -H 'content-type: text/plain;' bitcoind:18332

And also variations on the path itself to the wallet - none of them return a result, let alone an error.
Running without trying to specify a wallet returns:
{&quot;result&quot;:null,&quot;error&quot;:{&quot;code&quot;:-19,&quot;message&quot;:&quot;Wallet file not specified (must request wallet RPC through /wallet/&lt;filename&gt; uri-path).&quot;},&quot;id&quot;:&quot;curltest&quot;}

(In case it matters, the Bitcoind is running in a docker container, with a named volume)
This is the command I use - the http address is the address of the docker container that the Bitcoin daemon is running in
curl --user johnsmith --data-binary '{&quot;jsonrpc&quot;: &quot;1.0&quot;, &quot;id&quot;:&quot;curltest&quot;, &quot;method&quot;: &quot;getbalance&quot;, &quot;params&quot;: [&quot;*&quot;, 6] }' -H 'content-type: text/plain;' http://10.0.0.1:18332/