Resource URL: /platform/<<version=3>>/protocols/smb/log-level/filters

    Overview: This resource applies the standard collection pattern to SMB log
              filters.

     Methods: GET, POST, DELETE

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

Method GET: Get the current SMB log filters.

       URL: GET /platform/<<version=3>>/protocols/smb/log-level/filters

Query arguments:
sort=<string> The field that will be used for sorting.
   dir=<enum> Where <enum> is one of ASC, DESC.  The direction of the sort.
 level=<enum> Where <enum> is one of always, error, warning, info, verbose,
              debug, trace.  Valid SMB logging levels

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": {
        "filters": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "properties": {
              "ip_addrs": {
                "items": {
                  "type": "string"
                }, 
                "type": "array", 
                "description": "Array of client IP addresses to filter against."
              }, 
              "ops": {
                "items": {
                  "enum": [
                    "read", 
                    "write", 
                    "session-setup", 
                    "logoff", 
                    "flush", 
                    "notify", 
                    "tree-connect", 
                    "tree-disconnect", 
                    "create", 
                    "delete", 
                    "oplock", 
                    "locking", 
                    "set-info", 
                    "query", 
                    "close", 
                    "create-directory", 
                    "delete-directory"
                  ], 
                  "type": "string", 
                  "description": "Valid SMB operations to log"
                }, 
                "type": "array", 
                "description": "Array of SMB operations to filter against."
              }, 
              "id": {
                "type": "integer", 
                "description": "Unique ID of the log filter."
              }, 
              "level": {
                "enum": [
                  "ALWAYS", 
                  "ERROR", 
                  "WARNING", 
                  "INFO", 
                  "VERBOSE", 
                  "DEBUG", 
                  "TRACE", 
                  "always", 
                  "error", 
                  "warning", 
                  "info", 
                  "verbose", 
                  "debug", 
                  "trace"
                ], 
                "type": "string", 
                "description": "Logging level of the filter.", 
                "required": true
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }
      }
    }
  ]
}

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

Method POST: Add an SMB log filter.

        URL: POST /platform/<<version=3>>/protocols/smb/log-level/filters

There are no query arguments for this method.

Required POST request body fields:
level

POST request body schema:
{
  "type": "object", 
  "properties": {
    "ip_addrs": {
      "items": {
        "type": "string"
      }, 
      "type": "array", 
      "description": "Array of client IP addresses to filter against."
    }, 
    "ops": {
      "items": {
        "enum": [
          "read", 
          "write", 
          "session-setup", 
          "logoff", 
          "flush", 
          "notify", 
          "tree-connect", 
          "tree-disconnect", 
          "create", 
          "delete", 
          "oplock", 
          "locking", 
          "set-info", 
          "query", 
          "close", 
          "create-directory", 
          "delete-directory"
        ], 
        "type": "string", 
        "description": "Valid SMB operations to log"
      }, 
      "type": "array", 
      "description": "Array of SMB operations to filter against."
    }, 
    "level": {
      "enum": [
        "always", 
        "error", 
        "warning", 
        "info", 
        "verbose", 
        "debug", 
        "trace"
      ], 
      "type": "string", 
      "description": "Logging level of the filter.", 
      "required": true
    }
  }
}

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": {
          "type": "integer", 
          "description": "Unique ID of the log filter."
        }
      }
    }
  ]
}

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

Method DELETE: Delete existing SMB log filters.

          URL: DELETE /platform/<<version=3>>/protocols/smb/log-level/filters

Query arguments:
level=<enum> Where <enum> is one of always, error, warning, info, verbose,
             debug, trace.  Valid SMB logging levels

There is no JSON response body for this method.
