2017-11-14 21:15:09 +00:00
|
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
|
layout: api
|
|
|
|
|
page_title: /sys/license - HTTP API
|
|
|
|
|
sidebar_title: <code>/sys/license</code>
|
2017-11-14 21:15:09 +00:00
|
|
|
|
description: |-
|
|
|
|
|
The `/sys/license` endpoint is used to view and update the license used in
|
|
|
|
|
Vault.
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# `/sys/license`
|
|
|
|
|
|
|
|
|
|
~> **Enterprise Only** – These endpoints require Vault Enterprise.
|
|
|
|
|
|
2020-01-18 00:18:09 +00:00
|
|
|
|
The `/sys/license` endpoint is used to view and update the license used in
|
2017-11-14 21:15:09 +00:00
|
|
|
|
Vault.
|
|
|
|
|
|
|
|
|
|
## Read License
|
|
|
|
|
|
|
|
|
|
This endpoint returns information about the currently installed license.
|
|
|
|
|
|
2020-01-18 00:18:09 +00:00
|
|
|
|
| Method | Path |
|
|
|
|
|
| :----- | :------------- |
|
|
|
|
|
| `GET` | `/sys/license` |
|
2017-11-14 21:15:09 +00:00
|
|
|
|
|
|
|
|
|
### Sample Request
|
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
|
```shell-session
|
2017-11-14 21:15:09 +00:00
|
|
|
|
$ curl \
|
|
|
|
|
--header "X-Vault-Token: ..." \
|
2018-03-23 15:41:51 +00:00
|
|
|
|
http://127.0.0.1:8200/v1/sys/license
|
2017-11-14 21:15:09 +00:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Sample Response
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
|
|
|
|
"expiration_time": "2017-11-14T16:34:36.546753-05:00",
|
2020-01-18 00:18:09 +00:00
|
|
|
|
"features": ["UI", "HSM", "Performance Replication", "DR Replication"],
|
2017-11-14 21:15:09 +00:00
|
|
|
|
"license_id": "temporary",
|
|
|
|
|
"start_time": "2017-11-14T16:04:36.546753-05:00"
|
|
|
|
|
},
|
2020-01-18 00:18:09 +00:00
|
|
|
|
"warnings": ["time left on license is 29m33s"]
|
2017-11-14 21:15:09 +00:00
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Install License
|
|
|
|
|
|
|
|
|
|
This endpoint is used to install a license into Vault.
|
|
|
|
|
|
2020-01-18 00:18:09 +00:00
|
|
|
|
| Method | Path |
|
|
|
|
|
| :----- | :------------- |
|
|
|
|
|
| `PUT` | `/sys/license` |
|
2017-11-14 21:15:09 +00:00
|
|
|
|
|
2018-01-23 02:44:38 +00:00
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
|
|
- `text` `(string: <required>)` – The text of the license.
|
|
|
|
|
|
2020-01-18 00:18:09 +00:00
|
|
|
|
_DR Secondary Specific Parameters_
|
2018-01-23 02:44:38 +00:00
|
|
|
|
|
2020-01-18 00:18:09 +00:00
|
|
|
|
- `dr_operation_token` `(string: <required>)` - DR operation token used to authorize this request.
|
2018-01-23 02:44:38 +00:00
|
|
|
|
|
2017-11-14 21:15:09 +00:00
|
|
|
|
### Sample Payload
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"text": "01ABCDEFG..."
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Sample Request
|
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
|
```shell-session
|
2017-11-14 21:15:09 +00:00
|
|
|
|
$ curl \
|
|
|
|
|
--header "X-Vault-Token: ..." \
|
|
|
|
|
--request PUT \
|
|
|
|
|
--data @payload.json \
|
2018-03-23 15:41:51 +00:00
|
|
|
|
http://127.0.0.1:8200/v1/sys/license
|
2017-11-14 21:15:09 +00:00
|
|
|
|
```
|