Skip to content

Commit

Permalink
license api endpoint documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbailey committed Jun 1, 2020
1 parent bbc7c17 commit 8ea96a1
Showing 1 changed file with 106 additions and 0 deletions.
106 changes: 106 additions & 0 deletions website/pages/api-docs/operator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -470,4 +470,110 @@ server state is authoritative.

- `Index` - Current Raft index when the request was received.


## Get Nomad Enterprise License Info

This endpoint gets information about the current license.

| Method | Path | Produces |
| ------ | ------------------- | ------------------ |
| `GET` | `/v1/operator/license` | `application/json` |


The table below shows this endpoint's support for
[blocking queries](/api-docs#blocking-queries) and
[required ACLs](/api-docs#acls).

| Blocking Queries | ACL Required |
| ---------------- | ---------------- |
| `NO` | `operator:write` |


### Sample Request

```shell-session
$ curl \
http://127.0.0.1:8500/v1/operator/license
```

### Sample Response

```json
{
"KnownLeader": false,
"LastContact": 0,
"LastIndex": 0,
"License": {
"CustomerID": "temporary license customer",
"ExpirationTime": "2020-06-01T14:50:16.581304556-04:00",
"Features": [
"Automated Upgrades",
"Enhanced Read Scalability",
"Redundancy Zones",
"Namespaces",
"Resource Quotas",
"Preemption",
"Audit Logging",
"Setinel Policies"
],
"Flags": {
"modules": [
"governance-policy"
]
},
"InstallationID": "*",
"IssueTime": "2020-06-01T08:50:16.581304556-04:00",
"LicenseID": "temporary-license",
"Modules": [
"governance-policy"
],
"Product": "nomad",
"StartTime": "2020-06-01T08:50:16.581304556-04:00",
"TerminationTime": "2020-06-01T14:50:16.581304556-04:00"
},
"RequestTime": 0
}
```

## Updating the Nomad Enterprise License

This endpoint updates the Nomad license.


| Method | Path | Produces |
| ------ | ------------------- | ------------------ |
| `PUT` | `/v1/operator/license` | `application/json` |



The table below shows this endpoint's support for
[blocking queries](/api-docs#blocking-queries) and
[required ACLs](/api-docs#acls).

| Blocking Queries | ACL Required |
| ---------------- | ---------------- |
| `NO` | `operator:write` |


### Sample Payload

The payload is the raw license blob.

### Sample Request

```shell-session
$ curl \
--request PUT \
--data @consul.license \
http://127.0.0.1:8500/v1/operator/license
```

### Sample Response

```json
{
"Index": 15
}
```

[`default_scheduler_config`]: /docs/configuration/server#default_scheduler_config

0 comments on commit 8ea96a1

Please sign in to comment.