Alexey
July 25, 2021, 4:47pm
2
The only available documentation is posted here:
With v0.35.3 the storage node dashboard API endpoints have changed. If you don’t know how to open the dashboard API please take a look at the old thread here: Storage node dashboard API (v0.19.0)
The new endpoints are:
/api/sno
/api/sno/satellites
/api/sno/satellite/${id}
/api/notifications/list?page=1&limit=10
In the code I can also see the following endpoints but I was not able to test them:
/api/notifications/readall
/api/notifications/${id}/read
Payout data is available with v1.3.3
…
But you can checkout GitHub:
server := Server{
log: logger,
service: service,
listener: listener,
notifications: notifications,
payout: payout,
}
router := mux.NewRouter()
// handle api endpoints
storageNodeController := consoleapi.NewStorageNode(server.log, server.service)
storageNodeRouter := router.PathPrefix("/api/sno").Subrouter()
storageNodeRouter.StrictSlash(true)
storageNodeRouter.HandleFunc("/", storageNodeController.StorageNode).Methods(http.MethodGet)
storageNodeRouter.HandleFunc("/satellites", storageNodeController.Satellites).Methods(http.MethodGet)
storageNodeRouter.HandleFunc("/satellite/{id}", storageNodeController.Satellite).Methods(http.MethodGet)
storageNodeRouter.HandleFunc("/estimated-payout", storageNodeController.EstimatedPayout).Methods(http.MethodGet)
notificationController := consoleapi.NewNotifications(server.log, server.notifications)
notificationRouter := router.PathPrefix("/api/notifications").Subrouter()
So, the endpoint for estimation is http://localhost:14002/api/sno/estimated-payout
The example for PowerShell:
((curl http://localhost:14002/api/sno/estimated-payout).Content | ConvertFrom-Json).currentMonth
And for bash
curl -sL http://localhost:14002/api/sno/estimated-payout | jq '.currentMonth'
You need to divide the result for .payout
, .held
, .egressBandwidthPayout
, .egressRepairAuditPayout
, .diskSpacePayout
to 100.00
to see them in $
, not cents.
2 Likes