Develop > Developer Reference > Using APIs > Universal CMDB API > General Structure of an Application

General Structure of an Application

There is only one static factory, the UcmdbServiceFactory. This factory is the entry point for an application. The UcmdbServiceFactory exposes getServiceProvider methods. These methods return an instance of the UcmdbServiceProvider interface.

The client creates other objects using interface methods. For example, to create a new query definition, the client:

  1. Gets the query service from the main CMDB service object.

  2. Gets a query factory object from the service object.

  3. Gets a new query definition from the factory.

    UcmdbServiceProvider provider =
       UcmdbServiceFactory.getServiceProvider(HOST_NAME, PORT);
    UcmdbService ucmdbService =
       provider.connect(provider.createCredentials(USERNAME,
       PASSWORD), provider.createClientContext("Test"));
    TopologyQueryService queryService = ucmdbService.getTopologyQueryService();
    TopologyQueryFactory factory = queryService.getFactory();
    QueryDefinition queryDefinition = factory.createQueryDefinition("Test Query");
    queryDefinition.addNode("Node").ofType("host");
    Topology topology = queryService.executeQuery(queryDefinition);
    System.out.println("There are " + topology.getAllCIs().size() + " hosts in uCMDB");
    

The services available from UcmdbService are:

Service Methods Use
getAuthorizationModelService Perform authorization operations (create users and user groups, assign roles to users and groups, and so on).
getClassModelService Information about types of CIs and relations
getConfigurationService Infrastructure settings management, for server configuration
getDataStoreMgmtService Query data store information including which CIs and attributes will be federated.
getDDMConfigurationService Configure the Data Flow Management system
getDDMManagementService Analyze and view the progress, results, and errors of the Data Flow Management system
getDDMZoneService Import and export management zones (with their activities).
getHistoryService Information about history of monitored CIs (changes, removals, and so on)
getImpactAnalysisService Run impact analysis scenario (also known as correlation).
getLicensingService Query information about licenses installed in the system.
getMultipleCMDBService Convert between global IDs and UCMDB IDs.
getMultiTenancyService Create, read, update, and delete tenants.
getPersistencyService Persist binary data into key-value pairs.
getQueryManagementService Manage access to queries - save, delete, list existing. Also provides query validation and discovery of queries dependencies.
getReconciliationService Supplies identification and merging capabilities.
getResourceBundleManagementService Resource tagging ("bundling" services). Allows explicit creation of new tags and removal of tags from all tagged resources.
getResourceManagementService Deploy resource packages (of TQL queries, views, users, and so on) to the system.
getSecurityService Verify whether credentials are valid.
getServerService Query generic information about the system.
getSnapshotService Provide services for managing snapshots (get, save, compare, and so on)
getSoftwareSignatureService Define software items to be discovered by the Data Flow Management system
getStateService Provide services for managing states (list, add, remove, and so on)
getSystemHealthService Provide system health services (basic system performance indicators, capacity and availability metrics)
getTopologyQueryService

Get information about the IT universe

Note Starting with version 10.00, you can not get the discoveryjob CI Type instance, because it is saved in Unified Resource Manager (URM). You can use DDMConfigurationService instead. For more details, see KM02529119.

getTopologyUpdateService Change information in the IT universe
getUcmdbVersion Query UCMDB and content pack versions and build information.
getViewArchiveService View result archiving services. Allows saving the current view result and retrieving previously saved results.
getViewService View execution service (execute definition, execute saved) and management service (save, delete, list existing). Also provides view validation and dependencies discovery.

The client communicates with the server over HTTP(S).