Software Secure Workload
Activity Configure

Create an Exclusion Filter

This endpoint is used to create a new exclusion filter.

POST /openapi/v1/applications/{application_id}/exclusion_filters

Parameters: The request URL contains the following parameters

Name

Type

Description

application_id

string

The unique identifier for the workspace.

The JSON request body contains the following keys

Attribute

Type

Description

version

string

The version of the workspace to which the exclusion filter belongs.

consumer_filter_id

string

(optional) ID of a defined filter. Currently, any cluster belonging to the workspace, user defined filter or scope can be used as the consumer of a policy.

provider_filter_id

string

(optional) ID of a defined filter. Currently, any cluster belonging to the workspace, user defined filter or scope can be used as the provider of a policy.

proto

integer

(optional) Protocol Integer value (NULL means all protocols).

start_port

integer

(optional) Start port of the range.

end_port

integer

(optional) End port of the range.

Missing optional parameters will be considered as wildcards (match any).

Response object: Returns the created exclusion filter object.

Sample python code


  provider_filter_id = '<provider-filter-id>'
  consumer_filter_id = '<consumer-filter-id>'
  payload = {'version': 'v0',
             'consumer_filter_id': consumer_filter_id,
             'provider_filter_id': provider_filter_id,
             'proto': 6,
             'start_port': 800,
             'end_port': 1000}
  application_id = '<application-id>'
  restclient.post('/applications/%s/exclusion_filters' % application_id,
                  json_body=json.dumps(payload))