mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
Docs: Describe applying a license (#55078)
* Docs: Describe adding a license via API * Add missing word
This commit is contained in:
parent
7114c51f9f
commit
96cb415497
@ -59,6 +59,66 @@ Status codes:
|
|||||||
|
|
||||||
- **200** - OK
|
- **200** - OK
|
||||||
|
|
||||||
|
## Add license
|
||||||
|
|
||||||
|
> **Note:** Available in Grafana Enterprise v7.4+.
|
||||||
|
|
||||||
|
`POST /api/licensing/token`
|
||||||
|
|
||||||
|
Applies a license to a Grafana instance.
|
||||||
|
|
||||||
|
**Required permissions**
|
||||||
|
|
||||||
|
See note in the [introduction]({{< ref "#enterprise-license-api" >}}) for an explanation.
|
||||||
|
|
||||||
|
| Action | Scope |
|
||||||
|
| --------------- | ----- |
|
||||||
|
| licensing:write | n/a |
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
**Example request:**
|
||||||
|
|
||||||
|
```http
|
||||||
|
POST /licensing/token
|
||||||
|
Accept: application/json
|
||||||
|
Content-Type: application/json
|
||||||
|
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||||
|
|
||||||
|
{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aGlzIjoiaXMiLCJub3QiOiJhIiwidmFsaWQiOiJsaWNlbnNlIn0.bxDzxIoJlYMwiEYKYT_l2s42z0Y30tY-6KKoyz9RuLE"}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Example response:**
|
||||||
|
|
||||||
|
```http
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json
|
||||||
|
Content-Length: 357
|
||||||
|
|
||||||
|
{
|
||||||
|
"jti":"2",
|
||||||
|
"iss":"https://grafana.com",
|
||||||
|
"sub":"https://play.grafana.org/"
|
||||||
|
"lid":"1",
|
||||||
|
"included_users":15,
|
||||||
|
"lic_exp_warn_days":30,
|
||||||
|
"tok_exp_warn_days":2,
|
||||||
|
"update_days":1,
|
||||||
|
"prod":["grafana-enterprise"],
|
||||||
|
"company":"Grafana Labs"
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
The response is a JSON blob available for debugging purposes. The
|
||||||
|
available fields may change at any time without any prior notice.
|
||||||
|
|
||||||
|
Status Codes:
|
||||||
|
|
||||||
|
- **200** - OK
|
||||||
|
- **400** - Bad request
|
||||||
|
- **500** - Internal server error (refer to server logs for more details)
|
||||||
|
|
||||||
## Manually force license refresh
|
## Manually force license refresh
|
||||||
|
|
||||||
> **Note:** Available in Grafana Enterprise v7.4+.
|
> **Note:** Available in Grafana Enterprise v7.4+.
|
||||||
@ -100,8 +160,7 @@ Content-Length: 357
|
|||||||
"iss":"https://grafana.com",
|
"iss":"https://grafana.com",
|
||||||
"sub":"https://play.grafana.org/"
|
"sub":"https://play.grafana.org/"
|
||||||
"lid":"1",
|
"lid":"1",
|
||||||
"included_admins":5,
|
"included_users":15,
|
||||||
"included_viewers":10,
|
|
||||||
"lic_exp_warn_days":30,
|
"lic_exp_warn_days":30,
|
||||||
"tok_exp_warn_days":2,
|
"tok_exp_warn_days":2,
|
||||||
"update_days":1,
|
"update_days":1,
|
||||||
|
Loading…
Reference in New Issue
Block a user