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@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" : "http://acs.url" }, { "type" : "delete_tag", "tag" :
"Provisioning" }
]
}
It works fine now.
2015-12-24 14:28 GMT+04:00 Nicolas Grondin <[email protected]>:
> 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@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" : "http://acs.url"
> }, { "type" : "delete_tag", "tag" : "Provisioning" } ] }
>
> What looks like the API's URL ?
>
> Thanks for helping.
>
> Nicolas
>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users