Resource URL: /platform/<<version=1>>/statistics/history

    Overview: This resource allows querying of OneFS time-series statistics
              over custom time ranges. Not all statistics will have time-series
              enabled, and for those statistics with time-series enabled, the
              full extent of the requested time range may not be available due
              to configuration or system uptime. For a list of available
              statistics keys with descriptions, see the /1/statistics/keys or
              /1/statistics/keys/<KEY> resources. These resources also describe
              available history policies for each key. Warning: it is possible
              to request intervals and begin/end ranges that will exceed
              available memory.

     Methods: GET

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

Method GET: Retrieve stats.

       URL: GET /platform/<<version=1>>/statistics/history

Query arguments:
          begin=<integer> Earliest time (Unix epoch seconds) of interest.
                          Negative times are interpreted as relative (before)
                          now.
       interval=<integer> Minimum sampling interval time in seconds. If native
                          statistics are higher resolution, data will be
                          down-sampled.
            end=<integer> Latest time (Unix epoch seconds) of interest.
                          Negative times are interpreted as relative (before)
                          now. If not supplied, use now as the end time.
        timeout=<integer> Time in seconds to wait for results from remote nodes.
    memory_only=<boolean> Only use statistics sources that reside in memory
                          (faster, but with less retention).
            keys=<string> Multiple key names. May request matching keys or
                          request 'all' keys. Can be comma separated list or
                          can be used more than one time to make queries for
                          multiple keys. May be used in conjunction with
                          'substr'. Also works with 'key' arguments.
           devid=<string> Node devid to query. Either an <integer> or "all".
                          Can be used more than one time to query multiple
                          nodes. "all" queries all up nodes. 0 means query the
                          local node. For "cluster" scoped keys, in any devid
                          including 0 can be used.
         substr=<boolean> Used in conjunction with the 'keys' argument, alters
                          the behavior of keys. Makes the 'keys' arg perform a
                          partial match. Defaults to false.
             key=<string> One key name. Can be used more than one time to query
                          multiple keys. Also works with 'keys' arguments.
       degraded=<boolean> If true, try to continue even if some stats are
                          unavailable. In this case, errors will be present in
                          the per-key returned data.
     resolution=<integer> Synonymous with 'interval', if supplied supersedes
                          interval.
expand_clientid=<boolean> If true, use name resolution to expand client
                          addresses and other IDs.

GET response body schema:
{
  "type": "object", 
  "properties": {
    "stats": {
      "items": {
        "type": "object", 
        "properties": {
          "values": {
            "items": {
              "type": "object", 
              "properties": {
                "value": {
                  "required": true, 
                  "type": "any", 
                  "description": "Key dependent value."
                }, 
                "time": {
                  "required": true, 
                  "type": "integer", 
                  "description": "Unix Epoch time in seconds that statistic was collected."
                }
              }
            }, 
            "required": true, 
            "type": [
              "null", 
              "array"
            ], 
            "description": "Time-series values."
          }, 
          "devid": {
            "required": true, 
            "type": "integer", 
            "description": "Devid of node of statistic or 0 for cluster scoped statistics."
          }, 
          "error_code": {
            "required": true, 
            "type": [
              "null", 
              "integer"
            ], 
            "description": "Key specific error number, if applicable."
          }, 
          "key": {
            "required": true, 
            "type": "string", 
            "description": "Key name of statistic."
          }, 
          "error": {
            "required": true, 
            "type": [
              "null", 
              "string"
            ], 
            "description": "Key specific error string, if applicable."
          }
        }
      }, 
      "type": "array"
    }
  }
}
