github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/api-docs/operator/license.mdx (about)

     1  ---
     2  layout: api
     3  page_title: License - Operator - HTTP API
     4  sidebar_title: License
     5  description: |-
     6    The /operator/license endpoints allow for setting and retrieving the Nomad Enterprise License.
     7  ---
     8  
     9  # License Operator HTTP API
    10  
    11  <EnterpriseAlert />
    12  
    13  ## Get Nomad Enterprise License Info
    14  
    15  This endpoint gets information about the current license.
    16  
    17  | Method | Path                   | Produces           |
    18  | ------ | ---------------------- | ------------------ |
    19  | `GET`  | `/v1/operator/license` | `application/json` |
    20  
    21  The table below shows this endpoint's support for
    22  [blocking queries](/api-docs#blocking-queries) and
    23  [required ACLs](/api-docs#acls).
    24  
    25  | Blocking Queries | ACL Required    |
    26  | ---------------- | --------------- |
    27  | `NO`             | `operator:read` |
    28  
    29  ### Sample Request
    30  
    31  ```shell-session
    32  $ curl \
    33      https://localhost:4646/v1/operator/license
    34  ```
    35  
    36  ### Sample Response
    37  
    38  ```json
    39  {
    40    "KnownLeader": false,
    41    "LastContact": 0,
    42    "LastIndex": 0,
    43    "License": {
    44      "CustomerID": "temporary license customer",
    45      "ExpirationTime": "2020-06-01T14:50:16.581304556-04:00",
    46      "Features": [
    47        "Automated Upgrades",
    48        "Enhanced Read Scalability",
    49        "Redundancy Zones",
    50        "Namespaces",
    51        "Resource Quotas",
    52        "Preemption",
    53        "Audit Logging",
    54        "Setinel Policies"
    55      ],
    56      "Flags": {
    57        "modules": ["governance-policy"]
    58      },
    59      "InstallationID": "*",
    60      "IssueTime": "2020-06-01T08:50:16.581304556-04:00",
    61      "LicenseID": "temporary-license",
    62      "Modules": ["governance-policy"],
    63      "Product": "nomad",
    64      "StartTime": "2020-06-01T08:50:16.581304556-04:00",
    65      "TerminationTime": "2020-06-01T14:50:16.581304556-04:00"
    66    },
    67    "RequestTime": 0
    68  }
    69  ```
    70  
    71  ## Updating the Nomad Enterprise License
    72  
    73  This endpoint updates the Nomad license.
    74  
    75  | Method | Path                   | Produces           |
    76  | ------ | ---------------------- | ------------------ |
    77  | `PUT`  | `/v1/operator/license` | `application/json` |
    78  
    79  The table below shows this endpoint's support for
    80  [blocking queries](/api-docs#blocking-queries) and
    81  [required ACLs](/api-docs#acls).
    82  
    83  | Blocking Queries | ACL Required     |
    84  | ---------------- | ---------------- |
    85  | `NO`             | `operator:write` |
    86  
    87  ### Sample Payload
    88  
    89  The payload is the raw license blob.
    90  
    91  ### Sample Request
    92  
    93  ```shell-session
    94  $ curl \
    95      --request PUT \
    96      --data @nomad.license \
    97      https://localhost:4646/v1/operator/license
    98  ```
    99  
   100  ### Sample Response
   101  
   102  ```json
   103  {
   104    "Index": 15
   105  }
   106  ```