0% found this document useful (0 votes)
106 views4 pages

Using Atrium Core Web Services

This document describes how to perform three common functions in Atrium CMDB classes using Atrium Core web services: 1) Creating a new configuration item (CI) instance, 2) Fetching information for a particular CI, and 3) Deleting a particular CI. It provides the required inputs, descriptions, and working SOAP requests for each function using the BMC_ComputerSystem class as an example.

Uploaded by

basudeo35
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views4 pages

Using Atrium Core Web Services

This document describes how to perform three common functions in Atrium CMDB classes using Atrium Core web services: 1) Creating a new configuration item (CI) instance, 2) Fetching information for a particular CI, and 3) Deleting a particular CI. It provides the required inputs, descriptions, and working SOAP requests for each function using the BMC_ComputerSystem class as an example.

Uploaded by

basudeo35
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Using Atrium Core Web Services

This is a very high level document which would help you to perform following 3 functions in Atrium
CMDB classes through Atrium Core web services :

1. Creating a new instance (CI) in any class.


2. Fetching information for a particular CI from any class.
3. Deleting a particular CI from any class.

Atrium Core web services are very helpful if you want to manage Atrium CMDB data
automatically.

Note : I have used BMC_ComputerSystem Class to test all 3 use cases.

Attached wsdl must be used to access atrium core web services.

cmdbws.wsdl

Alternatively we can use following link to access Atrium Core web service :
http://servername:port/cmdbws/server/cmdbws.wsdl

This Web service has various functions which we can use as per our requirements but this document only focuses on
CreateInstance, GetInstance and DeleteInstance functions of this Atrium Core Web Service.
Below is the description of all 3 functions with the working SOAP Request for all (I have used SOAP UI tool to test
this web service)

CreateInstance
Description Creates a CI or relationship instance in the class form.

Input
arguments
loginInfo
The login information for the operation, such as the user ID, password, and the language to be used for
the session. The userId is a required element.
classNameId
The class for which the instance is to be created. It is a two-part structure that contains the namespace and
the class name.
aDatasetId
The unique identifier for the dataset. The data in the return values are based on the dataset ID specified in
this parameter.
attributes
A list of one or more name and value pairs (specified in any order) that identifies the data for the new
attribute. You must specify values for all required subclasses that do not have defined defaults. Values
must be of the data type defined for the subclasses or have a data type of 0. NULL values can be specified
for optional attribute names only. An error is generated if an attribute does not exist or the user specified
in the loginInfo parameter does not have the write permission for an attribute name.

1
Using Atrium Core Web Services

Below is the working SOAP request for creating a CI into Atrium CMDB into
BMC_ComputerSystem Class.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cmdb="http://cmdb.bmc.com">
<soapenv:Header/>
<soapenv:Body>
<cmdb:CreateInstance>
<loginInfo>
<userId>user</userId>
<password>test</password>
<lang></lang>
</loginInfo>
<classNameId>
<namespaceName>BMC.CORE</namespaceName>
<className>BMC_ComputerSystem</className>
</classNameId>
<aDatasetId>BMC.ASSET</aDatasetId>
<attributes>
<!--Zero or more repetitions:-->
<items>
<name>Name</name>
<value>
<stringValue>My test computer system</stringValue>
</value>
</items>
</attributes>
</cmdb:CreateInstance>
</soapenv:Body>
</soapenv:Envelope>

GetInstances function

Description: retrieve a list of instances. You can limit the retrieved instance result-set by specifying a
qualification.

Input
arguments
loginInfo
The login information for the operation, such as the user ID, password, and the language to be used for
the session. The userId is a required element.
classNameId
The class from which the instances are to be retrieved. It is a two-part structure that contains the
namespace and the class name.
query
A qualification that determines the set of instances to retrieve. The qualification can include one or more
attributes and any combination of conditional, relational, and arithmetic operations.
attributes

2
Using Atrium Core Web Services

A list of attribute names to retrieve.


firstRetrieve
The first instance to retrieve. CMDB_START_WITH_FIRST_ENTRY represents the first entry and is the default
value if the value is not set.
maxRetrieve
The maximum number of entries to retrieve. Use this parameter to limit the amount of data returned if the
query does not narrow the list. Specify CMDB_NO_MAX_LIST_RETRIEVE to assign no maximum.
sortOrder
The sort order for the retrieved data.
aDatasetId
The unique identifier for the dataset. The data in the return values are based on the dataset ID specified in
this parameter.
aGetMask
The identifier for specifying the dataset type. GET_MASK_NONE: Based on the datasetId being passed,
instances are retrieved from either the overlay or the original dataset. DATASET_MODE_CURRENT: Allows
you to retreive instances from the current
dataset only.

Below is the working SOAP envelope for fetching the details of a CI


from BMC_computerSystem class
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cmdb="http://cmdb.bmc.com">
<soapenv:Header/>
<soapenv:Body>
<cmdb:GetInstances>
<loginInfo>
<userId>user</userId>
<password>test</password>
<lang></lang>
</loginInfo>
<classNameId>
<namespaceName>BMC.CORE</namespaceName>
<className>BMC_ComputerSystem</className>
</classNameId>
<query>'Name'!=$NULL$</query>
<attributes>
<!--Zero or more repetitions:-->
<items>Name</items>
</attributes>
<firstRetrieve>0</firstRetrieve>
<maxRetrieve>10</maxRetrieve>
<sortOrder>
<!--Zero or more repetitions:-->
<items>
<attributeName>Name</attributeName>
<sortOrder>ASCENDING</sortOrder>
</items>
</sortOrder>
<aDatasetId>BMC.ASSET</aDatasetId>
<aGetMask>DATASET_MODE_CURRENT</aGetMask>
</cmdb:GetInstances>

3
Using Atrium Core Web Services
</soapenv:Body>
</soapenv:Envelope>

DeleteInstance
Description Deletes an instance of a class.

Input
arguments
loginInfo
The login information for the operation, such as the user ID, password, and the language to be used for
the session. The userId is a required element.
classNameId
The class from which the instance is to be deleted. It is a two-part structure that contains the namespace
and the class name.
instanceId
The unique identifier for the instance.

aDatasetId
The unique identifier for the dataset. The data in the return values are based on the dataset ID specified in
this parameter.
deleteOption
DERIVED_INSTANCE_FOUND: Allows you to delete only the specified instance,if the instance is retrieved.
UNCONDITIONALLY: Allows you to delete the instance even when the instance cannot be retrieved . Errors
will be ignored for instances that do not exist.

Below is the working SOAP request for deleting a CI from BMC_computerSystem class:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cmdb="http://cmdb.bmc.com">
<soapenv:Header/>
<soapenv:Body>
<cmdb:DeleteInstance>
<loginInfo>
<userId>user</userId>
<password>test</password>
<lang></lang>
</loginInfo>
<classNameId>
<namespaceName>BMC.CORE</namespaceName>
<className>BMC_ComputerSystem</className>
</classNameId>
<instanceId>ASGAA5V0G7G3OAMMEDTDGZPZ8KT88U</instanceId>
<aDatasetId>BMC.ASSET</aDatasetId>
<deleteOption>UNCONDITIONALLY</deleteOption>
</cmdb:DeleteInstance>
</soapenv:Body>
</soapenv:Envelope>

You might also like