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

1.8 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
{
  "initialize": 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 and initial root token:
```javascript
{
  "keys": ["one", "two", "three"],
  "root_token": "foo"
}
```