Highlighted
Respected Contributor.
Respected Contributor.
107 views

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

 

0 Likes
3 Replies
Highlighted
Valued Contributor.. Valued Contributor..
Valued Contributor..

Re: API Java Update CI Attribute

Hi,
You can update ucmdb api.jar using. Create a basic java project in any ide (eclipse etc) and add as external library (ucmdb-api.jar) to your project.
Then, you can make your update manipulation by connecting to your own ucmdb server in your project.
You can able to find examples in the following link:

https://docs.microfocus.com/UCMDB/11.0/ucmdb-docs/docs/eng/doc_lib/Content/devref/API_r_Examples.htm
0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Re: API Java Update CI Attribute

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.

 

0 Likes
Highlighted
Valued Contributor.. Valued Contributor..
Valued Contributor..

Re: API Java Update CI Attribute

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.

 

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.