Bearer authentication header of the form Bearer <token>.
Query parameters
wrapstringOptional
Make a directory for including the file
Body
filestring · binaryOptional
Responses
200
Add a file or directory to IPFS
application/json
post
/ipfs/add
200
Add a file or directory to IPFS
Request Body
This endpoint expects one or several files (depending on the command) in the body of the request as 'multipart/form-data'.
The add command not only allows adding files, but also uploading directories and complex hierarchies.
This happens as follows: Every part in the multipart request is a directory or a file to be added to IPFS.
Directory parts have a special content type application/x-directory. These parts do not carry any data. The part headers look as follows:
File parts carry the file payload after the following headers:
The above file includes its path in the "folderName/file.txt" hierarchy and IPFS will therefore be able to add it inside "folderName". The parts declaring the directories are optional when they have files inside and will be inferred from the filenames. In any case, a depth-first traversal of the directory tree is recommended to order the different parts making the request.
The Abspath header is included for filestore/urlstore features that are enabled with the nocopy option and it can be set to the location of the file in the filesystem (within the IPFS root), or to its full web URL.
Example
Cat
Show IPFS object data
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
cidstringRequired
The content ID to the IPFS object(s) to be outputted
Query parameters
sub_pathstringOptional
The sub path of the IPFS object(s)
Responses
200
Show IPFS object data
text/plain
Responsestring
get
/ipfs/{cid}
200
Show IPFS object data
Example
Get
Save IPFS object data
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
cidstringRequired
The content ID to the IPFS object(s) to be outputted
Query parameters
filenamestringOptional
The filename to be saved. If omitted, CID is used
Responses
200
Save IPFS object data
application/x-tar
Responsestring · binary
get
/ipfs/{cid}/get
200
Save IPFS object data
Example
Id
Show IPFS node id info.
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200
Show IPFS node id info
application/json
get
/ipfs/id
200
Show IPFS node id info
Example
Version
Show IPFS version information
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.