filefilter create

Creates a filter to disallow the specified file type.

Syntax

CLI
/opt/mapr/bin/maprcli filefilter create
         -name name
         [ -description description ]
         -fileextensions extension
REST
Request Type POST
Request URL
http[s]://<host:port>/rest/filefilter/create?<parameters>

Parameters

Parameter Description
name The name of the filter to create.
description An optional description.
fileextensions Comma separated list of extensions to block. For example, exe,bat blocks exe and bat files from being created and stored.
NOTE The extensions are NOT case sensitive. Setting the extension to exe blocks file1.exe but does not block file1.EXE.

Example

Create a filter named noexebat to disallow exe and bat files:

CLI
/opt/mapr/bin/maprcli filefilter create -name noexebat -description No EXE and BAT files \ 
                      -fileextensions exe,bat -json
{
        "timestamp":1609740883440,
        "timeofday":"2021-01-03 10:14:43.440 GMT-0800 PM",
        "status":"OK",
        "total":0,
        "data":[

        ],
        "messages":[
                "Filter Created successfully"
        ]
}
REST
curl -k -X POST 'https://abc.sj.us:8443/rest/filefilter/create?name=noexebat&description=No%20EXE%20and%20BAT%20files&fileextensions=exe,bat' --user mapr:mapr
{"timestamp":1609743797218,"timeofday":"2021-01-03 11:03:17.218 GMT-0800 PM","status":"OK","total":0,"data":[],"messages":["Filter Created successfully"]}