I get the error: the index ‘net’ does not exist
I read the article about the function. it say its working for Device (from release 34)? What exactly do they mean?
I think that means it is only for use in device code, not in agent code?
Your imp is on release 32 (server.log(imp.getsoftwareversion()) will show you); release 34 is not out yet but early pre-releases are with some customers hence the documentation is online.
Just to confirm, the Availability entry in the imp API lists shows first whether the API method is available to agent code, device code or both, and then which impOS version introduced it. For clarity, methods available from early versions of impOS (anything pre-27, basically) are not listed this way.