Using Atrium Core Web Services
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 :
Atrium Core web services are very helpful if you want to manage Atrium CMDB data
automatically.
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
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>