Create an inventory filter
This endpoint is used to create an inventory filter.
POST /openapi/v1/filters/inventories
Parameters:
Name |
Type |
Description |
---|---|---|
name |
string |
User specified name of the application scope. |
query |
JSON |
Filter (or match criteria) associated with the filter. |
app_scope_id |
string |
ID of the scope associated with the filter. |
primary |
boolean |
When ‘true’ the filter is restricted to the ownership scope. |
public |
boolean |
When ‘true’ the filter provides a service for its scope. Must also be primary/scope restricted. |
Sample python code
req_payload = {
"app_scope_id": <app_scope_id>,
"name": "sensor_config_inventory_filter",
"query": {
"type": "eq",
"field": "ip",
"value": <sensor_interface_ip>
},
}
resp = restclient.post('/filters/inventories', json_body=json.dumps(req_payload))