open-nomad/website/source/docs/http/sys-init.html.md

79 lines
1.3 KiB
Markdown
Raw Normal View History

2015-09-12 00:01:02 +00:00
---
layout: "http"
page_title: "HTTP API: /sys/init"
sidebar_current: "docs-http-sys-init"
description: |-
2015-09-17 23:33:37 +00:00
The '/sys/init' endpoint is used to initialize a new Nomad.
2015-09-12 00:01:02 +00:00
---
# /sys/init
## GET
<dl>
<dt>Description</dt>
<dd>
2015-09-17 23:33:37 +00:00
Return the initialization status of a Nomad.
2015-09-12 00:01:02 +00:00
</dd>
<dt>Method</dt>
<dd>GET</dd>
<dt>Parameters</dt>
<dd>None</dd>
<dt>Returns</dt>
<dd>
```javascript
{
"initialize": true
}
```
</dd>
</dl>
## PUT
<dl>
<dt>Description</dt>
<dd>
2015-09-17 23:33:37 +00:00
Initializes a new Nomad. The Nomad must've not been previously
2015-09-12 00:01:02 +00:00
initialized.
</dd>
<dt>Method</dt>
<dd>PUT</dd>
<dt>Parameters</dt>
<dd>
<ul>
<li>
<span class="param">secret_shares</span>
<span class="param-flags">required</span>
The number of shares to split the master key into.
</li>
<li>
<span class="param">secret_threshold</span>
<span class="param-flags">required</span>
The number of shares required to reconstruct the master key.
This must be less than or equal to <code>secret_shares</code>.
</li>
</ul>
</dd>
<dt>Returns</dt>
<dd>
A JSON-encoded object including the master keys and initial root token:
```javascript
{
"keys": ["one", "two", "three"],
"root_token": "foo"
}
```
</dd>
</dl>