7 years ago
Create Dynamic group by Script
Hi Members
I am trying to create 'Device Dynamic Groups' with Python script. but I am failing. Could you pleas me what I am missing:
Conditions of the groups name: If Device display nam...
On 4/8/2018 at 11:22 PM, Tanvir said:data = '{"name":"test111","parentId":111,"appliesTo":"startsWith("system.displayname","Prod")"}'
Your payload in the data variable is not valid JSON. So here you'll want to escape certain special/reserved characters which would otherwise render your JSON invalid. In this example, this would include the double-quotes, so it should look like this---
data = '{"name":"test111","parentId":111,"appliesTo":"startsWith(\"system.displayname\",\"Prod\")"}'
Using a JSON validator like https://jsonformatter.curiousconcept.com/ will probably help.