Deprecated: Assigning the return value of new by reference is deprecated in /storage/content/94/122194/onecmdb.org/public_html/wiki/includes/User.php on line 1098 Deprecated: Assigning the return value of new by reference is deprecated in /storage/content/94/122194/onecmdb.org/public_html/wiki/includes/Title.php on line 132 Deprecated: Assigning the return value of new by reference is deprecated in /storage/content/94/122194/onecmdb.org/public_html/wiki/includes/Title.php on line 215 Deprecated: Function split() is deprecated in /storage/content/94/122194/onecmdb.org/public_html/wiki/includes/Parser.php on line 2719 Deprecated: Function split() is deprecated in /storage/content/94/122194/onecmdb.org/public_html/wiki/includes/Parser.php on line 2773 Deprecated: Function split() is deprecated in /storage/content/94/122194/onecmdb.org/public_html/wiki/includes/Parser.php on line 2773 OneCMDB Web Services V2.0 - OneCMDB

OneCMDB Web Services V2.0

From OneCMDB

Contents

Overview

This document describes how to interact with OneCMDB using Web Services. This enables for other programming languages than Java to interact with OneCMDB. The intention with the Web Services Interface is to make it as simple, useful and powerful as possible.

A few OneCMDB concepts

OneCMDB is organized in an object-oriented manner, i.e. objects inherit EGENSKAPER from each other. This means that all Configuration Items (CI) are derived from another CI. Only one Root exists from where all CI:s are derived. Two flavors of CI:s exist, Templates and Instances. A template describes which attributes each instance shall have, and of which type. It can also contain default value(s). Instances contain value(s) for the attributes defined in the Template.

  • A CI has a unique id (human unreadable), which can never be changed. It is tightly connected to the back end storage.
  • A CI has a unique alias. The alias can be specified and altered, unless the alias is used somewhere else. It is frequently used in the OneCMDB XML definition.
  • A CI has a display name that defines how the CI shall be presented as single line text. The display name is often a concatenation of one or more attribute values. It is evaluated when it is requested. The benefit of this is that the CI doesn’t have to have a specific name and it will reflect changes to values.
  • CI (templates and instances) can be described in an XML document, which can be imported/exported to/from OneCMDB

Example Model

To illustrate different query and update commands to OneCMDB a simple template model with instances is defined. It is used in all examples.

Template Model

The inheritance between CI:s are shown as arrows. For example, the NetworkDevice template has all attributes defined in the CI template. The Router template will thus have all attributes from both NetworkDevice and Ci.

Image:TemplateDiagram.gif

Instance Model

In this figure an arrow indicates a relation between CI (instances).

Image:InstanceDiagram.gif

OneCMDB XML Model Description

The above template and instance model is defined by the following XML document. The XML document can be imported to OneCMDB. Note that this is only a fragment of the complete document.

<onemcdb>
	<templates>
		<!-- Definition of NetworkDevice Template -->
		<template alias=”NetworkDevice” displayName=”NetDevice ${primaryIp}>
			<derivedFrom><ref alias=”Ci”/></derivedFrom>
			<attribute attAlias=”primaryIp”>
				<simpleType>String</simpleType>
			</attribute>
		</template>

		<!-- Definiton of the Router 
			Defines a Complex Attribute of Type Site and Reference Type Reference.
			It also defines the occurrence of values[0..1] meaning that it's not required to have site value 
			but it can not have more than one site. Default policy are [1..1].-->
	
		<template alias=”Router”>
			<derivedFrom><ref alias=”NetworkDevice”/></derivedFrom>
			<attribute attAlias=”site”>
				<complexType>
					<ref alias="Site"/>
					<refType><ref alias="Reference"/></refType>
				</complexType>
				<policy>	
					<minOccurs>0</minOccurs>
					<maxOccurs>1</maxOccurs>
				</policy>
			</attribute>
		</template>
		...
	</templates>
	<instances>
		<!-- Definition of an Router instance that has a reference to Site S1 -->
		<Router alias=”R1”>
			<primaryIp>192.168.1.2<//primaryIp>
			<site><ref alias=”S1”/></site>
		</Router>
		<Site alias=”S1”>
			...
		</Site>
		....
	</instances>
