Hi,
I am trying to delete some data from mutable device using class resource but it seems the data from device is not been deleted, Can you help me determine the issue?
[2024-09-02 16:45:45] Duration: 2s Billed Duration: 2s.
[2024-09-02 16:45:45] Analysis finished.
[2024-09-02 16:45:45] 0 Data Removed
[2024-09-02 16:45:43] Starting Analysis…
[2024-09-02 16:44:27] Analysis finished.
usage of class methods
const result \= await Resources.devices.deleteDeviceData(group\_id, { ids:\["m2mdevice","jobname","m2mjobvalidation"\]})
console.log(result)
Hello,
It appears the issue lies in the parameter you’re using. Instead of “ids,” you should use “variables.” The “ids” parameter should look something like this: { ids: ["669b2dc4263c8c00091b51de", "669b2dc4263c8c00091b51dd"] }.
Please update your code as follows:
const result = await Resources.devices.deleteDeviceData(group_id, {
variables: [“m2mdevice”, “jobname”, “m2mjobvalidation”],
});
Additionally, please note that by default, only 15 variables are deleted at a time. If you need to delete more, you can use the “qty” parameter, with a maximum limit of 10,000 variables.