API calls no longer working when using T_KeyPair and returns items instead of info or issue

Last Modified

Thu Nov 26 16:23 GMT 2020

Description

  • API calls no longer working when using T_KeyPair and returns items instead of info or issue.
  • In N-able N-central 2020.1 and above, deprecated classes are now removed, and data structures and labels returned may differ. 
  • This will affect all users who are calling the APIs using scripts, applications or third party products such as IT Glue, BrightGauge, etc.
  • Some example method calls are:
    • activeIssuesList (the key used to be "issue" but is now "items")
    • deviceList (key was "info" but is now "items")
    • deviceGetStatus
    • customerList (key was "info" but now returns "items")
    • deviceAssetInfoExportDeviceWithSettings
    • ...
  • The javadocs and WSDL have been updated. To observe this, see https://<your_n-central>/dms
    • then click on External API's Javadocs / External API's WSDL
  • FAQ:
    1) will the data be the same/accurate?
    2) do all responses contain an "items" key?

    yes for both questions. The logic was not changed, we just got removed deprecated classes and those keys were changed.

  • Example: reviewing docs on older versions of N-able N-central demonstrates deprecated methods.
    https://<n-central__and_below>/dms/javadoc_ei2/index.html?com/nable/nobj/ei2/ServerEI2_PortType.html
    //on an old server, browse to above link and click T_KeyPair, see how it indicates that it is deprecated:
    Class T_KeyPair
    java.lang.Object
    com.nable.nobj.ei2.EiTuple<String,String>
    com.nable.nobj.ei2.EiKeyValue
    com.nable.nobj.ei2.T_KeyPair
    Deprecated.
    Use the EiKeyValue class instead.

    @Deprecated
    public class T_KeyPair
    extends EiKeyValue

    For more General Information about using N-able N-central APIs, see: Accessing N-able N-central API functions

Environment

  • N-able N-central 2020.1 or later

Solution

  1. Update API calls, scripts or applications as needed using updated documentation.

     

Here is the full list of Deprecated Methods:

