-
-
Notifications
You must be signed in to change notification settings - Fork 1
Usage examples
Andrei Krivenko edited this page Jun 18, 2025
·
3 revisions
Request body type: form-data
It should contain a "files" field, which can accept an array of files up to 5 pieces at a time.
POST /api/file/upload
curl -i --location 'http://localhost:4000/api/file/upload' --form 'files=@"file.txt"'
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
...
{"filesNames":["file.txt"],"cids":["bafkreif7v2d2wdyh6pz5y2pwmrpegfpdgh5u7n5vomxnbofraqhuk2wapm"]}
GET /api/file/:cid
curl -i --location 'http://localhost:4000/api/file/bafkreif7v2d2wdyh6pz5y2pwmrpegfpdgh5u7n5vomxnbofraqhuk2wapm'
HTTP/1.1 200 OK
Content-Type: application/octet-stream
...
Hello ipfs-node!
GET /api/node/info
curl -i --location 'http://localhost:4000/api/node/info'
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
...
{
"version": "0.0.1",
"timestamp": 1720614998797,
"heliaStatus": "started",
"peerId": "12D3KooWJSiMDfyDLK3EMe2567sSM1VKQVnUn2getimGqVTWqKX9",
"multiAddresses": [
"/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWJSiMDfyDLK3EMe2567sSM1VKQVnUn2getimGqVTWqKX9",
"/ip4/62.72.43.99/tcp/4001/p2p/12D3KooWJSiMDfyDLK3EMe2567sSM1VKQVnUn2getimGqVTWqKX9"
],
"blockstoreSizeMb": 0.0009489059448242188,
"datastoreSizeMb": 0.006007194519042969,
"availableSizeInMb": 2257731
}