Syntax to create a preset with two tags

George Chelidze george.chelidze at magticom.ge
Wed Jun 20 16:50:32 EDT 2018


Hi Miguel,


A quick preset created from GUI and retrieved directly from mongodb:


{
    "_id" : "tmp",
    "channel" : "",
    "weight" : 0,
    "precondition" :
"{\"InternetGatewayDevice.DeviceInfo.SerialNumber\":\"123\",\"$and\":[{\"_tags\":\"a\"},{\"_tags\":\"b\"}]}",
    "configurations" : [
        {
            "type" : "add_tag",
            "tag" : "c"
        }
    ],
    "schedule" : "",
    "events" : {}
}


Hope this will give you an idea how it should look like.

Best regards,

George Chelidze

On 06/20/2018 11:46 PM, Miguel Angel Bérniz wrote:
> Hi,
>
> Does anyone know how to create a preset with two tags. I cant find the
> right syntax.
>
> For example
>
> curl -i
> 'http://172.16.2.56:7557/presets/646EEA-G69_10-ISKT47845E90-DATA' -vX
> DELETE
> curl -i
> 'http://172.16.2.56:7557/presets/646EEA-G69_10-ISKT47845E90-DATA' -vX
> PUT --data '{ "weight":1, "precondition":
> "{\"summary.serialNumber\":\"ISKT47845E90\",
> \"_tags\":{\"BRIDGE\":\"BRIDGE2\"}}", "configurations": [{ "type":
> "value", "name":
> "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Enable",
> "value": "false" }] }'
>
> This only creates the second one.
>
> I have tried several combinations with no luck.
>
> Thanks in advance,
>
> Miguel
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20180621/39b57070/attachment.html>


More information about the Users mailing list