Storage node dashboard API (v1.3.3)

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

/api/heldamount/paystubs/2020-03
/api/heldamount/paystubs/2020-02?id=118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW

Explanation of the output
{"satelliteId":"118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW", -> Stefas satellite
"period":"2020-02", -> Feburary payout
"created":"2020-04-07T20:14:46.965815Z", -> We importat all the historical data in April
"codes":"X:E", -> Graceful exit finished. Complete list here: https://github.com/storj/storj/blob/895eac17113f74f7a6364cdf2fdbcea1b8d93ccc/satellite/compensation/codes.go#L11-L29
"usageAtRest":554741700493312, ->
"usageGet":566457122816, -> 0.566 TB download traffic
"usagePut":52167979776,
"usageGetRepair":1107763,
"usagePutRepair":0,
"usageGetAudit":2316800,
"compAtRest":1137220,
"compGet":11329142, -> $ 11.32 (0.566 * $ 20)
"compPut":0,
"compGetRepair":1107763, -> $ 1.1 ($10 per TB)
"compPutRepair":0,
"compGetAudit":23, -> $0.000023 ($10 per TB)
"surgePercent":0,
"held":0, -> Held amount depending on the node age
"owed":90849277, -> Payout reduced by held amount
"disposed":77275128, -> Any held amount payback. In this example graceful exit. It will also show the 50% payback in month 15
"paid":90849277} -> Final payment for usage + held amount
6 Likes

@greener Hope you have some time to update the prometheus-exporter to the new endpoints :slight_smile:
Would be greatly appreciated!
Good that we have a slow rollout, so there is some time until it hits all the docker installations :smiley:

/api/notifications/readall
/api/notifications/${id}/read

this not work, but may be because i not have notifications
/api/notifications/list?page=1&limit=10 giveresult, that i have 0 of them

Just so I understand correctly, it’s just the endpoints that has changed, not they JSON key;Values?

Where can I find all Dashboard api call like
curl -s http://ipaddress:14002/api/dashboard | jq .data.satellites?

I moved your post to here. Please, take a look on a topic

The output format has changed a bit too, there is no “data” object anymore.

curl -s “127.0.0.1:14002/api/sno/” | jq .satellites

The “/” after sno is required, without it I get a 301

2 Likes

It is strange that resource end point isn’t consistent.

/api/sno gives me <a href="/api/sno/">Moved Permanently</a>.
but /api/sno/ works
meanwhile /api/satellites returns resource.

/api/sno/ should be without slash at the end, don’t you think? Using v 1.0.1
Not a big deal considering how many endpoints we have but still

1 Like

A few SNO includding me see that /api/sno queries may be slow. Up to few minites per call.

is it on raspberry on full power PC?

On Atom D510. Before v0.35 all works fine.

did you tried after write after restart? or after some time after restart, becase on start it make extencive work for some tome to calculate space

Yes. Hours and days after restart.

I get an error on the “/${id}” endpoint:
error “storageNode console web error: node ID error: invalid format: version and/or checksum bytes missing”

I used the satellite ID from “/api/sno/”

The others work fine

127.0.0.1:14002/api/sno/satellite/118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW works for me.

LOL. I see where it went wrong. Took out the brackets, didn’t take the ‘$’.

Thanks

Payout data is now available via API

/api/heldamount/paystubs/2020-03
/api/heldamount/paystubs/2020-02?id=118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW

Explanation of the output
{"satelliteId":"118UWpMCHzs6CvSgWd9BfFVjw5K9pZbJjkfZJexMtSkmKxvvAW", -> Stefas satellite
"period":"2020-02", -> Feburary payout
"created":"2020-04-07T20:14:46.965815Z", -> We importat all the historical data in April
"codes":"X:E", -> Graceful exit finished. Complete list here: https://github.com/storj/storj/blob/895eac17113f74f7a6364cdf2fdbcea1b8d93ccc/satellite/compensation/codes.go#L11-L29
"usageAtRest":554741700493312, ->
"usageGet":566457122816, -> 0.566 TB download traffic
"usagePut":52167979776,
"usageGetRepair":1107763,
"usagePutRepair":0,
"usageGetAudit":2316800,
"compAtRest":1137220,
"compGet":11329142, -> $ 11.32 (0.566 * $ 20)
"compPut":0,
"compGetRepair":1107763, -> $ 1.1 ($10 per TB)
"compPutRepair":0,
"compGetAudit":23, -> $0.000023 ($10 per TB)
"surgePercent":0,
"held":0, -> Held amount depending on the node age
"owed":90849277, -> Payout reduced by held amount
"disposed":77275128, -> Any held amount payback. In this example graceful exit. It will also show the 50% payback in month 15
"paid":90849277} -> Final payment for usage + held amount

@Alexey can you make this a wiki topic as well so that I am allowed to update the first post?

5 Likes

I made it a wiki, you can now update it.

1 Like

From this I understood 566457122816 is in bytes but

Why isn’t this in cents instead of /1,000,000 ?

Because we want a higher accuracy.

4 Likes