open-vault/website/source/api/system/license.html.md

79 lines
1.6 KiB
Markdown
Raw Normal View History

2017-11-14 21:15:09 +00:00
---
layout: "api"
page_title: "/sys/license - HTTP API"
sidebar_current: "docs-http-system-license"
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.
The `/sys/license` endpoint is used to view and update the license used in
Vault.
## Read License
This endpoint returns information about the currently installed license.
| Method | Path | Produces |
| :------- | :--------------------------- | :--------------------- |
| `GET` | `/sys/license` | `200 application/json` |
### Sample Request
```
$ curl \
--header "X-Vault-Token: ..." \
https://vault.rocks/v1/sys/license
```
### Sample Response
```json
{
"data": {
"expiration_time": "2017-11-14T16:34:36.546753-05:00",
"features": [
"UI",
"HSM",
"Performance Replication",
"DR Replication"
],
"license_id": "temporary",
"start_time": "2017-11-14T16:04:36.546753-05:00"
},
"warnings": [
"time left on license is 29m33s"
]
}
```
## Install License
This endpoint is used to install a license into Vault.
| Method | Path | Produces |
| :------- | :--------------------------- | :--------------------- |
| `PUT` | `/sys/license` | `204 (empty body)` |
### Sample Payload
```json
{
"text": "01ABCDEFG..."
}
```
### Sample Request
```
$ curl \
--header "X-Vault-Token: ..." \
--request PUT \
--data @payload.json \
https://vault.rocks/v1/sys/license
```