# Return email filter's information

This function retrieves an email filter's information.

Important:

When you disable the Receive Mail role, the system disables this function.

Endpoint: GET /Email/get_filter
Version: 11.138.0.10
Security: BasicAuth

## Query parameters:

  - `account` (string, required)
    The email address that owns the filter.
    Example: "user@example.com"

  - `filtername` (string, required)
    The filter's name.
    Example: "coffee"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "get_filter"

  - `module` (string)
    The name of the module called.
    Example: "Email"

  - `result` (object)

  - `result.data` (object)

  - `result.data.actions` (array)
    An array of objects that contains the filter's actions.

  - `result.data.actions.action` (string)
    The filter's action.
* deliver -  The filter sends mail to the destination address.
* fail -  The filter forces a delivery failure.
* finish -  The filter stops message processing.
* save -  The filter saves mail to the destination file.
* pipe -  The filter sends mail to the destination application.
    Enum: "deliver", "fail", "finish", "save", "pipe"

  - `result.data.actions.dest` (any)
    The destination to which the filter sends mail.

A destination can be one of the following.
* A file path.
* An application path.
* A valid email address.

  - `result.data.actions.number` (integer)
    The filter's position in the order of the account's filters.
    Example: 1

  - `result.data.filtername` (string)
    The filter's name.
    Example: "coffee"

  - `result.data.metadata` (object)

  - `result.data.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.data.rules` (array)
    An array of objects that contains the filter's rules.

  - `result.data.rules.match` (string)
    The filter's match type.

* is
* matches
* contains
* does not contain
* begins
* does not begin
* ends
* does not end
* does not match
* is above
* is not above
* is below
* is not below
    Enum: "is", "matches", "contains", "does not contain", "begins", "does not begin", "ends", "does not end", "does not match", "is above", "is not above", "is below", "is not below"

  - `result.data.rules.number` (integer)
    The filter's position in the order of the account's filters.
    Example: 1

  - `result.data.rules.opt` (string)
    The connection between multiple conditions.
* and -  Match both conditions.
* or -  Match either condition.
* null -  There is only one condition.
    Enum: "and", "or", "null"

  - `result.data.rules.part` (string)
    The queried email section.
* $header_from: -  Matches against the From: section.
* $header_subject: -  Matches against the Subject: section.
* $header_to: -  Matches against the To: section.
* $reply_address: -  Matches against the Reply To: section.
* $message_body -  Matches against the message's body.
* $message_headers -  Matches against the message's headers.
* foranyaddress $h_to:,$h_cc:,$h_bcc: -  Matches against all message recipients.
* not delivered -  Matches if the message is not queued for delivery.
* error_message -  Matches if the incoming message bounced.
    Enum: "$header_from:", "$header_subject:", "$header_to:", "$reply_address:", "$message_body", "$message_headers", "foranyaddress $h_to:,$h_cc:,$h_bcc:", "not delivered", "error_message"

  - `result.data.rules.val` (string)
    The matched value.
    Example: "coconut"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


