vault/website/source/docs/http/sys-init.html.md
Raja Nadar 4ec81141e8 doc: add keys_base64 to response json (#1824)
add the missing fields in json response for initializing vault.
keys_base64
2016-09-01 09:40:40 -04:00

2.0 KiB

layout page_title sidebar_current description
http HTTP API: /sys/init docs-http-sys-init The '/sys/init' endpoint is used to initialize a new Vault.

/sys/init

GET

Description
Return the initialization status of a Vault.
Method
GET
Parameters
None
Returns
```javascript
{
  "initialized": true
}
```

PUT

Description
Initializes a new Vault. The Vault must've not been previously initialized.
Method
PUT
Parameters
  • secret_shares required The number of shares to split the master key into.
  • secret_threshold required The number of shares required to reconstruct the master key. This must be less than or equal to secret_shares.
  • pgp_keys optional An array of PGP public keys used to encrypt the output unseal keys. Ordering is preserved. The keys must be base64-encoded from their original binary representation. The size of this array must be the same as secret_shares.
Returns
A JSON-encoded object including the (possibly encrypted, if pgp_keys was provided) master keys, base 64 encoded master keys and initial root token:
```javascript
{
  "keys": ["one", "two", "three"],
  "keys_base64": ["cR9No5cBC", "F3VLrkOo", "zIDSZNGv"],
  "root_token": "foo"
}
```
See Also
For more information on the PGP/Keybase.io process please see the [Vault GPG and Keybase integration documentation](/docs/concepts/pgp-gpg-keybase.html).