Console: attestation
Copy as MarkdownThese routes are on the console, port 3375. They take an API token as Authorization: Bearer ndt_...; see API tokens.
The server's performance test and its badge.
Stop the running performance test.
Takes no body.
Needs server.attestation. neodesk attestation abort calls it. It cannot be undone.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
aborted |
boolean | yes | True when a test was running |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Show the settings of the performance badge.
Needs server.attestation. neodesk attestation badge calls it.
200: Done (application/json)
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Change the settings of the performance badge.
Stores the texts and notes the change in the audit log. Control characters are dropped and the texts trimmed: the title to 96 characters, labels to 32. A tier left out stores an empty label, which reads as the default.
Needs server.attestation. neodesk attestation badge-set calls it.
Request body, application/json:
Needs badgeTitle or tierLabels
| Field | Type | What it is |
|---|---|---|
badgeTitle |
string | The badge title, at most 96 characters |
tierLabels |
object | The tier labels, at most 32 characters each |
tierLabels.bronze |
string | |
tierLabels.iron |
string | |
tierLabels.platinum |
string | |
tierLabels.titanium |
string | |
tierLabels.obsidian |
string |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The body is not an object with badgeTitle or tierLabels |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Show the result of the last performance test.
Needs server.attestation. neodesk attestation result calls it.
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
result |
AttestationResult or null | yes |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Run the performance test of this server.
Starts the test in the background and answers at once. It opens connections to the server's own signal and relay ports until processor, memory or disk load reaches 80 percent, for at most 10 minutes; follow it with GET /api/server-attestation/status. Takes no body.
Needs server.attestation. neodesk attestation run calls it.
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
started |
true |
yes |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 409 | A test is running already |
Show how far the running performance test got.
Needs server.attestation. neodesk attestation status calls it.
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
success |
true |
yes | |
running |
boolean | yes | |
phase |
string, one of idle, baseline, probe, ramp-up, stabilize, done |
yes | |
progress |
object or null | yes | What the running or last test reported last, null before the first test |
progress.phase |
string | ||
progress.message |
string | ||
progress.connections |
integer | ||
progress.baseline |
object | ||
progress.rampSteps |
array of object | ||
progress.rampSteps[].at |
string (date-time) | ||
progress.rampSteps[].connections |
integer | ||
progress.rampSteps[].signalConnections |
integer | ||
progress.rampSteps[].relaySessions |
integer | ||
progress.rampSteps[].cpuPercent |
number | ||
progress.rampSteps[].memPercent |
number | ||
progress.rampSteps[].diskPercent |
number | ||
progress.rampSteps[].errorPercent |
number | ||
progress.probeLog |
array | ||
progress.result |
AttestationResult | ||
lastResult |
AttestationResult or null | yes |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |