Examples
Single element expression
An expression that limits a string element called OsType to a value of Windows.
Json for a single element expression
{
"Attribute": "OsType",
"Operator": "==",
"Value": "Windows"
}Multi element expression
An expression tree consisting of three expression objects.
The first limits a string element called OsType to a value of Windows
The second limits an integer element called OsVer to a value of 7
The third one limits a string element called DeviceType to a value of Desktop.
Json for a multi element expression
{
"Operator": "AND",
"Operands": [
{
"Attribute": "OsType",
"Operator": "==",
"Value": "Windows"
},
{
"Attribute": "OsVer",
"Operator": "==",
"Value": "7"
},
{
"Attribute": "DeviceType",
"Operator": "==",
"Value": "Desktop"
}
]
}Multi level expression
An expression tree with multiple levels.
This expression can be used to find computers running Windows OS and are either a desktop or laptop.
The outer level of this tree has two elements - the first limits the OsType to Windows, the other contains the inner expression, which itself limits DeviceType to either desktop or laptop.
JSON for multi level expression
{
"Operator": "AND",
"Operands": [
{
"Attribute": "OsType",
"Operator": "==",
"Value": "Windows"
},
{
"Operator": "OR",
"Operands": [{
"Attribute": "DeviceType",
"Operator": "==",
"Value": "Laptop"
},
{
"Attribute": "DeviceType",
"Operator": "==",
"Value": "Desktop"
}]
}]
}Negating an expression
Negating an expression.
To get only devices which are not Windows desktops you can write an expression selecting Windows desktops and then negate it.
{
"Operator": "NOT",
"Operands": [{
"Operator": "AND",
"Operands": [{
"Attribute": "OsType",
"Operator": "==",
"Value": "Windows"
},
{
"Attribute": "DeviceType",
"Operator": "==",
"Value": "Desktop"
}]
}]
}