Resource URL: /platform/<<version=1>>/storagepool/tiers

    Overview: This resource applies the standard collection pattern to OneFS
              storage pool tiers.

     Methods: GET, POST, DELETE

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

Method GET: List all tiers.

       URL: GET /platform/<<version=1>>/storagepool/tiers

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": {
        "tiers": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "properties": {
              "usage": {
                "required": true, 
                "type": "object", 
                "description": "Total pool usage.", 
                "properties": {
                  "used_hdd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Used bytes in the pool on HDD drives."
                  }, 
                  "avail_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Available free bytes remaining in the pool when virtual hot spare is taken into account."
                  }, 
                  "usable_ssd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool on SSD drives when virtual hot spare is taken into account."
                  }, 
                  "pct_used_hdd": {
                    "required": true, 
                    "type": "string", 
                    "description": "Percentage of usable space on HDD drives in the pool which is used."
                  }, 
                  "avail_hdd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Available free bytes remaining in the pool on HDD drives when virtual hot spare is taken into account."
                  }, 
                  "pct_used_ssd": {
                    "required": true, 
                    "type": "string", 
                    "description": "Percentage of usable space on SSD drives in the pool which is used."
                  }, 
                  "avail_ssd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Available free bytes remaining in the pool on SSD drives when virtual hot spare is taken into account."
                  }, 
                  "free_hdd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Free bytes remaining in the pool on HDD drives."
                  }, 
                  "virtual_hot_spare_bytes": {
                    "required": false, 
                    "type": "string"
                  }, 
                  "free_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Free bytes remaining in the pool."
                  }, 
                  "total_ssd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool on SSD drives."
                  }, 
                  "total_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool."
                  }, 
                  "pct_used": {
                    "required": true, 
                    "type": "string", 
                    "description": "Percentage of usable space in the pool which is used."
                  }, 
                  "balanced": {
                    "required": true, 
                    "type": "boolean", 
                    "description": "Whether or not the pool usage is currently balanced."
                  }, 
                  "used_bytes": {
                    "required": false, 
                    "type": "string", 
                    "description": "Used bytes in the pool."
                  }, 
                  "free_ssd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Free bytes remaining in the pool on SSD drives."
                  }, 
                  "usable_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool drives when virtual hot spare is taken into account."
                  }, 
                  "usable_hdd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool on HDD drives when virtual hot spare is taken into account."
                  }, 
                  "used_ssd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Used bytes in the pool on SSD drives."
                  }, 
                  "total_hdd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool on HDD drives."
                  }
                }
              }, 
              "lnns": {
                "items": {
                  "type": "integer"
                }, 
                "required": true, 
                "type": "array", 
                "description": "The nodes that are part of this tier."
              }, 
              "children": {
                "items": {
                  "type": [
                    "string", 
                    "integer"
                  ]
                }, 
                "required": false, 
                "type": "array", 
                "description": "The names or IDs of the tier's children."
              }, 
              "name": {
                "required": true, 
                "type": "string", 
                "description": "The tier name."
              }, 
              "id": {
                "required": true, 
                "type": "integer", 
                "description": "The system ID given to the tier."
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }, 
        "total": {
          "minimum": 0, 
          "type": "integer", 
          "description": "Total number of items available.", 
          "maximum": 4294967295
        }
      }
    }
  ]
}

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

Method POST: Create a new tier.

        URL: POST /platform/<<version=1>>/storagepool/tiers

There are no query arguments for this method.

Required POST request body fields:
name

POST request body schema:
{
  "type": "object", 
  "properties": {
    "children": {
      "items": {
        "type": [
          "string", 
          "integer"
        ]
      }, 
      "required": false, 
      "type": "array", 
      "description": "The names or IDs of the tier's children."
    }, 
    "name": {
      "required": true, 
      "type": "string", 
      "description": "The tier name."
    }
  }
}

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": {
        "id": {
          "required": true, 
          "type": "integer", 
          "description": "The system ID of the new object."
        }
      }
    }
  ]
}

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

Method DELETE: Delete all tiers.

          URL: DELETE /platform/<<version=1>>/storagepool/tiers

There are no query arguments for this method.

There is no JSON response body for this method.
