Put entries into object tables from command line?

Sep 17, 2020
316
21
38
Hello,

I was able to pull records from an object in the DB with command like
pmgsh get /config/ruledb/who/49/objects

Is there a way to put entries into an object via the command line?
I looked through what I could find documentation wise, but didn't find anything.

Thanks
 
yes, its a bit complicated

you look the id and otype from the object

pmgsh get /config/ruledb/who/{ogroup}/objects

here comes the 'problematic' part, there is a mapping of 'otype' to type (e.g. 1001 is 'regex'). sadly this is not completely documented...

then you use that type to generate a new api path

pmgsh get /config/ruledb/who/{group}/regex/{id}

here you can use also set or help

e.g.

pmgsh help --verbose /config/ruledb/who/{group}/regex/{id}
 
So lets say I get the objects using something like
pmgsh get /config/ruledb/who/49/objects

How can I push that to what objects?
(trying to avoid copy and pasting 40 rules, and I can write a script to potentially add to multiple object types.)

Thanks!!