# Console: restart

Source: https://docs.neode.sk/development/api-reference/console-restart/
Last updated: 2026-12-03

> 6 operations. Pending server restarts after a change.

These routes are on the console, port 3375. They take an API token as `Authorization: Bearer ndt_...`; see [API tokens](https://docs.neode.sk/command-line/api-tokens.md).

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](https://docs.neode.sk/development/api-reference/schemas.md#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](https://docs.neode.sk/development/api-reference/schemas.md#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=&lt;id>&token=&lt;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](https://docs.neode.sk/development/api-reference/schemas.md#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](https://docs.neode.sk/development/api-reference/schemas.md#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 |
