mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 06:22:06 +08:00
Docs: Describe applying a license (#55078)
* Docs: Describe adding a license via API * Add missing word
This commit is contained in:
@ -59,6 +59,66 @@ Status codes:
|
||||
- **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
|
||||
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
> **Note:** Available in Grafana Enterprise v7.4+.
|
||||
|
||||
`POST /api/licensing/token/renew`
|
||||
|
||||
Manually ask license issuer for a new token.
|
||||
|
||||
**Required permissions**
|
||||
|
||||
See note in the [introduction]({{< ref "#enterprise-license-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| --------------- | ----- |
|
||||
| licensing:write | n/a |
|
||||
|
||||
### Examples
|
||||
@ -100,8 +160,7 @@ Content-Length: 357
|
||||
|
||||
Removes the license stored in the Grafana database.
|
||||
|
||||
|
||||
- **200** - OK
|
||||
**Required permissions**
|
||||
|
||||
See note in the [introduction]({{< ref "#enterprise-license-api" >}}) for an explanation.
|
||||
|
||||
|
Reference in New Issue
Block a user