Deprecated Methods
Method and Description
com.nable.nobj.ei2.ServerEI2_PortType.deviceAssetInfoExport(String, String, String)
Use the ServerEI2_PortType.deviceAssetInfoExportDevice(String, String, String) method or the ServerEI2_PortType.deviceAssetInfoExportDeviceWithSettings(String, String, String, T_KeyValue[]) method instead.
com.nable.nobj.ei2.DeviceData.getCPUCount()
Use the DeviceData.getCpuCount() getter method instead.
com.nable.nobj.ei2.DeviceData.getCPUSpeedMHz()
Use the DeviceData.getCpuSpeedMhz() getter method instead.
com.nable.nobj.ei2.DeviceReportDeviceData.getCPUUtilizationPercentage()
Use the DeviceReportDeviceData.getCpuUtilizationPercentage() getter method instead.
com.nable.nobj.ei2.DeviceReportData.getCustomerID()
Use the DeviceReportData.getCustomerId() getter method instead.
com.nable.nobj.ei2.DeviceData.getCustomerID()
Use the DeviceData.getCustomerId() getter method instead.
com.nable.nobj.ei2.ConfigValue.getDatatype()
Use the ConfigValue.getDataType() getter method instead.
com.nable.nobj.ei2.DeviceReportDeviceData.getDeviceID()
Use the DeviceReportDeviceData.getDeviceId() getter method instead.
com.nable.nobj.ei2.DeviceData.getDeviceID()
Use the DeviceData.getDeviceId() getter method instead.
com.nable.nobj.ei2.EiKeyValuesList.getInfo()
Use the EiKeyValuesList.getItems() method instead.
com.nable.nobj.ei2.EiKeyValueList.getInfo()
Use the EiKeyValueList.getItems() method instead.
com.nable.nobj.ei2.DeviceData.getIPAddress()
Use the DeviceData.getIpAddress() getter method instead.
com.nable.nobj.ei2.WrapperTaskMonitoring.getMsg()
Use the WrapperTaskMonitoring.getMessage() getter method instead.
com.nable.nobj.ei2.DeviceData.getNableURL()
Use the DeviceData.getNableUrl() getter method instead.
com.nable.nobj.ei2.DeviceData.getOS_ReportedOS()
Use the DeviceData.getOperatingSystemReported() getter method instead.
com.nable.nobj.ei2.DeviceData.getOS_ServicePackVersion()
Use the DeviceData.getOperatingSystemServicePackVersion() getter method instead.
com.nable.nobj.ei2.DeviceData.getOS_Version()
Use the DeviceData.getOperatingSystemVersion() getter method instead.
com.nable.nobj.ei2.ConfigValue.getPKey()
Use the ConfigValue.getKey() getter method instead.
com.nable.nobj.ei2.ConfigValue.getPValue()
Use the ConfigValue.getValue() getter method instead.
com.nable.nobj.ei2.DeviceReportData.getSiteCustomerID()
Use the DeviceReportData.getSiteCustomerId() getter method instead.
com.nable.nobj.ei2.DeviceData.getSiteCustomerID()
Use the DeviceData.getSiteCustomerId() getter method instead.
com.nable.nobj.ei2.DeviceReportData.getSOCustomerID()
Use the DeviceReportData.getSoCustomerId() getter method instead.
com.nable.nobj.ei2.DeviceData.getSOCustomerID()
Use the DeviceData.getSoCustomerId() getter method instead.
com.nable.nobj.ei2.DeviceReportData.getSOCustomerName()
Use the DeviceReportData.getSoCustomerName() getter method instead.
com.nable.nobj.ei2.DeviceData.getSOCustomerName()
Use the DeviceData.getSoCustomerName() getter method instead.
com.nable.nobj.ei2.ServerEI2_PortType.mspaHeartbeat(String, int, int)
This method will be removed in one of the next releases.
com.nable.nobj.ei2.DeviceData.setCPUCount(Integer)
Use the DeviceData.setCpuCount(Integer) setter method instead.
com.nable.nobj.ei2.DeviceData.setCPUSpeedMHz(String)
Use the DeviceData.setCpuSpeedMhz(String) setter method instead.
com.nable.nobj.ei2.DeviceReportDeviceData.setCPUUtilizationPercentage(Float)
Use the DeviceReportDeviceData.setCpuUtilizationPercentage(Float) setter method instead.
com.nable.nobj.ei2.DeviceReportData.setCustomerID(Integer)
Use the DeviceReportData.setCustomerId(Integer) setter method instead.
com.nable.nobj.ei2.DeviceData.setCustomerID(Integer)
Use the DeviceData.setCustomerId(Integer) setter method instead.
com.nable.nobj.ei2.ConfigValue.setDatatype(String)
Use the ConfigValue.setDataType(String) setter method instead.
com.nable.nobj.ei2.DeviceReportDeviceData.setDeviceID(Integer)
Use the DeviceReportDeviceData.setDeviceId(Integer) setter method instead.
com.nable.nobj.ei2.DeviceData.setDeviceID(Integer)
Use the DeviceData.setDeviceId(Integer) setter method instead.
com.nable.nobj.ei2.EiKeyValueList.setInfo(T_KeyPair[])
Use the EiKeyValueList.setItems(List) method instead.
com.nable.nobj.ei2.EiKeyValuesList.setInfo(T_KeyValue[])
Use the EiKeyValuesList.setItems(List) method instead.
com.nable.nobj.ei2.DeviceData.setIPAddress(String)
Use the DeviceData.setIpAddress(String) setter method instead.
com.nable.nobj.ei2.WrapperTaskMonitoring.setMsg(String)
Use the WrapperTaskMonitoring.setMessage(String) setter method instead.
com.nable.nobj.ei2.DeviceData.setNableURL(String)
Use the DeviceData.setNableUrl(String) setter method instead.
com.nable.nobj.ei2.DeviceData.setOS_ReportedOS(String)
Use the DeviceData.setOperatingSystemReported(String) setter method instead.
com.nable.nobj.ei2.DeviceData.setOS_ServicePackVersion(String)
Use the DeviceData.setOperatingSystemServicePackVersion(String) setter method instead.
com.nable.nobj.ei2.DeviceData.setOS_Version(String)
Use the DeviceData.setOperatingSystemVersion(String) setter method instead.
com.nable.nobj.ei2.ConfigValue.setPKey(String)
Use the ConfigValue.setKey(String) setter method instead.
com.nable.nobj.ei2.ConfigValue.setPValue(String)
Use the ConfigValue.setValue(String) setter method instead.
com.nable.nobj.ei2.DeviceReportData.setSiteCustomerID(Integer)
Use the DeviceReportData.setSiteCustomerId(Integer) setter method instead.
com.nable.nobj.ei2.DeviceData.setSiteCustomerID(Integer)
Use the DeviceData.setSiteCustomerId(Integer) setter method instead.
com.nable.nobj.ei2.DeviceReportData.setSOCustomerID(Integer)
Use the DeviceReportData.setSoCustomerId(Integer) setter method instead.
com.nable.nobj.ei2.DeviceData.setSOCustomerID(Integer)
Use the DeviceData.setSoCustomerId(Integer) setter method instead.
com.nable.nobj.ei2.DeviceReportData.setSOCustomerName(String)
Use the DeviceReportData.setSoCustomerName(String) setter method instead.
com.nable.nobj.ei2.DeviceData.setSOCustomerName(String)
Use the DeviceData.setSoCustomerName(String) setter method instead.