Resource URL: /platform/<<version=5>>/license/licenses

    Overview: This resource provides a list of all OneFS licenses currently
              configured on this cluster.

     Methods: GET, POST

********************************************************************************

Method GET: Retrieve license information for all licensable products.

       URL: GET /platform/<<version=5>>/license/licenses

There are no query arguments for this method.

GET response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "activation_incomplete_alert": {
          "required": true, 
          "type": "boolean", 
          "description": "True when we are generating an activation incomplete alert. An activation incomplete alert is generated if we do not have a signed license file 90 days after OneFS is upgraded."
        }, 
        "swid": {
          "minLength": 1, 
          "type": "string", 
          "pattern": ".+", 
          "description": "Software license identifier. SWID will be absent if not yet obtained from a license file.", 
          "maxLength": 50
        }, 
        "evaluatable": {
          "minItems": 0, 
          "items": {
            "minLength": 1, 
            "type": "string", 
            "pattern": ".+", 
            "description": "Name of the licensed features that can be evaluated", 
            "maxLength": 50
          }, 
          "required": true, 
          "type": "array", 
          "maxItems": 50
        }, 
        "base_only_licenses": {
          "minItems": 0, 
          "items": {
            "minLength": 1, 
            "type": "string", 
            "pattern": ".+", 
            "description": "Name of the licensed features that can are not tier related and apply to any node type.", 
            "maxLength": 50
          }, 
          "required": true, 
          "type": "array", 
          "maxItems": 50
        }, 
        "valid_signature": {
          "required": true, 
          "type": "boolean", 
          "description": "True if license file contains a valid signature."
        }, 
        "licenses": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "description": "Information about a OneFS Hardware or Software license.", 
            "properties": {
              "status": {
                "minLength": 0, 
                "enum": [
                  "Unlicensed", 
                  "Licensed", 
                  "Expired", 
                  "Evaluation", 
                  "Evaluation Expired"
                ], 
                "type": "string", 
                "description": "Current status of the license.", 
                "required": true
              }, 
              "tiers": {
                "description": "Tiered License details.", 
                "minItems": 0, 
                "items": {
                  "type": "object", 
                  "properties": {
                    "licensed_node_count": {
                      "minimum": 0, 
                      "type": "integer", 
                      "description": "Licensed number of nodes in this tier.", 
                      "maximum": 2147483647
                    }, 
                    "used_drive_capacity": {
                      "required": false, 
                      "minimum": 0, 
                      "type": "integer", 
                      "description": "Actual terabyte (TB, 10^12 bytes) drive capacity allocated as storage space associated with tier. Included if tier is not NONINF and license is not a base only license.", 
                      "maximum": 2147483647
                    }, 
                    "licensed_drive_capacity": {
                      "required": false, 
                      "minimum": 0, 
                      "type": "integer", 
                      "description": "Licensed terabyte (TB, 10^12 bytes) drive capacity allocated as storage associated with tier. Included if tier is not NONINF and license is not a base only license.", 
                      "maximum": 2147483647
                    }, 
                    "entitlements_exceeded_alerts": {
                      "description": "List of alerts about exceeded entitlements: The following alerts appear when usage of a resource such as a node, an encryption node, or storage capacity exceeds the quantity licensed for that resource.", 
                      "minItems": 0, 
                      "items": {
                        "type": "object", 
                        "properties": {
                          "current": {
                            "minimum": 0, 
                            "type": "integer", 
                            "description": "Current usage.", 
                            "maximum": 2147483647
                          }, 
                          "issue_type": {
                            "enum": [
                              "capacity", 
                              "node_count", 
                              "nodes_with_seds_count"
                            ], 
                            "type": "string", 
                            "description": "Alert type. The unit of measure for the current and licensed fields for capacity is terabytes. For nodes_with_seds_count, it is the number of nodes that have one or more self-encrypting drives.", 
                            "required": true
                          }, 
                          "licensed": {
                            "minimum": 0, 
                            "type": "integer", 
                            "description": "Licensed amount.", 
                            "maximum": 2147483647
                          }
                        }
                      }, 
                      "required": false, 
                      "maxItems": 2147483647, 
                      "type": "array"
                    }, 
                    "tier": {
                      "minLength": 1, 
                      "type": "string", 
                      "pattern": "^NONINF$|^NO_TIER$|^\\d+$", 
                      "description": "OneFS hardware tier. Tier is a number, NONINF, or NO_TIER. NONINF indicates a non infinity tier. NO_TIER indicates a license that is not tier based.", 
                      "maxLength": 50
                    }, 
                    "used_nodes_with_seds_count": {
                      "required": false, 
                      "minimum": 0, 
                      "type": "integer", 
                      "description": "Actual number of nodes of this tier that contain self-encrypting drives. Included only if license is ONEFS and if tier is not NONINF.", 
                      "maximum": 2147483647
                    }, 
                    "used_node_count": {
                      "minimum": 0, 
                      "type": "integer", 
                      "description": "Actual number of nodes in this tier.", 
                      "maximum": 2147483647
                    }, 
                    "licensed_nodes_with_seds_count": {
                      "required": false, 
                      "minimum": 0, 
                      "type": "integer", 
                      "description": "Licensed number of nodes of this tier that contain self-encrypting drives. Included only if license is ONEFS and tier is not NONINF.", 
                      "maximum": 2147483647
                    }
                  }
                }, 
                "required": true, 
                "maxItems": 4294967295, 
                "type": "array"
              }, 
              "expired_alert": {
                "required": true, 
                "type": "boolean", 
                "description": "True when we are generating an alert that this feature has expired."
              }, 
              "days_since_expiry": {
                "minimum": 0, 
                "type": "integer", 
                "description": "Number of days since a license expired.", 
                "maximum": 4294967295
              }, 
              "id": {
                "description": "Name of the licensed feature.", 
                "minLength": 1, 
                "required": true, 
                "pattern": ".+", 
                "maxLength": 50, 
                "type": "string"
              }, 
              "expiration": {
                "minLength": 10, 
                "type": "string", 
                "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\d$", 
                "description": "Date of license expiry. Format is YYYY-MM-DD. It is not included if there is no expiration. Feature is considered expired at end of this day. The cluster time is used to determine expiry.", 
                "maxLength": 10
              }, 
              "days_to_expiry": {
                "minimum": 0, 
                "type": "integer", 
                "description": "Number of days before a license expires.", 
                "maximum": 4294967295
              }, 
              "expiring_alert": {
                "required": true, 
                "type": "boolean", 
                "description": "True when we are generating an alert that this feature is expiring."
              }, 
              "name": {
                "description": "Name of the licensed feature.", 
                "minLength": 1, 
                "required": true, 
                "pattern": ".+", 
                "maxLength": 50, 
                "type": "string"
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }
      }
    }
  ]
}

********************************************************************************

Method POST: Install a new license file and/or activate evaluation licenses.

        URL: POST /platform/<<version=5>>/license/licenses

There are no query arguments for this method.

POST request body schema:
{
  "type": "object", 
  "properties": {
    "license_file_content": {
      "minLength": 1, 
      "type": "string", 
      "pattern": ".+", 
      "description": "License file string content. The license file is obtained from EMC's SLC web portal. Do not use with the license_file_path option.", 
      "maxLength": 2147483647
    }, 
    "evaluation": {
      "minItems": 0, 
      "items": {
        "minLength": 1, 
        "type": "string", 
        "pattern": ".+", 
        "maxLength": 50
      }, 
      "type": "array", 
      "description": "A list of evaluation licenses to enable on the cluster.", 
      "maxItems": 50
    }, 
    "license_file_path": {
      "minLength": 4, 
      "type": "string", 
      "pattern": "^\\/ifs", 
      "description": "Path to new license file, must be under /ifs. The license file is obtained from EMC's SLC web portal. Do not include the path when only enabling evaluation licenses. Do not use with the license_file_content option.", 
      "maxLength": 1024
    }
  }
}

POST response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "type": "object", 
      "properties": {}
    }
  ]
}
