The docs for the HTTP API states “In fact, the
ipfs CLI commands use this API when operating in online mode.”
Is there a way to have the CLI display the HTTP request (full URL + query string) as well as the HTML POST body generated by the command?
Your reply was prompt but unhelpful.
I guess you don’t know what wireshark is.
Wireshark is a network inspection tool, it can be used by hackers to eavesdrop for example.
So you run wireshark, and you will be able to see the HTTP calls made on your machine (be sure to bind on
A filter like
tcp.port == 5001 && http should help you filter for the IPFS api.
My tip is eavesdrop yourself, that would show you the API calls. (I know it’s more hacky than something built in, but that also far less efforts)
I’m aware of the tool. However, not everyone works in an environment where they are allowed to load hacking tools on their company workstations.
It’s not a hacking tool, it’s a software debugging tool.
I’m sorry if you are banned to use wireshark, but wireshark is just a tool, it’s a hacking tool if you use it to hack, it’s a debugging tool if you use it to debug things.
Or just choose a tool that they don’t know about. An http snooping proxy like Charles or any number of similar proxies.
Many thanks for the suggestions. Much easier to use another distributed storage solution with a well documented API.
You can inspect most raw responses by using
ipfs --enc=json ... in your commands.
If you are wondering about the requests, they are as they are documented, with the querying options matching the CLI flags as explained in the docs.
The main exception is the /add command, which takes a multipart body, which is amply documented.
Is there a specific endpoint you are wondering about or having issues with?
Thanks for the suggestion. I’ve started “reverse engineering” using curl --verbose where possible.
There are a few places where the documentation is unclear. Here are a couple examples:
- block/rm docs suggest it can be used to remove multiple blocks but it is unclear how the multiple block hashes are passed.
- Similar suggestion in the docs for cid/base32 (“Convert CIDs to Base32”)
- Docs for cid/format do not identify the default values for the ‘v’ and ‘codec’ arguments
- Doc for config/edit suggest it can be used to edit the config. How is that possible through the HTTP API?