<div dir="ltr">Hi everybody,<div>Fisrt, happy new year.</div><div><br></div><div>Then, i've succeeded to add a preset with the API.</div><div>Certainly i don't delete the "_id" field for my first try.</div><div><br></div><div>The right data : </div><div><span style="font-size:12.8px">{</span></div><div><span style="font-size:12.8px">  "weight" : 0, </span></div><div><span style="font-size:12.8px">  "precondition" : "</span><span style="font-size:12.8px">{\"summary.serialNumber\":\"</span><span style="font-size:12.8px">C2T7Sxxxxxxxx\",\"$and\":[{\"_</span><span style="font-size:12.8px">tags\":{\"$ne\":\"Adding Line\"}},{\"_tags\":\"</span><span style="font-size:12.8px">Provisioning\"}],\"summary.</span><span style="font-size:12.8px">lineEnable\":\"Enabled\"}", </span></div><div><span style="font-size:12.8px">  "configurations" : [</span></div><div><span style="font-size:12.8px">     { "type" : "value", "name" : "InternetGatewayDevice.</span><span style="font-size:12.8px">ManagementServer.</span><span style="font-size:12.8px">PeriodicInformInterval", "value" : "600" },</span></div><div><span style="font-size:12.8px">     { "type" : "value", "name" : "InternetGatewayDevice.</span><span style="font-size:12.8px">WANDevice.1.</span><span style="font-size:12.8px">WANConnectionDevice.1.</span><span style="font-size:12.8px">WANPPPConnection.1.Username", "value" : "login@radius" }, </span></div><div><span style="font-size:12.8px">     { "type" : "value", "name" : "InternetGatewayDevice.</span><span style="font-size:12.8px">WANDevice.1.</span><span style="font-size:12.8px">WANConnectionDevice.1.</span><span style="font-size:12.8px">WANPPPConnection.1.Password", "value" : "password@radius" },</span></div><div><span style="font-size:12.8px">     { "type" : "value", "name" : "InternetGatewayDevice.</span><span style="font-size:12.8px">Services.VoiceService.1.</span><span style="font-size:12.8px">VoiceProfile.1.Line.1.</span><span style="font-size:12.8px">DirectoryNumber", "value" : "Phone Number" },</span></div><div><span style="font-size:12.8px">     { "type" : "value", "name" : "InternetGatewayDevice.</span><span style="font-size:12.8px">Services.VoiceService.1.</span><span style="font-size:12.8px">VoiceProfile.1.Line.1.SIP.</span><span style="font-size:12.8px">AuthUserName", "value" : "SIP_Id" },</span></div><div><span style="font-size:12.8px">     { "type" : "value", "name" : "InternetGatewayDevice.</span><span style="font-size:12.8px">Services.VoiceService.1.</span><span style="font-size:12.8px">VoiceProfile.1.Line.1.SIP.</span><span style="font-size:12.8px">AuthPassword", "value" : "SIPPassword" },</span></div><div><span style="font-size:12.8px">     { "type" : "value", "name" : "InternetGatewayDevice.</span><span style="font-size:12.8px">Services.VoiceService.1.</span><span style="font-size:12.8px">VoiceProfile.1.Line.1.SIP.URI"</span><span style="font-size:12.8px">, "value" : "SIP:SIP_Id@RegistrarServerIP" },</span></div><div><span style="font-size:12.8px">     { "type" : "value", "name" : "InternetGatewayDevice.</span><span style="font-size:12.8px">ManagementServer.URL", "value" : "</span><a href="http://acs.url/" target="_blank" style="font-size:12.8px">http://acs.url</a><span style="font-size:12.8px">" }, { "type" : "delete_tag", "tag" : "Provisioning" } </span></div><div><span style="font-size:12.8px">  ]</span></div><div><span style="font-size:12.8px"> }</span></div><div><br></div><div>It works fine now.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-24 14:28 GMT+04:00 Nicolas Grondin <span dir="ltr"><<a href="mailto:grondin.nicolas@gmail.com" target="_blank">grondin.nicolas@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>I'm trying to create a preset inspired on data store in MongoDB.</div><div><br></div><div>For example : </div><div>{ "_id" : "BOX_ADSL", "weight" : 0, "precondition" : "{\"summary.serialNumber\":\"C2T7Sxxxxxxxx\",\"$and\":[{\"_tags\":{\"$ne\":\"Adding Line\"}},{\"_tags\":\"Provisioning\"}],\"summary.lineEnable\":\"Enabled\"}", "configurations" : [ { "type" : "value", "name" : "InternetGatewayDevice.ManagementServer.PeriodicInformInterval", "value" : "600" }, { "type" : "value", "name" : "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username", "value" : "login@radius" }, { "type" : "value", "name" : "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password", "value" : "password@radius" }, { "type" : "value", "name" : "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.1.Line.1.DirectoryNumber", "value" : "Phone Number" }, { "type" : "value", "name" : "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.1.Line.1.SIP.AuthUserName", "value" : "SIP_Id" }, { "type" : "value", "name" : "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.1.Line.1.SIP.AuthPassword", "value" : "SIPPassword" }, { "type" : "value", "name" : "InternetGatewayDevice.Services.VoiceService.1.VoiceProfile.1.Line.1.SIP.URI", "value" : "SIP:SIP_Id@RegistrarServerIP" }, { "type" : "value", "name" : "InternetGatewayDevice.ManagementServer.URL", "value" : "<a href="http://acs.url" target="_blank">http://acs.url</a>" }, { "type" : "delete_tag", "tag" : "Provisioning" } ] }<br></div><div><br></div><div>What looks like the API's URL ?</div><div><br></div><div>Thanks for helping.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Nicolas </div><div><br></div></font></span></div>
</blockquote></div><br></div>