Changes to the go-ipfs API
We are upgrading to go-ipfs v0.11.0 on 2nd March 2022 15:00 UTC, which will include breaking changes listed below for go-ipfs v0.10.0. Furthermore, to reduce the impact that some backward-incompatible API changes in the go-ipfs client would have had on users after the release of go-ipfs 0.5.0 (now over a year ago), we have since maintained support for HTTP GET on some endpoints and allowed access to the /cat API endpoint in a way that was undocumented but actively used by some projects. We plan on doing the same for other deprecated APIs, wherever possible, such as the /object API. However, in order to keep the Infura API as close as possible to the official IPFS HTTP API, this support will be removed.
If you will be impacted by these changes, the most sensible way to handle this change is to please call /api/v0/version to check which version is reported. We advise against changing your code behavior based on time as this can be brittle.
Breaking changes in v0.10.0:
/api/v0/dag/get
- If not set with the output-codec option, output will now be formatted with
dag-json
- Field names reported for dag-pb DAG (which include unixfs, that is folder and files) will change
- There is no longer an additional new-line character at the end of the data output
/api/v0/dag/put
- If not set with the input-codec option, the defaults changed to reduce ambiguity and surprises: input will now be assumed to be
dag-json
--format
and--input-enc
will be removed and replaced with--store-codec
and--input-codec
- codec names now match the ones defined in the multicodec table
- Field names reported for dag-pb DAG (which include unixfs, that is folder and files) will change
For more information, please refer to the release notes for v0.10.0.
Breaking changes in v0.11.0:
UnixFS sharding is now automatic and enabled by default
- HAMT-based sharding will be applied to large directories (i.e. those that would serialize into block larger than ~256KiB)s. This means importing data via commands like /api/v0/add may result in different CIDs due to the different DAG representations.
For more information, please refer to the release notes for v0.11.0
Further changes we will make to the API
- Any IPFS API methods that previously allowed access via HTTP GET will only allow access via HTTP POST as per the Infura IPFS API documentation
- Support for requesting an IPFS CID from the /cat endpoint via /cat/CID will be removed, in favor of the documented form /cat?arg=CID
- Support for handling DAG objects via the /object endpoint will be removed, in favor of the preferred /dag endpoint that is already supported
Please upgrade your code to accommodate these changes by 1st March 2022, with careful attention to the breaking changes. Please do reach out via the community board with any questions.