Enterprise Recon v1 API

Global Filters

Use this set of APIs to retrieve information on, update or delete global filters.

List Global Filters

Retrieve details for all or for a specific global filter.

Request

GET

https://er-master:8339/v1/filters/{filter_id}

Authorization

Basic Authentication

Path Parameters

Parameter Data Type Description
filter_id

string

Specify ID of the global filter to retrieve data for. If no value is specified, response returns data for all global filters. filter_id is the id response item from the /v1/filters endpoint.

Query Parameters

Parameter Data Type Description
type

string

enum: locations matches test_data

Define this parameter to return results for specific filter types.
offset

integer

default: 0

The first global filter to return data for. For offset=N, data will be fetched starting from the Nth global filter. If no value is specified or offset=0, query will return data from the very first global filter.
limit

integer

default: 1000

max: 100000

Maximum number of global filters to return data for, starting from the first record determined by the offset parameter value.

Header Parameters

Parameter Data Type Description
Accept-Encoding

string

enum: gzip deflate

Specify the compression algorithm to use on the response object.
Compressed content will not be returned for endpoints that return reports as files (e.g. PDF, CSV etc), endpoints that return binary files (e.g. Node Agent installers) or unsuccessful API calls.

Request Samples

HTTP
GET /v1/filters
Accept: application/json
cURL
curl --request GET 'https://er-master:8339/v1/filters' \
--user apiuser:password123 \
--header "Accept: application/json"

Response Schema

200 OK
Response Item Data Type Description
id

string

Unique ID identifying the global filter.
apply_to

string

Group or Target ID that the filter is applied to. Only returned if filter is applied to a specific Target or Group.
type

string

enum: exclude_prefix exclude_suffix exclude_expression include_date_range include_recent exclude_max_size ignore_match ignore_prefix ignore_expression test_match test_prefix test_expression

Filter type.
expression

string

Full custom expression. Only returned for the following filters:
exclude_prefix, exclude_suffix, exclude_expression, ignore_match, ignore_prefix, ignore_expression, test_match, test_prefix, test_expression.
from_date

string <YYYY-MM-DD>

Scan files that were created or modified within a date range. This is the start date for the date range. Only returned for the include_date_range filter.
to_date

string <YYYY-MM-DD>

Scan files that were created or modified within a date range. This is the end date for the date range. Only returned for the include_date_range filter.
days

integer

min: 1

max: 99

Scan files that have been created or modified within the specified number of days. Only returned for include_recent filter.
size

integer <MB>

Exclude locations greater than a specified file size (MB). Only returned for exclude_max_size filter.

Response Samples

200 OK
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: xxx
[
  {
    "id": "2011111590957770404",
    "apply_to": "16145931871908943813",
    "type": "exclude_suffix",
    "expression": ".dll, .exe"
  },
  {
    "id": "2011111590957770405",
    "apply_to": "16145931871908944000",
    "type": "include_date_range",
    "from_date": "2018-03-01",
    "to_date": "2018-04-30"
  },
  {
    "id": "2011111590957770406",
    "type": "include_recent",
    "days": 30
  }
]

Update a Global Filter

Update the settings for a specific global filter.

Request

PUT

https://er-master:8339/v1/filters/<filter_id>

Authorization

Basic Authentication

Path Parameters

Parameter Data Type Description
filter_id

string

Specify ID of the global filter to update. filter_id is the id response item from the /v1/filters endpoint.

Request Schema

Parameter Data Type Description
apply_to

string

Group or Target ID that the filter is applied to. If no Group or Target ID is provided, the filter will be a global filter that applies to all Groups and Targets.
type

string

enum: exclude_prefix exclude_suffix exclude_expression include_date_range include_recent exclude_max_size ignore_match ignore_prefix ignore_expression test_match test_prefix test_expression

Filter type.
expression

string

Full custom expression. Only required for the following filters:
exclude_prefix, exclude_suffix, exclude_expression, ignore_match, ignore_prefix, ignore_expression, test_match, test_prefix, test_expression.
from_date

string <YYYY-MM-DD>

Scan files that were created or modified within a date range. This is the start date for the date range. Only required for the include_date_range filter.
to_date

string <YYYY-MM-DD>

Scan files that were created or modified within a date range. This is the end date for the date range. Only required for the include_date_range filter.
days

integer

min: 1

max: 99

Scan files that have been created or modified within the specified number of days. Only required for include_recent filter.
size

integer <MB>

Exclude locations greater than a specified file size (MB). Only required for exclude_max_size filter.

Request Samples

HTTP
PUT /v1/filters/2011111590957770404
Content-Type: application/json
[
  {
    "apply_to": "16145931871908943813",
    "type": "exclude_suffix",
    "expression": ".dll | .exe"
    }
]
cURL
curl --request PUT 'https://er-master:8339/v1/filters/2011111590957770404' \
--user apiuser:password123 \
--header "Content-Type: application/json" \
--data-raw '[
  {
    "apply_to": "16145931871908943813",
    "type": "exclude_suffix",
    "expression": ".dll | .exe"
    }
]'

Response Samples

204 No Content
422 Unprocessable Entity

Returned if the request body contains invalid values or formats in the input fields.

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
Content-Length: xxx
{
  "message": "Invalid input for '{fieldname}'."
}  

Delete a Global Filter

Delete a specific global filter.

Request

DELETE

https://er-master:8339/v1/filters/<filter_id>

Authorization

Basic Authentication

Path Parameters

Parameter Data Type Description
filter_id

string

Specify ID of the global filter to delete. filter_id is the id response item from the /v1/filters endpoint.

Request Samples

HTTP
DELETE /v1/filters/2011111590957770404
cURL
curl --request DELETE 'https://er-master:8339/v1/filters/2011111590957770404' \
--user apiuser:password123 

Response Samples

204 No Content

Create a Global Filter

Create or add a new global filter.

Request

POST

https://er-master:8339/v1/filters

Authorization

Basic Authentication

Request Schema

Parameter Data Type Description
apply_to

string

Group or Target ID that the filter is applied to.
type

string

enum: exclude_prefix exclude_suffix exclude_expression include_date_range include_recent exclude_max_size ignore_match ignore_prefix ignore_expression test_match test_prefix test_expression

Filter type.
expression

string

Full custom expression. Only required for the following filters:
exclude_prefix, exclude_suffix, exclude_expression, ignore_match, ignore_prefix, ignore_expression, test_match, test_prefix, test_expression.
from_date

string <YYYY-MM-DD>

Scan files that were created or modified within a date range. This is the start date for the date range. Only required for the include_date_range filter.
to_date

string <YYYY-MM-DD>

Scan files that were created or modified within a date range. This is the end date for the date range. Only required for the include_date_range filter.
days

integer

min: 1

max: 99

Scan files that have been created or modified within the specified number of days. Only required for include_recent filter.
size

integer <MB>

Exclude locations greater than a specified file size (MB). Only required for exclude_max_size filter.

Request Samples

HTTP
POST /v1/filters
Content-Type: application/json
[
  {
    "apply_to": "16145931871908943813",
    "type": "exclude_suffix",
    "expression": ".dll | .exe"
    }
]
cURL
curl --request POST 'https://er-master:8339/v1/filters' \
--user apiuser:password123 \
--header "Content-Type: application/json" \
--data-raw '[
  {
    "apply_to": "16145931871908943813",
    "type": "exclude_suffix",
    "expression": ".dll | .exe"
    }
]'

Response Schema

201 Created
Response Item Data Type Description
id

string

Filter ID assigned to the newly created global filter.

Response Samples

201 Created
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: xxx
{
  "id": "12345678901234567890"
}