</onecmdb>

Web Service Interface (WSDL)

OneCMDB core functions are accessible as a Web Service. This enables remote interaction with OneCMDB without the restriction of programming language. Examples below will show how to interact using PHP and Java.

Core functions like create/update/deletion of CI, searching/query for CI and query for change history of CI are available.

Other OneCMDB functions like job and policy handling is not covered by this service.

The WSDL describing the service can be accessed from http://localhost:8080/webservice/onecmdb?wsdl

Setup Java Environemnt

One way to access the Web Service API from Java is to do the following:

  • Include the following jar-files to the classpath. Found under install/tomcat*/webapps/onecmdb-desktop/WEB-INF/lib
    • onecmdb-core-2.0.1.jar
    • activation-1.1.jar
    • commons-codec-1.3.jar
    • commons-httpclient.jar
    • commons-logging-1.0.4.jar
    • jdom-1.0.jar
    • jsr173_api-1.0.jar
    • wsdl4j-1.6.1.jar
    • wstx-asl-3.2.0.jar
    • xfire-all-1.2.6.jar

Then create the web service interface as follows:

import org.onecmdb.core.utils.wsdl.IOneCMDBWebService;
import org.onecmdb.core.utils.wsdl.OneCMDBServiceFactory;

public class OneCMDBClient {
	public static void main(String argv[]) {
		try {
			// Create web service interface
			IOneCMDBWebService service = OneCMDBServiceFactory.getWebService("http://localhost:8080/webservice/onecmdb");
			
			// Authenticate
			String token = service.auth("admin", "123");
			System.out.println("Authenticated token=" + token);

			// ....
			
			// Logout
			service.logout(token);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

And here follows a full example that do graph query on Systems.

import org.onecmdb.core.utils.bean.CiBean;
import org.onecmdb.core.utils.graph.query.GraphQuery;
import org.onecmdb.core.utils.graph.query.constraint.AttributeValueConstraint;
import org.onecmdb.core.utils.graph.query.selector.ItemOffspringSelector;
import org.onecmdb.core.utils.graph.result.Graph;
import org.onecmdb.core.utils.wsdl.IOneCMDBWebService;
import org.onecmdb.core.utils.wsdl.OneCMDBServiceFactory;

public class OneCMDBClient {
	public static void main(String argv[]) {
		try {
			// Create web service interface
			IOneCMDBWebService service = OneCMDBServiceFactory.getWebService("http://localhost:8080/webservice/onecmdb");
			String token = service.auth("admin", "123");
			System.out.println("Authenticated token=" + token);
			
			// Compose Query...
			GraphQuery query = new GraphQuery();
			ItemOffspringSelector sel = new ItemOffspringSelector();
			sel.setTemplateAlias("System");
			
			// Add Constraint...
			AttributeValueConstraint constraint = new AttributeValueConstraint();
			constraint.setAlias("Name");
			constraint.setOperation(AttributeValueConstraint.LIKE);
			constraint.setValue("Al%");
			
			sel.applyConstraint(constraint);
			
			query.addSelector(sel);
			
			// Do Query
			Graph result = service.queryGraph(token, query);
			result.buildMap();
			for (CiBean bean : result.fetchAllNodeOffsprings()) {
				System.out.println("System=" + bean.toStringValue("Name"));
			}
			
			// Logout
			service.logout(token);
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
}

Java examples that uses Basic Model

  1. Create/Update CI's

API Overview

The Web Services functions available are:

auth(String username, String pwd) throws Exception : String

logout(String authToken) : void

history(String auth, CiBean vBean, RfcQueryCriteria criteria) : RFCBean[] 

historyCount(String auth, CiBean vBean, RfcQueryCriteria criteria) : int

search(String auth, QueryCriteria criteria) : CiBean[]

searchCount(String auth, QueryCriteria criteria) : int

query(String auth, String xPath, String attributes) : CiBean[]

update(String auth, CiBean localBeans[], CiBean baseBeans[]) : IRfcResult

findRelation(String auth, CiBean left, CiBean right) : String[]

evalRelation(String auth, CiBean root, String relationPath, QueryCriteria crit) : CiBean[]

evalRelationCount(String auth, CiBean root, String relationPath, QueryCriteria crit) : int

queryGraph(String token, GraphQuery q) : Graph	

Auth function

Syntax:

auth(String username, String pwd) throws Exception : String

Authenticate a user in OneCMDB. The returned token is used in all methods. To end the session use the logout function. If the user can not be authenticated an Exception is thrown.

Graph Query function

Syntax:

graphQuery(String auth, GraphQuery) : Graph

This is the most advanced query method that OneCMDB supports. It can query for CI's of different templates as well as relations between these CI's. It also support paging and search constraints, like attribute values, on each individual templates.

For more information and examples, see WSDL Graph Query

Query function

Syntax:

query(String auth, String xPath, String attributes) : CiBean[]

Query OneCMDB with XPath syntax. The result will always be an array of CiBean. See below for a definition of the CiBean data type.

Common Xpath's:

  • /template/* - List all templates.
  • /template/<alias> - Get a template with alias name.
  • /instance/<template-alias>/* - List all instance's for a template.
  • /instance/<template-alias>/<instance-alias> - Get a specific instance.

The attributes argument can be used to specify which attributes to include in the resulting CI. It controls the depth of the reference to retrieve, by specifying a attribute path.

Example

query(“xxx”, “/instance/Router/*”, “primaryIp site site/supervisor”); 

will return CI for all Router instances and referenced Site and Person CI instance's.

Update function

Syntax:

update(String auth, CiBean localBeans[], CiBean baseBeans[]) : IRfcResult

Method used to Create/Update/Delete CI in OneCMDB. The method takes three parameters, the auth session token, the local set of beans and the base set of beans. The base set of CI is used to determine which CI where available at query time. The local set of CI is used to modify existing CI or create new if not existing. It's an CVS approach, where the base is the check out point, and the local is the current modified items. It enables a three way compare that can detect conflicts. Currently only detection of deleted CI or attributes are implemented.

Search(Count) function

Syntax:

search(String auth, QueryCriteria criteria) : CiBean[]
searchCount(String auth, QueryCriteria criteria) : int

Search in OneCMDB for CI that match certain criteria. The searchCount function takes the same arguments but the return how many hits the search generate (ignoring the maxResult attribute). This is useful when implementing paging of large datasets. The search method is faster than the query method but has a more complex argument.

Typical search criteria are:

  • Textual search of values/alias/description.
  • Instance's of a specific template.

The search also support “paging” of result set, by using a combination of maxResult and firstResult attributes, see below for examples.

History(count) function

Syntax:

history(String auth, CiBean vBean, RfcQueryCriteria criteria) : RFCBean[]
historyCount(String auth, CiBean vBean, RfcQueryCriteria criteria) : int

View the change history of a CI. All changes to CI are tracked and stored as RFC objects in OneCMDB. Theses objects can be retrieved using this function.

Relation function

Syntax:

findRelation(String auth, CiBean left, CiBean right) : String[]
evalRelation(String auth, CiBean root, String relationPath, QueryCriteria crit) : CiBean[]
evalRelationCount(String auth, CiBean root, String relationPath, QueryCriteria crit) : int

NOTE: These functions are in an alpha state, and my change. The findRelation() method is not implementd in OneCMDB 1.3.0.

Relation functions are used to explore model relations. Once a relation path is known it's possible to fetching related instances from one source by specifying this relation path. The relation path syntax is as follows:

direction cmd delimiter

Where

  • direction
    • > forward direction
    • < backward direction
  • cmd
    • $attr{alias} – forward direction from this attribute alias.
    • $template{alias} – backward direction, meaning that the CI is releated from instance's of the template alias.
  • delimiter
    • pipe sign |.

Example – Relate a Person instance to a Router instance's.

<$template{Site}|<$template{Router}

Example – Relate a Router instance to Persons.

>$attr{site}|>$attr{supervisor}

Logout function

Syntax:

logout(String authToken) : void

Terminate the session token.

Example(s)

Note: All examples is using the example model described above.

PHP

PHP examples below uses the built-in SOAP extension in PHP 5. It's not enabled by default, to enable it check the PHP http://www.php.net site for more information. (For Windows enable it by adding extension=php_soap.dll in the php.ini file.)

Example – List all instances of a Router.
<?php
  // Specify the WSDL URL.
  $wsdl_url = "http://localhost:8080/webservice/onecmdb?wsdl";
	
  // Create Soap Client.
  $client = new SoapClient($wsdl_url);

  // Authenticate to OneCMDB.
  $token = $client->auth(“admin”, “123”);
  
  // Query for instance's of Router.
  $routers = $client->query($token, “/instance/Router/*”, ”*”);
	
  // Logout.
  $client->logout($token);
	
  // Show the result as a dump.
  print_r($routers);
?>
Example – Search for an attribute value.
<?php

	// Example - Search for CI with a specific attribute value.
	// ========================================================
	
	// Create Soap Client using PHP 5 internal soap client.
	$wsdl_url = "http://localhost:8080/webservice/onecmdb?wsdl";
	$client = new SoapClient($wsdl_url);
	try {
		$token = $client->auth("admin", "123");	
	} catch (SoapFault $e) {
		print("Auth Error:::: $e");
	}
	
	// Setup search criteria
	$criteria->offspringOfAlias = "Router";
	$criteria->textMatchValue = "true";
	$criteria->text = "192.168.1.2";
	
	// Map it to correct namespace.
	$arg1 = new SoapVar($criteria, 0, "QueryCriteria", "http://model.internal.core.onecmdb.org"); 
	
	// Serach for count.
	$result = $client->searchCount($token, $arg1);
	print("Matched : $result CI");
	print("<br/>");
	
	// Search all CI
	$result = $client->search($token, $arg1);

	// Display the result.
	// NOTE: If only one item is return in an array, it's not an array!
	if (is_array($result->CiBean)) {
		print("<ul>");
   		foreach ($result->CiBean as $bean) {
   			print("<li>");
   	  		print("Alias=$bean->alias displayName=$bean->displayName");
   			print("</li>");
   		}
   		print("</ul>");
	} else {
		$bean = $result->CiBean;
   		print("Alias=$bean->alias displayName=$bean->displayName");
   	} 
   	
   	// Be nice to logout also.
   	$client->logout($auth);
?>
Example – Add a CI template and instances.
<?php
// Convinient function to create a instnace object.
function getInstance($alias) {
		$instance->alias = $alias;
		$instance->derivedFrom = "NewTemplate";		
	
		$attrValue->alias = "a1";
		$attrValue->value = "value for $alias";
		$instance->attributeValues[0] = new SoapVar($attrValue, 0, "ValueBean", "http://bean.utils.core.onecmdb.org");
	
		// Map it to correct namespace.
		$soapArg =  new SoapVar($instance, 0, "CiBean", "http://bean.utils.core.onecmdb.org");
		return($soapArg);
}

	// Check time.
	$start = time();
	
	/**
	 * Example - Add a CI template and instances.
	 */
	$wsdl_url = "http://localhost:8080/webservice/onecmdb?wsdl";
	
	$client = new SoapClient($wsdl_url);
	try {
		$token = $client->auth("admin", "123");	
	} catch (SoapFault $e) {
		print("Auth Error:::: $e");
	}
	
	$template->alias = "NewTemplate";
	$template->derivedFrom = "Root";
	$template->displayNameExpression = "Test PHP CI";
	$template->description = "Testing template creating from PHP";
	$template->template = "true";
	
	$attr1->alias = "a1";
	$attr1->type = "xs:string";
	$attr1->description = "Test attribute";
	$template->attributes[0] = new SoapVar($attr1, 0, "AttributeBean", "http://bean.utils.core.onecmdb.org");
	
	// Map it to correct namespace.
	$arg1[0] =  new SoapVar($template, 0, "CiBean", "http://bean.utils.core.onecmdb.org");

	// Create 100 instances
	for ($i = 0; $i < 100; $i++) {
		// Generate instance
		$arg1[] = getInstance("instance-$i");
	}
	
	$count = count($arg1);
	print("<h1>Example - Create/Delete $count CI:s</h1>");
	$updateStart = time();
	
	// Create all CI's
	$result = $client->update($token, $arg1, Null);
	$updateStop = time();
	$dtUpdate = $updateStop-$updateStart;
	$stop = time();
	$dt = $stop-$start;
	print("<h2>Create/Update Request took $dt [s], call to server $dtUpdate [s]</h2>");
	
		
	// Delete all created CI's
	$startDelete = time();
	$result = $client->update($token, Null, $arg1);
	$stopDelete = time();
	$dtDelete = $stopDelete - $startDelete;
	print("<h2>Delete Request ($result->rejected) took $dtDelete [s]</h2>");
?>
Example – Show history for a CI.
<?php

function showRFC($rfc) {
	
	print("<td>$rfc->ts</td>");
	print("<td>$rfc->issuer</td>");
	print("<td>$rfc->summary</td>");
	
}	
	/**
	 * Example - Show history of a CI.
	 */
	$wsdl_url = "http://localhost:8080/webservice/onecmdb?wsdl";
	
	$client = new SoapClient($wsdl_url);
	try {
		$token = $client->auth("admin", "123");	
	} catch (SoapFault $e) {
		print("Auth Error:::: $e");
	}

	
	
	try {
		// Ask for lastest changes 	
		$rfcQuery->fetchAttributes = "true";
		$rfcQuery->maxResult = "20";
		$rfcQuery->descendingOrder = "true";
		// Bind arggument to namespace.
		$arg1 = new SoapVar($rfcQuery, 0, "RfcQueryCriteria", "http://ccb.internal.core.onecmdb.org");
		
		$result = $client->history($token, Null, $arg1);
		
		// Show the result as a list
		print("<table border=\"1\">");
		print("<tr>");
		print("<th>Date</th>");
		print("<th>Issuer</th>");
		print("<th>Summary</th>");
		print("</tr>");
		
		// NOTE: If only one item is return in an array, it's not an array!
		if (is_array($result->RFCBean)) {
					
			foreach($result->RFCBean as $rfc) {
				print("<tr>");
				showRFC($rfc);
				print("</tr>");
			}
			
		} else {
				print("<tr>");				
				showRFC($result->RFCBean);
				print("</tr>");
		}
		print("</table>");
		 
	} catch (SoapFault $e) {
		print("Auth Error:::: $e");
	}
?>

Java using XFire client.

Example – Dump CI templates to XML.
/**
 * <code>Example1</code> retrieve all template CI and produce XML as output.
 */
public class Example1 {
	 
	
	public static void main(String argv[]) {
		// NOTE: no ?wsdl is needed here.
		String url = "http://localhost:8080/webservice/onecmdb";
		String username = "admin";
		String pwd = "123";
		String path = "/template/*";
		
		
		try {
			// Create the service
			Service serviceModel = new ObjectServiceFactory().create(IOneCMDBWebService.class);

			// Create a IOneCMDBWebService proxy instance.
			IOneCMDBWebService service = (IOneCMDBWebService)
			    new XFireProxyFactory().create(serviceModel, url);

		
			// Authenticate to OneCMDB.
			String token = service.auth(username, pwd);
			
			// Query for all templates.
			CiBean[] beanArray = service.query(token, path, "*");
			List<CiBean> beans = Arrays.asList(beanArray);
			
			// Generate XML for all templates to stdout.
			XmlGenerator gen = new XmlGenerator();
			gen.setBeans(beans);
			gen.transfer(System.out);
		} catch (Exception e) {
			System.err.println("ERROR:" + e.toString());
			e.printStackTrace();
		}
	}
}
Example – Import CI from an XML file.
/**
 * <code>Example2</code> import an XML file (myModel.xml) and update OneCMDB.
 * 
 */
public class Example2 {
	public static void main(String argv[]) {		
		String url = "http://localhost:8080/webservice/onecmdb";
		String username = "admin";
		String pwd = "123";
		String myFile = "file:myModel.xml";
		
		
		try {
			Service serviceModel = new ObjectServiceFactory().create(IOneCMDBWebService.class);

			IOneCMDBWebService service = (IOneCMDBWebService)
			    new XFireProxyFactory().create(serviceModel, url);

		
			String token = service.auth(username, pwd);
			
			XmlParser provider = new XmlParser();
			provider.addURL(myFile);
			
			// Parse the XML file.
			CiBean beans[] = provider.getBeans().toArray(new CiBean[0]);
			
			// Update OneCMDB.
			IRfcResult result = service.update(token, beans, null);
		
			// Check if the update was ok.
			if (result.isRejected()) {
				System.out.println("Error importing, cause : " + result.getRejectCause());
			} else {
				System.out.println("Import completed");
			}
		} catch (Exception e) {
			System.err.println("ERROR:" + e.toString());
			e.printStackTrace();
		}
	}
}


Example – Search for CI with paging.
/**
 * <code>Example3</code> search OneCMDB for instances with paging.
 */
public class Example3 {
	public static void main(String argv[]) {
		
		String url = "http://localhost:8080/webservice/onecmdb";
		String username = "admin";
		String pwd = "123";
		
		
		try {
			Service serviceModel = new ObjectServiceFactory().create(IOneCMDBWebService.class);

			IOneCMDBWebService service = (IOneCMDBWebService)
			    new XFireProxyFactory().create(serviceModel, url);

		
			String token = service.auth(username, pwd);
			
			int pageSize = 5;
			int offset = 0;
			// List all routers.
			QueryCriteria criteria = new QueryCriteria();
			criteria.setOffspringOfAlias("Router");
			criteria.setMatchCiInstances(true);
			criteria.setMaxResult(pageSize);
			
			
			int count = service.searchCount(token, criteria);
			System.out.println("Total router instances : " + count);
			
			// Search for CI with paging.
			while(offset < count) {
				criteria.setFirstResult(offset);
				CiBean[] beanArray = service.search(token, criteria);
				System.out.println("Retrieved " + beanArray.length + " routers");
				offset += pageSize;
			}
			
		} catch (Exception e) {
			System.err.println("ERROR:" + e.toString());
			e.printStackTrace();
		}
	}
}
Example – Delete CI.
/**
 * <code>Example4</code> Delete CI from OneCMDB.
 */
public class Example4 {
	public static void main(String argv[]) {

		String url = "http://localhost:8080/webservice/onecmdb";
		String username = "admin";
		String pwd = "123";


		try {
			Service serviceModel = new ObjectServiceFactory().create(IOneCMDBWebService.class);

			IOneCMDBWebService service = (IOneCMDBWebService)
			new XFireProxyFactory().create(serviceModel, url);


			String token = service.auth(username, pwd);

			// Create 10 router instances.
			List<CiBean> list = new ArrayList<CiBean>();
			for (int i = 0; i < 10; i++) {
				list.add(new CiBean("Router", "ri-" + i, false));
			}

			// Update OneCMDB.
			IRfcResult result = service.update(token, list.toArray(new CiBean[0]), null);
			if (result.isRejected()) {
				System.out.println("Can't add instances cause " + result.getRejectCause());
				System.exit(-1);
			}	
			System.out.println("Instances added");
				
			// Now delete all of them.
			// Note that the list is added as the last argument.
			result = service.update(token, null, list.toArray(new CiBean[0]));
			if (result.isRejected()) {
				System.out.println("Can't delete instances cause " + result.getRejectCause());
				System.exit(-1);
			}	
			System.out.println("Instances deleted");
	

		} catch (Exception e) {
			System.err.println("ERROR:" + e.toString());
			e.printStackTrace();
		}
	}
}
Example – View last modified CI.

Description on Web Service Data Types

Short summary of argument objects used in web service interface. Details about each data type is found in the WSDL.

CiBean

Direction : input and output

Namespace : http://bean.utils.core.onecmdb.org

Defines a CI. It contains list of attributes and values.

Attributes:

id
The back end id of the CI, read-only.
alias
Alias name of this CI
derivedFrom
Alias name of derived from template.
template
Is the CI a template or instance.
description
Description for the CI.
displayNameExpression
The display name expression, not evaluated.
displayName
The evaluated display name. (Read-Only)
attributes
A list of all(derived and local) attributes for this CI. Will only be filled in when the CI is a template.
attributeValues
A list of all attribute values for this CI.

AttributeBean

Direction : input and output

Namespace: http://bean.utils.core.onecmdb.org

Defines an attribute definition for a CI.

Attributes:

alias
The alias for this attribute.
displayName
The display name for this attribute.
complexType
If the complexType is true the value is a reference (alias name) to another CI.
type
The type alias
refType
The reference type alias, can be null if no reference type is required.
maxOccurs
The max occurrence of this attribute.
minOccurs
The min occurrence of this attribute.
description
The description for the attribute.
id
The back end id.(Read-Only)
derived
If this attribute is defined on this template. (Read-Only)

ValueBean

Direction : input and output

Namespace: http://bean.utils.core.onecmdb.org

Defines a value for a CI.

Attributes:

id
The back end id, Read-Only.
alias
The attribute alias name
value
The actual value, can be complex meaning it's an alias.
complexValue
Indicates if the value is complex.
beanValue
The value as another CiBean.

RfcQueryCriteria

Direction : input

Namespace: http://ccb.internal.core.onecmdb.org

Object used to query OneCMDB on CI changes.

Attributes:

rfcClass
Which RFC type (class) should be included in the query. The change classes avaliable are (If not set all changes will be queried for):
org.onecmdb.core.internal.ccb.rfc.RFCNewCi
org.onecmdb.core.internal.ccb.rfc.RFCNewAttribute
org.onecmdb.core.internal.ccb.rfc.RFCDestroy
org.onecmdb.core.internal.ccb.rfc.RFCModifyAlias
org.onecmdb.core.internal.ccb.rfc.RFCModifyAttributeType
org.onecmdb.core.internal.ccb.rfc.RFCModifyAttributeReferenceType
org.onecmdb.core.internal.ccb.rfc.RFCModifyDerivedAttributeValue
org.onecmdb.core.internal.ccb.rfc.RFCModifyAttributeValue
org.onecmdb.core.internal.ccb.rfc.RFCModifyDescription
org.onecmdb.core.internal.ccb.rfc.RFCModifyIsTemplate
org.onecmdb.core.internal.ccb.rfc.RFCModifyDescription
org.onecmdb.core.internal.ccb.rfc.RFCModifyDisplayNameExpression
org.onecmdb.core.internal.ccb.rfc.RFCModifyMaxOccurs
org.onecmdb.core.internal.ccb.rfc.RFCModifyMinOccurs
fromDate
Change occurred from.
toDate
Change occurred until.
descendingOrder
Time order of the result, default is false.
maxResult
How many changes should be returned. Used with firstResult paging of changes can be accomplished.
firstResult
How many changes should be skipped. Used with maxResult paging of changes can be accomplished.
fetchAttributes
Query for changes on all attributes on the CI. Default only changes on CI's is queried for.
attributeAlias
Query for changes on a specific attribute alias.

RFCBean

Direction : output

Namespace: http://wsdl.utils.core.onecmdb.org

Is the result set when query for history on a CI.

id
The back end id for this RFC.
issuer
The user committing the change.
ts
When the change occurred.
summary
A summary of the change.
transactionId
The back end id for the enclosing transaction.

QueryCriteria

Direction : input

Namespace: http://model.internal.core.onecmdb.org

Object used to query OneCMDB for CI. Support paging and free text search.

Description of attributes:

offspringOfId
Only search for offspring's on an id.
offspringOfAlias
Only search for offspring's on an alias.
matchCiTemplates
match CI template
matchCiInstances
match CI instance
matchAttributeTemplates
match attribute template, meaning the definition of an attribute.
matchAttributeInstances
match attribute instance, meaning the values of an attribute.
maxResult
Amount to return.
firstResult
Skip items until the firstResult.
matchAttribute
Match on attributes
matchCi
Match on CI.
text
Free text to search for. Will always use wild card before and after to match.
textMatchAlias
Text matching on alias.
textMatchValue
Text matching on value.
textMatchDescription
Text matching on description.

IRfcResult

Direction : output

Namespace: http://core.onecmdb.org

The result of an update command.

Description of attributes:

rejected
Reflects if a commit changes was rejected or not. If it was rejected a reject cause can be obtained from rejectCause.
rejectCause
The main cause for a rejection. If not rejected null is returned.
Community and support