Endpoint
http://localhost:5001/api/v1/storage/announce
Arguments
Argument | Type | Description | Required? |
---|---|---|---|
host-storage-price | uint64 | Max price per GB of storage in μBTT. | N |
host-bandwidth-price | uint64 | Max price per MB of bandwidth in μBTT. | N |
host-collateral-price | uint64 | Max collateral stake per hour per GB in μBTT. | N |
host-bandwidth-limit | float64 | Max bandwidth limit per MB/s. | N |
host-storage-time-min | uint64 | Min number of days for storage. | N |
host-storage-max | uint64 | Max BTFS storage allowed by host, in GB. | N |
Usage
// Announce the host settings with maximum storage of 13 GB and minimum storage time of 35 days.
curl -X POST "http://localhost:5001/api/v1/storage/announce?host-storage-max=13&host-storage-time-min=35
Response
{
"OldCfg": {
"API": {
"HTTPHeaders": {}
},
"Addresses": {
"API": "/ip4/127.0.0.1/tcp/5001",
"Announce": [
"/ip4/67.164.115.223/tcp/4001"
],
"Gateway": "/ip4/127.0.0.1/tcp/8080",
"NoAnnounce": [],
"RemoteAPI": "/ip4/127.0.0.1/tcp/5101",
"Swarm": [
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001"
]
},
"Bootstrap": [
"/ip4/54.213.128.120/tcp/4001/btfs/QmWm3vBCRuZcJMUT9jDZysoYBb66aokmSReX26UaMk8qq5",
..........
"GracePeriod": "20s",
"HighWater": 900,
"LowWater": 600,
"Type": "basic"
},
"DisableBandwidthMetrics": false,
"DisableNatPortMap": false,
"DisableRelay": false,
"EnableAutoNATService": false,
"EnableAutoRelay": false,
"EnableRelayHop": false
}
}
}