Resource URL: /platform/<<version=3>>/snapshot/schedules

    Overview: This resource applies the standard collection pattern to OneFS
              snapshot schedules.

     Methods: GET, POST, DELETE

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

Method GET: List all or matching schedules.

       URL: GET /platform/<<version=3>>/snapshot/schedules

Query arguments:
  sort=<string> The field that will be used for sorting.  Choices are id, name,
                path, pattern, schedule, duration, alias, next_run, and
                next_snapshot.  Default is id.
limit=<integer> Return no more than this many results at once (see resume).
     dir=<enum> Where <enum> is one of ASC, DESC.  The direction of the sort.
resume=<string> Continue returning results from previous call using this token
                (token should come from the previous call, resume cannot be
                used with other options).

GET response body schema:
{
  "type": "object", 
  "properties": {
    "schedules": {
      "items": {
        "type": "object", 
        "properties": {
          "next_run": {
            "type": "integer", 
            "description": "Unix Epoch time of next snapshot to be created."
          }, 
          "name": {
            "type": "string", 
            "description": "The schedule name."
          }, 
          "schedule": {
            "type": "string", 
            "description": "The isidate compatible natural language description of the schedule."
          }, 
          "pattern": {
            "type": "string", 
            "description": "Pattern expanded with strftime to create snapshot names."
          }, 
          "alias": {
            "type": [
              "string", 
              "null"
            ], 
            "description": "Alias name to create for each snapshot."
          }, 
          "duration": {
            "type": [
              "integer", 
              "null"
            ], 
            "description": "Time in seconds added to creation time to construction expiration time."
          }, 
          "path": {
            "type": "string", 
            "description": "The /ifs path snapshotted."
          }, 
          "id": {
            "type": "integer", 
            "description": "The system ID given to the schedule."
          }, 
          "next_snapshot": {
            "type": "string", 
            "description": "Formatted name (see pattern) of next snapshot to be created."
          }
        }
      }, 
      "type": "array"
    }, 
    "total": {
      "type": "integer", 
      "description": "Total number of items available."
    }, 
    "resume": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Resume token value to use in subsequent calls for continuation."
    }
  }
}

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

Method POST: Create a new schedule.

        URL: POST /platform/<<version=3>>/snapshot/schedules

There are no query arguments for this method.

Required POST request body fields:
name, schedule, pattern, path

POST request body schema:
{
  "type": "object", 
  "properties": {
    "name": {
      "required": true, 
      "type": "string", 
      "description": "The schedule name."
    }, 
    "schedule": {
      "required": true, 
      "type": "string", 
      "description": "The isidate compatible natural language description of the schedule."
    }, 
    "pattern": {
      "required": true, 
      "type": "string", 
      "description": "Pattern expanded with strftime to create snapshot names."
    }, 
    "alias": {
      "required": false, 
      "type": [
        "null", 
        "string"
      ], 
      "description": "Alias name to create for each snapshot."
    }, 
    "duration": {
      "minimum": 0, 
      "type": [
        "null", 
        "integer"
      ], 
      "description": "Time in seconds added to creation time to construction expiration time.", 
      "required": false
    }, 
    "path": {
      "required": true, 
      "type": "string", 
      "description": "The /ifs path snapshotted."
    }
  }
}

POST response body schema:
{
  "type": "object", 
  "properties": {
    "id": {
      "required": true, 
      "type": "integer", 
      "description": "The ID of the newly created snapshot schedule."
    }
  }
}

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

Method DELETE: Delete all snapshot schedules.

          URL: DELETE /platform/<<version=3>>/snapshot/schedules

There are no query arguments for this method.

There is no response body for this method.
