Creating relation between existing CIs through APIs

Idea ID 1659658

Creating relation between existing CIs through APIs

We need be able to create relation between two existing CIs by theirs ucmdbIds. This new feature should be implemented for next APIs - Rest API, JAVA API and especially for Federation API (we are using implementation of PopulationAdapter interface).

 

Explain in details (I will use Rest API for the example below).

Rest API has Update CI method, user able to update any CI by it's ucmdbId like this -

calling PUT method

 

http://servername:port/rest-api/dataModel/ci/4fc5cb9b413954a397f10ee777a305f8

with body

 

 

{
	properties: {
		data_note: sometext
	}
}

Data note will be updated for CI with the UcmdbId.

 

But Rest API doesn't have method to create relation between two existing CIs by their ucmdbIds. 

At this moment Rest API (and others) cannot do such simple operation, to do this user have to use Insert Topology method, but this method requires building a new CI like this:

 

{
	cis: [{
		ucmdbId: [temp_id],
		type: [ucmdb_cit],
		properties: {
			<ucmdb_cit_prop>: [ucmdb_cit_prop_value],
			…
		}
	},
	…],
	relations: [{
		ucmdbId: [temp_id],
		type: [ucmdb_cit],
		end1Id: [temp_id],
		end2Id: [temp_id],
		properties: {
			<ucmdb_cit_prop>: [ucmdb_cit_prop_value],
			…
		}
	},
	…]
}

 

 

PROBLEM - In real world and real business cases external system will never have all information required for Reconciliation Data-In, especially when we are talking about node CI type and it's components. In fact in most cases external system knows UcmdbIds and a little bit another information. In our business case we need to integrate UCMDB and Microsoft SCOM, but in MSSCOM all required information don't exist, so we can't use Insert Topology method at all.

6 Comments
Micro Focus Expert
Micro Focus Expert
Status changed to: Waiting for Votes

The idea has received an initial review to ensure adherence to our idea submission and community guidelines. More information may be needed at this stage and we expect the community to help prioritize the idea with comments and voting

Outstanding Contributor.
Outstanding Contributor.

It is realy required feature. In many cases we have information about GUID only, but not about all properties needed for reconsilation. For example when we push data about computers to Asset Manager enriche it some data there and want return to uCMDB this enriched relations.

Micro Focus Expert
Micro Focus Expert
Status changed to: Under Consideration

This idea received enough votes and comments from the community and been reviewed by Micro Focus for strategic fit. These ideas are continually monitored and considered for prioritization in our development planning.

Micro Focus Contributor
Micro Focus Contributor
Status changed to: Already Offered

Please refer to these docs on how to achieve it:

 

https://rndwiki.houston.softwaregrp.net/confluence/display/mam/Insert+Topology

[temp_id] – string that represents a temporary id of the objects, this temporary id can be used for referring to the object inside this payload. For example we can specify the end1 and end2 of a relationship, if we want to use an object that was defined in the same payload we use the object’s temp id. When specifying the end1 and end2 of a relationship you can use existing ucmdb object ids, these ids are 32 characters long. If you use a string with a 32 character length it will be interpreted as the id of an existing object

Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Hello @doron_orbach , @Bill_Dyck ,

I could not really access the documents provided: https://rndwiki.houston.softwaregrp.net/confluence/display/mam/Insert+Topology

I have this requirement where I need to create relationship between 2 CIs that already exist in UCMDB through rest api. I could not achieve this by following the hints provided here and in the documentation. Could you please direct me towards correct documentation!

Thanks,
Kartik

Micro Focus Contributor
Micro Focus Contributor

This is an example of payload for the REST API:

 

payload = {

                "cis": [

                    {

                        "ucmdbId": "40ecf44f796a638c9d617a66ceff00cc",

                        "type": "ci_collection",

                        "properties": { "name": "TEMP1_REG" },

                    },

                    {

                        "ucmdbId": "4825720a6bf5fe1385214dd0aded87f7",

                        "type": "ci_collection",

                        "properties": { "name": "TEMP2_REG" },

                    }

                ],

                "relations": [

                    {

                        "ucmdbId": "1",

                        "type": "containment",

                        "end1Id": "40ecf44f796a638c9d617a66ceff00cc",

                        "end2Id": "4825720a6bf5fe1385214dd0aded87f7",

                        "properties": { "name": "Containment", "data_origin": "UCMDB API REST", },

                    }

                ],

            }

 

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.