API Presets: URL for a preset with complex preconditions

Nicolas Grondin grondin.nicolas at gmail.com
Tue Jan 5 04:10:17 EST 2016


Hi everybody,
Fisrt, happy new year.

Then, i've succeeded to add a preset with the API.
Certainly i don't delete the "_id" field for my first try.

The right data :
{
  "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 at radius"
},
     { "type" : "value", "name" : "InternetGatewayDevice.WANDevice.1.
WANConnectionDevice.1.WANPPPConnection.1.Password", "value" :
"password at 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 at RegistrarServerIP" },
     { "type" : "value", "name" : "InternetGatewayDevice.ManagementServer.URL",
"value" : "http://acs.url" }, { "type" : "delete_tag", "tag" :
"Provisioning" }
  ]
 }

It works fine now.


2015-12-24 14:28 GMT+04:00 Nicolas Grondin <grondin.nicolas at gmail.com>:

> Hi,
> I'm trying to create a preset inspired on data store in MongoDB.
>
> For example :
> { "_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 at radius" }, { "type" : "value", "name" :
> "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Password",
> "value" : "password at 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 at RegistrarServerIP" }, { "type" : "value", "name" :
> "InternetGatewayDevice.ManagementServer.URL", "value" : "http://acs.url"
> }, { "type" : "delete_tag", "tag" : "Provisioning" } ] }
>
> What looks like the API's URL ?
>
> Thanks for helping.
>
> Nicolas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20160105/44dd4e3a/attachment.html>


More information about the Users mailing list