API Java Update CI Attribute

Hi,

Has anyone been successful in running JAVA API to update CI Attribute in RTSM or UCMDB?

If you can share, it would be greatly appreciated.

Thank you,

Gerry

 

Parents Reply Children
  • Thank you, The samples on the web site don't show any examples of updating a CI Attribute.

    I'm looking for a sample which updates an attribute on a CI, which I can use as a reference.

     

  • Hi,

    1. First of all administrator provides login credentials for connecting with the API. The API client (your project / client side) needs the user name and password of an integration user defined in the CMDB
    2. The use of this API set requires the file ucmdb-api.jar. You can download the file by entering https://<localhost>:8443 in a Web browser where localhost is the machine where UCMDB is installed and clicking the API Client Download link.

      Put the .jar file in the classpath before compiling or running your application.

    3. Then create a connection with ucmdb for the client creates other objects using interface methods. For example, to create a new query definition, the client.https://docs.microfocus.com/UCMDB/11.0/ucmdb-docs/docs/eng/APIs/JavaSDK_Samples/Ucmdb_JSdk_CreateSDKConnection.html
    4. Create and Execute a Query
    5. For example Update;

     

     

    // Create a CI (create client-side representation of CI's. // They do not actually create them in the Ucmdb.) CI updateCI = addData.addCI(CIID, CITYPE); updateCI.setStringProperty("attribute", "value"); // Add the data to the UCMDB, in case that the object exists it will be updated topologyUpdateService.create(addData, CreateMode.UPDATE_EXISTING);

     

     

    Thanks,

    Burak.