NetXMS Support Forum

English Support => General Support => Topic started by: suphu on September 24, 2018, 05:10:32 PM

Title: nxshell - create new data collector items
Post by: suphu on September 24, 2018, 05:10:32 PM
Hi, I am coding in python using nxshell version 2.2.8

Looking at some post about how to create new data collector items - this works!
https://www.netxms.org/forum/general-support/how-to-create-dci-using-netxms-java-api-version-2-1-m3/msg22320/#msg22320

However, the API Reference marks this method as Deprecated.  Going forward, what is/will be the proper API call(s) to create DCI's?
https://www.netxms.org/documentation/javadoc/latest
createItem(DataCollectionObject object)
Deprecated.

Thanks.
Title: Re: nxshell - create new data collector items
Post by: Victor Kirhenshtein on September 24, 2018, 09:00:09 PM
Hi,

it is deprecated in 3.0 branch (latest javadoc generated from 3.0), you can safely use it in 2.2 branch. In 3.0 you should call DataCollectionConfiguration.modifyObject with data collection object ID set to 0 (but this will not work in 2.2).

Best regards,
Victor