# A couple changes to SNO API

**URL:** <https://forum.storj.io/t/a-couple-changes-to-sno-api/11300>\
**Category:** Node Operators\
**Created:** [January 19, 2021, 7:20pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300 "2021-01-19T19:20:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cameron](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cameron/32/69_2.png) [@cameron](https://forum.storj.io/u/cameron)\
**Post date:** [January 19, 2021, 7:20pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/1 "2021-01-19T19:20:08Z")

</div>

Hey everyone,

This is a heads-up that we’re making some changes to the SNO API soon.  
From the endpoint for a single satellite:

1. The `uptime` field is removed
2. The `online_score` field is removed (see 3rd point)
3. The `audits` field now uses the same structure as the audits field outputted by the `satellites` endpoint, which looks like this:

```auto
{
   auditScore
   suspensionScore
   onlineScore
   satelliteName
}

```

So, if you are using external tools which reference these fields, they may not work anymore.

Thanks!

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [January 19, 2021, 7:29pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/2 "2021-01-19T19:29:53Z")

</div>

Appreciate the announcement beforehand! Very thoughtful.

Apart from the move from online\_score into audits the output itself does not change?

---

<div class="post-metadata">

**Author:** ![cameron](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cameron/32/69_2.png) [@cameron](https://forum.storj.io/u/cameron)\
**Post date:** [January 19, 2021, 7:58pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/3 "2021-01-19T19:58:29Z")

</div>

Actually, I’m glad you asked! It looks like the underlying structure of the audits field has changed, and I missed that. I’ll edit the description above.

---

<div class="post-metadata">

**Author:** ![cameron](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cameron/32/69_2.png) [@cameron](https://forum.storj.io/u/cameron)\
**Post date:** [January 19, 2021, 8:56pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/4 "2021-01-19T20:56:18Z")

</div>

Does the new description answer your question?

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [January 19, 2021, 9:17pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/5 "2021-01-19T21:17:05Z")

</div>

Thanks for the heads up. Does this come with changes to the databases as well? Might need to adjust the earnings script accordingly. Perhaps you could point to the PR?

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [January 19, 2021, 9:17pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/6 "2021-01-19T21:17:37Z")

</div>

So for a single satellite this:

 ![grafik](https://storj-s3.bcdn.literatehosting.net/original/2X/e/e14ff928bb45422a3750051ee73389453c49d5a9.png)

> [@cameron](#):
>
> The `audits` field now uses the same structure as the audits field outputted by the `satellites` endpoint, which looks like this:

Will the onlineScore be added to the audit field os a single satellite too? (since there are both other audit scores)

Or only to the satellites endpoint?  
 ![grafik](https://storj-s3.bcdn.literatehosting.net/original/2X/0/02a3d154c41efd1fab68e0890d4c85dbf1353734.png)

Your working is a bit unclear to me in that point because there is only an “audits” field for satellites but the single satellite has “audit” field and a different structure. But the “audits” field of satellites already contains the onlineScore so probably not what you meant?

---

<div class="post-metadata">

**Author:** ![cameron](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cameron/32/69_2.png) [@cameron](https://forum.storj.io/u/cameron)\
**Post date:** [January 19, 2021, 9:32pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/7 "2021-01-19T21:32:43Z")

</div>

Sorry about that. Your picture of the single satellite with the crossed out sections is correct, except that the `audit` field is now identical to your second picture. Well, except that it won’t be an array, of course.

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [January 19, 2021, 9:34pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/8 "2021-01-19T21:34:42Z")

</div>

So in short the “audit” field will get an entry “onlineScore”/it moves into the audit field but no satelliteName obviously. That’s what I assumed, thanks.

---

<div class="post-metadata">

**Author:** ![cameron](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cameron/32/69_2.png) [@cameron](https://forum.storj.io/u/cameron)\
**Post date:** [January 19, 2021, 9:47pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/9 "2021-01-19T21:47:48Z")

</div>

We do plan to remove the uptime columns from the DB, yes.  
This contains the API changes [https://github.com/storj/storj/commit/6ba8f6c8a94eda74e7e4c170f874063a97b13391](https://github.com/storj/storj/commit/6ba8f6c8a94eda74e7e4c170f874063a97b13391)

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [January 19, 2021, 9:54pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/10 "2021-01-19T21:54:32Z")

</div>

So looking at that commit:

 ![grafik](https://storj-s3.bcdn.literatehosting.net/original/2X/7/7f22e194462229061f119c6379808244abe8de27.png)

This actually means the “audit” field on the “satellite” endpoint is renamed into “audits” and actually includes the name of the satellite.

Now I understand it better, thanks.

---

<div class="post-metadata">

**Author:** ![Odmin](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/odmin/32/92_2.png) [@Odmin](https://forum.storj.io/u/Odmin)\
**Post date:** [January 19, 2021, 11:21pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/11 "2021-01-19T23:21:51Z")

</div>

@cameron Thanks a lot for announcing it in advance!

---

<div class="post-metadata">

**Author:** ![kalloritis](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kalloritis/32/1126_2.png) [@kalloritis](https://forum.storj.io/u/kalloritis)\
**Post date:** [January 20, 2021, 2:10am UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/12 "2021-01-20T02:10:18Z")

</div>

Given this, I’m guessing those of us that do depend on the API for extended tracking will need to update those scraper tools ( [ie. Prometheus Storj-Exporter](https://forum.storj.io/t/prometheus-storj-exporter/1939) ).

What version is this change coming in?

---

<div class="post-metadata">

**Author:** ![Pentium100](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/pentium100/32/6082_2.png) [@Pentium100](https://forum.storj.io/u/Pentium100)\
**Post date:** [January 20, 2021, 7:00am UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/13 "2021-01-20T07:00:21Z")

</div>

I’m confused.

Frpom what I understand, `127.0.0.1:14002/api/sno/satellite/12t...` will go from this:

```auto
  "audit": {
    "totalCount": 253,
    "successCount": 253,
    "alpha": 19.999955,
    "beta": 0,
    "unknownAlpha": 19.999955,
    "unknownBeta": 0,
    "score": 1,
    "unknownScore": 1
  },
  "uptime": {
    "totalCount": 567,
    "successCount": 567,
    "alpha": 0,
    "beta": 0,
    "unknownAlpha": 0,
    "unknownBeta": 0,
    "score": 0,
    "unknownScore": 0
  },
  "onlineScore": 1,

```

to this:

```auto
"audits": {
    "AuditScore": 1,
    "SuspensionScore": 1,
    "UptimeScore": 1,
    "SatelliteName": "12tRQrMTWUWwzwGh18i7Fqs67kmdhH9t6aToeiwbo5mfS2rUmo"
  },

```

With audit counts and alpha/beta values no longer being accessible.

Is this correct?

What’s “AuditHistory” ?

---

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [January 20, 2021, 7:06am UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/14 "2021-01-20T07:06:33Z")

</div>

> [@Pentium100](#):
>
> What’s “AuditHistory” ?

> [@Changelog v1.20.2](https://forum.storj.io/t/changelog-v1-20-2/11207):
>
> For Storage Nodes Overused Disk Space The storage node dashboard will now show overused disk space instead of negative free space. Query Uptime History In one of the following releases, the uptime history will be visible on the storage node dashboard. For now you can get the uptime history from the storage node dashboard API. You will find the auditHistory under api/sno/satellite/\<satelliteID\>. It will print out something like {"windowStart":"2020-12-17T12:00:00Z","totalCount":19,"onlineCo…

> You will find the auditHistory under api/sno/satellite/. It will print out something like {“windowStart”:“2020-12-17T12:00:00Z”,“totalCount”:19,“onlineCount”:18} for the last 30 days with an interval of 12 hours.

---

<div class="post-metadata">

**Author:** ![greener](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/greener/32/62_2.png) [@greener](https://forum.storj.io/u/greener)\
**Post date:** [January 20, 2021, 10:00pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/15 "2021-01-20T22:00:18Z")

</div>

Thanks for the headsup

1. If I’m reading this correctly we’re going to loose audit total count and replaced with history that’s only last 30 days? This will make it harder to estimate vetting which takes more then 30 days usually.
2. Looking at [https://github.com/storj/storj/commit/6ba8f6c8a94eda74e7e4c170f874063a97b13391](https://github.com/storj/storj/commit/6ba8f6c8a94eda74e7e4c170f874063a97b13391) does this also rename `sno/estimated-payout` api endpoint to `sno/estimated-payouts`?

---

<div class="post-metadata">

**Author:** ![greener](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/greener/32/62_2.png) [@greener](https://forum.storj.io/u/greener)\
**Post date:** [January 25, 2021, 11:56am UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/16 "2021-01-25T11:56:27Z")

</div>

What version is this coming please? Wasn’t in `1.20.2`.

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [January 25, 2021, 1:36pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/17 "2021-01-25T13:36:01Z")

</div>

@cameron an answer to the last 2 posts would be appreciated. thx

---

<div class="post-metadata">

**Author:** ![Nikolai\_Siedov](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nikolai_siedov/32/1132_2.png) [@Nikolai\_Siedov](https://forum.storj.io/u/Nikolai_Siedov)\
**Post date:** [January 25, 2021, 3:05pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/18 "2021-01-25T15:05:29Z")

</div>

yes, all payout will be payouts now. In one of nearest, updates were finished, they are being tested and will be added in upcoming releases.

---

<div class="post-metadata">

**Author:** ![cameron](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cameron/32/69_2.png) [@cameron](https://forum.storj.io/u/cameron)\
**Post date:** [January 25, 2021, 3:14pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/19 "2021-01-25T15:14:34Z")

</div>

To the first point, that is correct. I agree that successful/total number of audits is useful information. @Nikolai\_Seidov what do you think about putting those fields back?

To the second point, the name of the endpoint has not changed from what I can see. [storj/server.go at c44368c489c3aac740df42f5a8af62a5aa115baf · storj/storj · GitHub](https://github.com/storj/storj/blob/c44368c489c3aac740df42f5a8af62a5aa115baf/storagenode/console/consoleserver/server.go#L71)

The changes are in v1.21.1 which is planned to be deployed today. I apologize for not responding sooner, felt a bit unwell last week ☹

---

<div class="post-metadata">

**Author:** ![kevink](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kevink/32/6077_2.png) [@kevink](https://forum.storj.io/u/kevink)\
**Post date:** [January 25, 2021, 4:11pm UTC](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300/20 "2021-01-25T16:11:56Z")

</div>

No problem, thanks for the answer and get well!

[Next page](https://forum.storj.io/t/a-couple-changes-to-sno-api/11300.md?page=2)
