I saw in this old topic that 202 is returned for a task if the device is not found https://forum.genieacs.com/t/cant-change-parameters-via-api/2036
Is this still the case? In my case I am occasionally getting a 202 when I send quite a few “SetParameters” in one task (see example below - it if it fails, usually around the 16th or 17th entry. I understood 202 to indicate “Accepted” and would return an ID which you can use to query that task for completion (404 being better for “not found”).
[
{
"_id": "63ab4432286c2915fd21f671",
"name": "setParameterValues",
"parameterValues": [
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSIDAdvertisementEnabled", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.SSIDAdvertisementEnabled", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.3.SSIDAdvertisementEnabled", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.4.SSIDAdvertisementEnabled", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.5.SSIDAdvertisementEnabled", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.6.SSIDAdvertisementEnabled", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.7.SSIDAdvertisementEnabled", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.Time.NTPServer1", "172.28.107.13", "xsd:string" ],
[ "InternetGatewayDevice.Time.NTPServer2", "172.28.103.13", "xsd:string" ],
[ "InternetGatewayDevice.Time.Enable", "True", "xsd:boolean" ],
[ "InternetGatewayDevice.Time.LocalTimeZone", "-00:00", "xsd:string" ],
[ "InternetGatewayDevice.Time.LocalTimeZoneName", "Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London", "xsd:string" ],
[ "InternetGatewayDevice.X_ASB_COM_EthPort.EthPort.1.isTr069Domain", "True", "xsd:boolean" ],
[ "InternetGatewayDevice.X_ASB_COM_EthPort.EthPort.2.isTr069Domain", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.X_ASB_COM_EthPort.EthPort.3.isTr069Domain", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.X_ASB_COM_EthPort.EthPort.4.isTr069Domain", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.X_ALU-COM_WanAccessCfg.SshDiabled", "True", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.Enable", "True", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.Enable", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.3.Enable", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.4.Enable", "True", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.5.Enable", "True", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.6.Enable", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.7.Enable", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.8.Enable", "False", "xsd:boolean" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.X_ASB_COM_routeMode", "2", "xsd:integer" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.2.X_ASB_COM_routeMode", "1", "xsd:integer" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.3.X_ASB_COM_routeMode", "1", "xsd:integer" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.4.X_ASB_COM_routeMode", "1", "xsd:integer" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.5.X_ASB_COM_routeMode", "2", "xsd:integer" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.6.X_ASB_COM_routeMode", "2", "xsd:integer" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.7.X_ASB_COM_routeMode", "2", "xsd:integer" ],
[ "InternetGatewayDevice.LANDevice.1.WLANConfiguration.8.X_ASB_COM_routeMode", "2", "xsd:integer" ]
],
"device": "D8EFCD-G%2D240W%2DB-ALCLB36A82B2",
"timestamp": "2022-12-27T19:14:58.488Z"
}
]
If I query a task by its ID, the return is the original task and timestamp. How do I then query for the task result if it was accepted but not immediately processed?
The only way I can see to do this now is optimistically query for faults against the device and make an assumption if I don’t find one (but how long to wait?).