# Api documentation

**URL:** <https://forum.storj.io/t/api-documentation/14717>\
**Category:** FAQ\
**Tags:** storagenode-api\
**Created:** [July 25, 2021, 3:54pm UTC](https://forum.storj.io/t/api-documentation/14717 "2021-07-25T15:54:33Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dyczko](https://storj.bcdn.literatehosting.com/letter_avatar/dyczko/32/6_449c533f586939b6e5f246632a46421f.png) [@dyczko](https://forum.storj.io/u/dyczko)\
**Post date:** [July 25, 2021, 3:54pm UTC](https://forum.storj.io/t/api-documentation/14717/1 "2021-07-25T15:54:33Z")

</div>

Hi

I’m looking for api documentation.  
In particular I would like to know how to read “current monthly earnings”.

I know about:  
api/sno,  
api/sno/satellites,  
Is there anything else?

Thank you.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [July 25, 2021, 4:47pm UTC](https://forum.storj.io/t/api-documentation/14717/2 "2021-07-25T16:47:44Z")

</div>

The only available documentation is posted here:

> [@Storage node dashboard API (v1.3.3)](https://forum.storj.io/t/storage-node-dashboard-api-v1-3-3/5275):
>
> 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)](https://forum.storj.io/t/storage-node-dashboard-api/1270) 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:

> <https://github.com/storj/storj/blob/a883d7f582e1400f88646e3a101dce10704b22f8/storagenode/console/consoleserver/server.go#L64>

So, the endpoint for estimation is [http://localhost:14002/api/sno/estimated-payout](http://localhost:14002/api/sno/estimated-payout)  
The example for PowerShell:

```PowerShell
((curl http://localhost:14002/api/sno/estimated-payout).Content | ConvertFrom-Json).currentMonth

```

And for bash

```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.

---

<div class="post-metadata">

**Author:** ![dyczko](https://storj.bcdn.literatehosting.com/letter_avatar/dyczko/32/6_449c533f586939b6e5f246632a46421f.png) [@dyczko](https://forum.storj.io/u/dyczko)\
**Post date:** [July 25, 2021, 7:59pm UTC](https://forum.storj.io/t/api-documentation/14717/3 "2021-07-25T19:59:28Z")

</div>

Thank you very much Alexey!  
I really appreciate your support!

---

<div class="post-metadata">

**Author:** ![shoofar](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/shoofar/32/1132_2.png) [@shoofar](https://forum.storj.io/u/shoofar)\
**Post date:** [August 29, 2021, 6:59pm UTC](https://forum.storj.io/t/api-documentation/14717/4 "2021-08-29T18:59:32Z")

</div>

> [@Alexey](#):
>
> [http://localhost:14002/api/sno/estimated-payout](http://localhost:14002/api/sno/estimated-payout)

Hey Alexey! I tried those payoutstubs links and I am getting weird numbers in response like those from one of the satellites:

```
    "compPutRepair": 0,
    "compGetAudit": 15,
    "surgePercent": 0,
    "held": 2006182,
    "owed": 6018547,
    "disposed": 0,
    "paid": 6018547,
    "distributed": 12528337

```

Tried to sum all satellites to check if anything adds up, and it seems that it works with one important notice…  
(it adds up to like $15M for one of my node… I hope that I don’t have to pay tax on that hahaha

After careful checking out - those numbers need to be divided by 1’000’000 (1M) to arrive with correct $value - at least for payoutstubs

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [August 30, 2021, 8:27am UTC](https://forum.storj.io/t/api-documentation/14717/5 "2021-08-30T08:27:45Z")

</div>

As said in the [Storage node dashboard API (v1.3.3)](https://forum.storj.io/t/storage-node-dashboard-api-v1-3-3/5275)

> [@Storage node dashboard API (v1.3.3)](https://forum.storj.io/t/storage-node-dashboard-api-v1-3-3/5275/1):
>
> ```auto
> "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
> 
> ```

you need to divide money-related numbers to 1,000,000.00

---

<div class="post-metadata">

**Author:** ![dyczko](https://storj.bcdn.literatehosting.com/letter_avatar/dyczko/32/6_449c533f586939b6e5f246632a46421f.png) [@dyczko](https://forum.storj.io/u/dyczko)\
**Post date:** [August 31, 2021, 8:47pm UTC](https://forum.storj.io/t/api-documentation/14717/6 "2021-08-31T20:47:43Z")

</div>

Thank you.

Last question…(I hope) - I’m building a little to test my node.

How can I check the status via API? Is it?  
“lastPinged”:“2021-08-31T21:44:50.8941457+01:00”,  
in :14002/api/sno/  
Does it mean that my node last time was available at 2021-08-31T21:44:50.8941457+01:00  
Is this ping regular?

Thank you.

 ![image](https://storj-s3.bcdn.literatehosting.net/original/2X/8/8083e734bf421fa6c960b93f2d8a9a66feca46c2.png)

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [August 31, 2021, 9:13pm UTC](https://forum.storj.io/t/api-documentation/14717/7 "2021-08-31T21:13:43Z")

</div>

> [@dyczko](#):
>
> Does it mean that my node last time was available at 2021-08-31T21:44:50.8941457+01:00

you unlikely get more definitive answer than there [Status Online is it from api/sno](https://forum.storj.io/t/status-online-is-it-from-api-sno/14732)  
yes, this is time when the satellites saw your node last time. There is no specific schedule, your node should check-in on the satellites regularly.

```auto
storagenode setup --help | grep contact

```

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [March 14, 2024, 7:41am UTC](https://forum.storj.io/t/api-documentation/14717/8 "2024-03-14T07:41:03Z")

</div>

API broken?  
When I enter `/api/notifications/list` I get

```auto
{"error":"consoleapi notifications: strconv.ParseUint: parsing \"\": invalid syntax"}

```

But I believe it should work:

> <https://github.com/storj/storj/blob/a883d7f582e1400f88646e3a101dce10704b22f8/storagenode/console/consoleserver/server.go#L76>

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [March 14, 2024, 8:39am UTC](https://forum.storj.io/t/api-documentation/14717/9 "2024-03-14T08:39:50Z")

</div>

Perhaps the list just empty.

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [March 14, 2024, 8:45am UTC](https://forum.storj.io/t/api-documentation/14717/10 "2024-03-14T08:45:29Z")

</div>

Let me check…

No, it is not empty.

---

<div class="post-metadata">

**Author:** ![Egon](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/egon/32/67_2.png) [@Egon](https://forum.storj.io/u/Egon)\
**Post date:** [March 14, 2024, 8:46am UTC](https://forum.storj.io/t/api-documentation/14717/11 "2024-03-14T08:46:27Z")

</div>

Currently `list` endpoint also expects `limit` and `page` query arguments as well. i.e. this should work (although, I didn’t test it)

```auto
/api/notifications/list?page=0&limit=100

```

Although, it would be probably better if it defaulted to some value or provide a better error message. Anyways created an issue for tracking it [storagenode/console/consoleapi: list endpoint arguments page and limit should be optional · Issue #6865 · storj/storj · GitHub](https://github.com/storj/storj/issues/6865)

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [March 14, 2024, 8:48am UTC](https://forum.storj.io/t/api-documentation/14717/12 "2024-03-14T08:48:18Z")

</div>

> [@Egon](#):
>
> `/api/notifications/list?page=0&limit=100`

Great. While 0 does not work:  
`{"error":"consoleapi notifications: notificationsdb: page can not be 0"}`

But 1 does. So it is not broken and I can see the notifications now.

---

<div class="post-metadata">

**Author:** ![Egon](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/egon/32/67_2.png) [@Egon](https://forum.storj.io/u/Egon)\
**Post date:** [March 14, 2024, 8:51am UTC](https://forum.storj.io/t/api-documentation/14717/13 "2024-03-14T08:51:43Z")

</div>

Hopefully, we can eventually migrate console api to `apigen` generator, which should give us better documentation and also make it clearer what’s expected. In addition to a stable JS/TS client interfaces.
