Summary:
Return details of, modify, or delete a specified content filter. Note, from Entuity v21.0 upwards, you can manage content filters within config sets (see Config Sets - Content Filters). This 'Domain (Content) Filter Details' call will only apply to managing filters on servers that are not part of a config set.
URL:
http(s)://{server hostname}/api/domainFilters/{filterId}
Methods summary
- GET Method - shows detailed information about the filter.
- PUT Method - modifies the parameters of the filter.
- DELETE Method - deletes the filter.
GET Method detail
Shows detailed information about the selected domain (content) filter.
Response:
General parameters:
Name | Description |
---|---|
name |
domain filter name. |
systemFilter | whether the filter is a system filter. |
rules | array of rules defining a filter, as per Rule definition section below. |
Rule definitions - a single rule may contain at most one of the following parameters, the exception being that SRCTYPE has to be present in the rule definition:
Name | Description |
---|---|
SRCTYPE |
source type, one of the following (case-insensitive):
|
DEVTYPE | device type to which this filter refers. |
DEVNAME | name of an object (port, device, application etc). |
ZONENAME | name of a zone. |
IPLE | IP low-end, used for defining IP ranges. |
IPHE | IP high-end, used for defining IP ranges. |
MANAGEMENT_ONLY |
Management IP Only. |
Examples:
INPUT
curl -u admin:admin https://localhost/api/domainFilters/1002?media=json
OUTPUT
{
"name" : "A",
"systemFilter" : false,
"rules" : [ {
"SRCTYPE" : "DEVICE",
"DEVNAME" : "Two",
"ZONENAME" : "All"
} ]
}
INPUT
curl -u admin:admin https://localhost/api/domainFilters/1002?media=xml
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<domainFilterInfo systemFilter="false" name="A">
<rules>
<entries>
<key xsi:type="opCode" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">ZONENAME</key>
<value xsi:type="xs:string" xmlns:xs="https://www.w3.org/2001/XMLSchema" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">All</value>
</entries>
<entries>
<key xsi:type="opCode" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">DEVNAME</key>
<value xsi:type="xs:string" xmlns:xs="https://www.w3.org/2001/XMLSchema" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">Two</value>
</entries>
<entries>
<key xsi:type="opCode" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">SRCTYPE</key>
<value xsi:type="xs:string" xmlns:xs="https://www.w3.org/2001/XMLSchema" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">DEVICE</value>
</entries>
</rules>
</domainFilterInfo>
PUT Method detail
Modifies the selected domain filter.
Request:
Name | Description |
---|---|
name |
Filter name |
rules | The array of rules defining a filter, as per Rule Definition section above. |
Response:
The modified filter, as the detailed GET method would return it (see Rule Definition section above).
Examples:
INPUT
curl -u admin:admin https://localhost/api/domainFilters/1002?media=json -X PUT -H "content-type:application/json" -d \
'{
"name" : "B",
"rules" : [ {
"SRCTYPE" : "APPLICATION",
"DEVTYPE" : "158",
"ZONENAME" : "None"
} ]
}'
OUTPUT
{
"name" : "B",
"rules" : [ {
"SRCTYPE" : "APPLICATION",
"DEVTYPE" : "158",
"ZONENAME" : "None"
} ]
DELETE Method detail
Deletes the selected domain filter.
Request:
No additional parameters needed.
Response:
Gives the message “OK” if operation was successful. Otherwise, gives an error description.
Examples:
INPUT
curl -u admin:admin https://localhost/api/domainFilters/1002?media=json -X DELETE
OUTPUT
{
"message" : "OK"
}
INPUT
curl -u admin:admin https://localhost/api/domainFilters/1002?media=xml -X DELETE
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<statusInfo>
<message>OK</message>
</statusInfo>
Comments
0 comments
Please sign in to leave a comment.