v2.0 - GraphQuery process for the BMC Atrium CMDB adapter
The Graph Query Process is included in the v2.0 directory.
Graph Query process
The Graph Query process is exposed as a web service allowing queries for CIs (Configuration Items) and Relationships in BMC Atrium CMDB (Configuration Management DataBase). It starts using the specified CI and follows its relationships to other CIs, continuing along the path to the specified level.
The Graph Query API handles a wide range of queries using the adjacency list data structure. The adjacency list contains the object query parameter to specify the CI instances and relation query parameter to specify the relationships to search for in CMDB.
The following table describes the process inputs for the Graph Query process.
Process Inputs - Graph Query process
Process input | Description | Required? |
---|---|---|
<login info> | Specifies the authentication parameters | Yes |
<start classname ID> | Specifies the initial CI namespace and class name | Yes |
<start extension ID> | Specifies the starting extension ID of the CI instance | No |
<start instance ID> | Specifies the instance ID of the CI on CMDB | No |
<num levels> | Specifies the search direction
| No |
<direction> | Specifies the search direction
| No |
<no match proceed> | Indicates whether to proceed to the next node if the returned node does not satisfy the query criteria Note: If this element is set to true, no relationship information is displayed. | No |
<on match proceed> | Indicates whether to proceed to the next node if the returned node satisfies the query criteria | No |
<graph> | Specifies the details of the information to be queried on the CMDB to get the CIs and relationships | No |
<a get mask> | Specifies the dataset type possible values are:
| No |
<a dataset ID> | Specifies the unique dataset ID | No |
The following figure shows a sample <items> XML for the Graph Query process.
<items> XML sample for the Graph Query process
<item>
<parameters>
<login-info>
<user-id>Demo</user-id>
<password>Demo</password>
<lang>English</lang>
</login-info>
<start-class-name-id>
<namespace-name>BMC.CORE</namespace-name>
<class-name>BMC_BusinessService</class-name>
</start-class-name-id>
<start-extension-id>one</start-extension-id>
<start-instance-id>AG0019D12F7F8A1RpqSAj98EAAdSoA</start-instance-id>
<num-levels>-1</num-levels>
<direction>RELATIONSHIP_DIRECTION_OUT</direction>
<no-match-proceed>true</no-match-proceed>
<on-match-proceed>true</on-match-proceed>
<graph>
<items>
<class-name-id>
<namespace-name>BMC.CORE</namespace-name>
<class-name>BMC_BusinessService</class-name>
</class-name-id>
<extension-id>one</extension-id>
<adjacency-list>
<items>
<extension-id>one</extension-id>
<object-class-name>
<namespace-name>BMC.CORE</namespace-name>
<class-name>BMC_BusinessService</class-name>
</object-class-name>
<object-attribute-names/>
<object-attribute-type>ALL</object-attribute-type>
<object-query/>
<relation-class-name>
<namespace-name>BMC.CORE</namespace-name>
<class-name>BMC_BaseRelationship</class-name>
</relation-class-name>
<relation-attribute-names/>
<relation-attribute-type>ALL</relation-attribute-type>
<relation-query/>
</items>
</adjacency-list>
</items>
</graph>
<a-get-mask>GET_MASK_NONE</a-get-mask>
<a-dataset-id>BMC.ASSET</a-dataset-id>
</parameters>
</item>
</items>
The following figure illustrates the adapter response for the Graph Query process.
Adapter response for the Graph Query process
<metadata>
<status>success</status>
</metadata>
<parameters>
<objects>
<value>
<element>
<instance-id>AG0019D12F7F8A8RpqSAl0sFAAgCoA</instance-id>
<instance-attributes />
<class-name-id>
<namespace-name>BMC.CORE</namespace-name>
<class-name>BMC_BusinessService</class-name>
</class-name-id>
</element>
<element>
<instance-id>AG0019D12F7F8AowBrSAGWFbAwy4IA</instance-id>
<instance-attributes />
<class-name-id>
<namespace-name>BMC.CORE</namespace-name>
<class-name>BMC_BusinessService</class-name>
</class-name-id>
</element>
<element>
<instance-id>AG0019D12F7F8AiR5rSAuy3QAwVpIA</instance-id>
<instance-attributes />
<class-name-id>
<namespace-name>BMC.CORE</namespace-name>
<class-name>BMC_BusinessService</class-name>
</class-name-id>
</element>
</value>
</objects>
<relations />
<status>
<value />
</status>
</parameters>
</bmc-atrium-cmdb-response>