List event filters request

Prev Next

Lists configured and default event filters.

GET https://<cm_address>/wsapis/v2.0.0/config/network/eventfilter

Availability

This command is available on the following appliances:

  • Network Security

Required headers:

X-FeApi-Token: [API-Token]
X-FeClient-Token: [Client-Token]

Optional header:

Accept: application/json

Options

  • type<filter_type> or default. Optional. If the filter is not applied, configured filters for all the protocols will be returned.

Parameters

  • address—The IP address of the appliance running the Web Services API.

  • API-Token—This token authenticates the session. By default, the session times out after 15 minutes of inactivity.

  • Client-Token—(Optional) This client token is provided by Trellix. For more information about the client token, contact your sales representative.

Example request

GET https://<cm_address>/wsapis/v2.0.0/config/network/eventfilter?type=default

Request headers:

X-FeApi-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
X-FeClient-Token: BigDataInc

List event filters response

After the event request is received, your appliance validates the API-Token and returns the requested data.

HTTP/1.1 [Response Code] [Response Message]
Date: [Date]
Content-Type: application/json
X-FeApi-Token: [API-Token]
X-FeClient-Token: [Client-Token]
Response fields
  • Response Code—A standard HTML response code.

    • 200—Request successful.

    • 500—Request unsuccessful because the server encountered a problem.

  • Response Message—A standard HTML response message.

    • OK—Request successful.

    • Internal Server Error—Request unsuccessful because the server encountered a problem.

  • Date—Standard HTML date format.

Example response
HTTP/1.1 200 OK
Date: Fri, 23 Sep 2018 08:00:00 GMT

Body:

[
  {
    "filtername": "http",
    "field":"http:url",
    "op_type":"regex",
    "index":2,
    "value":"alexa.com"
  },
  {
    "filtername": "http",
    "field":"http:url",
    "op_type":"regex",
    "index":1,
    "value":"google.com"
  }
]

cURL code sample: list event filters

The following code sample can be copied and executed from any command-line interface that includes the cURL library. This sample builds on the authentication cURL code sample.

curl -X POST -qgsSk --header 'X-FeApi-Token: XXXXXXXXXXXXXX https://xxx.xxx.xxx.xxx/wsapis/v2.0.0/config/network/eventfilter?type=http

This cURL sample includes the following options:

  • -X 'POST'—This option specifies using the POST method.

  • -q—This option specifies that the curlrc configuration file will not be read or used. Although this is an optional setting, Trellix recommends that you include this option.

  • -g—This option turns off the URL globbing parser. Although this is an optional setting, Trellix recommends that you include this option.

  • -s—This option turns off the progress meter and error message. Although this is an optional setting, Trellix recommends that you include this option.

  • -S—When used with the -s option, this option shows error messages if your cURL switch fails. Although this is an optional setting, Trellix recommends that you include this option.

  • -k—This option explicitly allows cURL to perform insecure SSL connections and transfers. This allows you to test your SSL connection without installing a CA certificate.

  • --header "X-FeApi-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"—This custom header includes the API-Token that was returned by your appliance during the authentication request. In the authentication cURL code sample, this token was included in the auth.txt file. Replace the token in the sample with the token received in the response to your authentication request.

  • --header "Accept: application/json"—This header specifies that the serverʼs response body is expected to be in JSON format.

  • https://xxx.xxx.xxx.xxx/wsapis/v2.0.0/config/network/eventfilter?type=http—The event filter request URL. Replace the IP address xxx.xxx.xxx.xxx with the IP address of your appliance.

Results

This code sample lists http event filters.