Summary:
Lists the filter id, name and serverId information of available domain (content) filters. Note, from Entuity v21.0 upwards, you can manage content filters within config sets (see Config Sets - Content Filters). This 'Domain (Content) Filters' call will only apply to managing filters on servers that are not part of a config set.
URL:
http(s)://{server hostname}/api/domainFilters (example https://localhost/api/domainFilters?media=json)
Methods summary
- GET Method - lists available domain filters.
- POST Method - creates new domain filter.
GET Method detail
Lists available domain (content) filters.
Response:
Response includes a list of domain filters. Each domain filter has the following attributes:
Name | Description |
---|---|
id |
domain filter ID unique to the server. |
name | domain filter name. |
serverId | Entuity Server ID on which resource resides. |
Examples:
INPUT
curl -u admin:admin https://localhost/api/domainFilters?media=json
OUTPUT
{
"items" : [ {
"serverId" : "821c3e87-bcdf-4fef-a5e8-7d2524928d96",
"id" : "1",
"name" : "All Objects"
}, {
"serverId" : "821c3e87-bcdf-4fef-a5e8-7d2524928d96",
"id" : "2",
"name" : "Infrastructure Only"
} ],
"count" : 2
}
INPUT
curl -u admin:admin https://localhost/api/domainFilters?media=xml
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<items count="2">
<item xsi:type="namedItem" name="All Objects" id="1" serverId="821c3e87-bcdf-4fef-a5e8-7d2524928d96" />
<item xsi:type="namedItem" name="Infrastructure Only" serverId="821c3e87-bcdf-4fef-a5e8-7d2524928d96" />
</items>
POST Method detail
Creates a new domain filter.
Request:
Name | Description |
---|---|
name |
filter name. |
rules | the array of rules defining a filter. |
Response:
Name | Description |
---|---|
name |
filter name. |
systemFilter | whether the filter is a system filter. |
rules | The array of rules defining a filter. |
Examples:
INPUT
curl -u admin:admin https://localhost/api/domainFilters?media=json -X POST -H "content-type:application/json" -d \
'{
"name" : "A",
"rules" : [ {
"SRCTYPE" : "4",
"DEVNAME" : "Two",
"ZONENAME" : "None"
} ]
}'
OUTPUT
{
"name" : "A",
"systemFilter" : false,
"rules" : [ {
"SRCTYPE" : "4",
"DEVNAME" : "Two",
"ZONENAME" : "None"
} ]
}
INPUT
curl -u admin:admin https://localhost/api/domainFilters?media=xml -X POST -H "content-type:application/xml" -d \
'<domainFilterInfo systemFilter="false" name="B">
<rules>
<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">4</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">ZONENAME</key>
<value xsi:type="xs:string" xmlns:xs="https://www.w3.org/2001/XMLSchema" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">None</value>
</entries>
</rules>
</domainFilterInfo>'
OUTPUT<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<domainFilterInfo systemFilter="false" name="B">
<rules>
<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">4</value>
</entries>
</rules>
</domainFilterInfo>
Comments
0 comments
Please sign in to leave a comment.