> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://stelltec.com/rhebok/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://stelltec.com/rhebok/docs/_mcp/server.

# Restart rhebok

POST http://127.0.0.1:7331/api/restart

Starts `rhebok restart` with the installed binary in its own process
group, which stops the running dashboard and any running index and
starts them again. Returns at once with the new child's pid and this
dashboard's pid. Any request body is ignored.


Reference: https://stelltec.com/rhebok/docs/api/updates/restart

## Response

### 202

The restart process started.

- `started` (true, required)
- `pid` (integer, required) — The `rhebok restart` process.
- `dashboard_pid` (integer, required) — This dashboard's process id, which the restart stops.

## Errors

### 409 Conflict Error

An update is running, or the request `Origin` is not this dashboard.

- `error` (string, required) — What went wrong, in plain words.

### 413 Content Too Large Error

The declared `Content-Length` is over 65,536 bytes.

- `error` (string, required) — What went wrong, in plain words.

### 421 Misdirected Request Error

The `Host` header does not name this dashboard (see the rules at the top of this page).

- `error` (string, required) — What went wrong, in plain words.

### 500 Internal Server Error

An unexpected server-side failure, such as failing to find the running binary, spawn a process, or read or write a file.

- `error` (string, required) — What went wrong, in plain words.

### 503 Service Unavailable Error

The rhebok binary to run is not an executable file. `fix` says how to repair it.

- `error` ("the rhebok CLI was not found", required)
- `fix` (string, required) — A command or instruction that repairs the install. Can be empty.

## Examples

**Response**

```json
{
  "started": true,
  "pid": 50301,
  "dashboard_pid": 50112
}
```

**SDK Code**

```python Updates_restart_example
import requests

url = "http://127.0.0.1:7331/api/restart"

response = requests.post(url)

print(response.json())
```

```javascript Updates_restart_example
const url = 'http://127.0.0.1:7331/api/restart';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Updates_restart_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://127.0.0.1:7331/api/restart"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Updates_restart_example
require 'uri'
require 'net/http'

url = URI("http://127.0.0.1:7331/api/restart")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
```

```java Updates_restart_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("http://127.0.0.1:7331/api/restart")
  .asString();
```

```php Updates_restart_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'http://127.0.0.1:7331/api/restart');

echo $response->getBody();
```

```csharp Updates_restart_example
using RestSharp;

var client = new RestClient("http://127.0.0.1:7331/api/restart");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift Updates_restart_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "http://127.0.0.1:7331/api/restart")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```