Resource URL: /platform/<<version=3>>/protocols/ndmp/sessions

    Overview: This resource applies the standard collection pattern to OneFS
              ndmp sessions.

     Methods: GET

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

Method GET: List all ndmp sessions.

       URL: GET /platform/<<version=3>>/protocols/ndmp/sessions

Query arguments:
        node=<string> Only return sessions of the node.
consolidate=<boolean> Combine sessions in the same context.
     session=<string> Only return the specified session.
      limit=<integer> Return no more than this many results at once (see
                      resume).
      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": [
    {
      "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": {
        "total": {
          "minimum": 0, 
          "type": "integer", 
          "description": "Total number of items available.", 
          "maximum": 4294967295
        }, 
        "sessions": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "description": "Describes various attributes of a backup session", 
            "properties": {
              "tape_device": {
                "required": true, 
                "type": "string", 
                "description": "Name of the tape device used if any"
              }, 
              "mover_bytes_transferred": {
                "required": true, 
                "type": "integer", 
                "description": "Bytes transferred to/from tape or remote writer"
              }, 
              "source_path": {
                "required": true, 
                "type": "string", 
                "description": "The path being backed up"
              }, 
              "start_time": {
                "required": true, 
                "type": "integer", 
                "description": "Time backup was started in seconds since epoch"
              }, 
              "scsi_device": {
                "required": true, 
                "type": "string", 
                "description": "Name of the media changer device used if any"
              }, 
              "data_bytes_transferred": {
                "required": true, 
                "type": "integer", 
                "description": "Bytes transferred to/from the filesystem"
              }, 
              "elapsed_time": {
                "required": true, 
                "type": "integer", 
                "description": "Number of seconds elapsed since the backup was started"
              }, 
              "mover_state": {
                "enum": [
                  "IDLE", 
                  "LISTEN", 
                  "ACTIVE", 
                  "PAUSED", 
                  "HALTED", 
                  "INVALID"
                ], 
                "type": "string", 
                "description": "State of the NDMP Mover Service", 
                "required": true
              }, 
              "session": {
                "required": true, 
                "type": "string", 
                "description": "Session ID in form <lnn>.<pid>."
              }, 
              "throughput": {
                "required": true, 
                "type": "integer", 
                "description": "The throughput in MB/s"
              }, 
              "tape_open_mode": {
                "enum": [
                  "Read", 
                  "Read/Write", 
                  "Raw", 
                  "Invalid"
                ], 
                "type": "string", 
                "description": "Describes the mode in which the tape is opened", 
                "required": true
              }, 
              "dest_path": {
                "required": true, 
                "type": "string", 
                "description": "The path being recovered to"
              }, 
              "data_state": {
                "enum": [
                  "IDLE", 
                  "LISTEN", 
                  "ACTIVE", 
                  "CONNECTED", 
                  "HALTED", 
                  "INVALID"
                ], 
                "type": "string", 
                "description": "State of the NDMP Data Service", 
                "required": true
              }, 
              "operation": {
                "enum": [
                  "None", 
                  "Backup", 
                  "Recover", 
                  "Recover file history"
                ], 
                "type": "string", 
                "description": "The type of backup session", 
                "required": true
              }, 
              "dma_ip_addr": {
                "required": true, 
                "type": "string", 
                "description": "IP address of the DMA"
              }, 
              "id": {
                "required": true, 
                "type": "string", 
                "description": "Unique display ID."
              }, 
              "remote_ip_addr": {
                "required": true, 
                "type": "string", 
                "description": "IP address of the remote NDMP participant"
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }, 
        "resume": {
          "minLength": 0, 
          "type": [
            "string", 
            "null"
          ], 
          "description": "Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options)."
        }
      }
    }
  ]
}
