Doku durchsuchen
Menü
Geändert am Auf GitHub bearbeiten

Konsole: restart

Als Markdown kopieren

Diese Routen liegen auf der Konsole, Port 3375. Sie nehmen ein API-Token als Authorization: Bearer ndt_...; siehe API-Tokens. Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.

Pending server restarts after a change.

POST /api/settings/advanced/restart

Restart after a change to an advanced settings file.

Confirms your pending restart transaction, whatever it holds, as POST /api/settings/restart/confirm does, and logs it in the audit log.

Needs server.config. neodesk restart advanced calls it.

Request body, application/json:

Field Type Required What it is
fileId string yes The id of the file that was changed, for the audit log

200: Done (application/json)

Field Type Required
success true yes
data RestartTransaction yes
message string yes
Error When
400 No fileId, or you have no pending transaction
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 The transaction is not pending or failed

GET /api/settings/restart-status

Show whether a restart is running and how far it got.

Answers everyone. Without job and token it says that the console serves requests, since when and in which version: the web app polls it while the console restarts. With the id and the token a confirm answered, it answers that transaction; a wrong pair answers phase unknown.

neodesk restart status calls it.

Parameter In Type What it is
job query string The transaction id
token query string The token the confirm answered

200: Done (application/json)

Field Type Required
success true yes
data object or RestartTransaction yes
Error When
503 The transaction could not be read: the console is still starting

POST /api/settings/restart/cancel

Undo the changes waiting for a restart.

Undoes every change of your pending transaction, newest first, and logs it in the audit log.

Needs server.config. neodesk restart cancel calls it. It cannot be undone.

Request body, application/json:

Field Type Required What it is
id string yes The transaction id from GET /api/settings/restart/pending

200: Done (application/json)

Field Type Required
success true yes
data object yes
data.canceled true yes
data.id string 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
404 No transaction of yours with this id (restart_transaction_not_found)
409 The transaction is not pending any more (restart_transaction_not_cancelable)
500 Some changes could not be undone (restart_rollback_failed)

POST /api/settings/restart/complete

Clear a restart that finished or failed.

Removes your transaction once it is ready or failed.

Needs server.config. neodesk restart complete calls it.

Request body, application/json:

Field Type Required What it is
id string yes The transaction id from GET /api/settings/restart/pending

200: Done (application/json)

Field Type Required
success true yes
data object yes
data.completed true yes
data.id string 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
404 No transaction of yours with this id (restart_transaction_not_found)
409 The transaction is not ready or failed yet (restart_transaction_not_ready)

POST /api/settings/restart/confirm

Restart the server now to apply the waiting changes.

Restarts the server for your pending or failed transaction and logs it in the audit log. The console exits shortly after so that the service manager starts it again; follow it with GET /api/settings/restart-status?job=<id>&token=<token>. When the restart fails, every change is undone and the transaction fails.

Needs server.config. neodesk restart confirm calls it.

Request body, application/json:

Field Type Required What it is
id string yes The transaction id from GET /api/settings/restart/pending

200: Done (application/json)

Field Type Required
success true yes
data RestartTransaction 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
404 No transaction of yours with this id (restart_transaction_not_found)
409 The transaction is not pending or failed (restart_transaction_not_pending)
500 The restart failed

GET /api/settings/restart/pending

Show the changes waiting for a server restart.

Answers null when you have none: another account's transaction is not shown.

Needs server.config. neodesk restart pending calls it.

200: Done (application/json)

Field Type Required
success true yes
data RestartTransaction 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

Durchsucht Seiten, Abschnitte, Befehle und Einstellungen.