Update the CMDB

You update the CMDB with the update APIs. For details of the API methods, see UCMDB Update Methods. For examples of the use of the update methods, see Update Example.

UCMDB Update Parameters

This topic describes the parameters used only by the service's update methods. For more details, see the schema documentation.

  • CIsAndRelationsUpdates

    The CIsAndRelationsUpdates type consists of CIsForUpdate, relationsForUpdate, referencedRelations, and referencedCIs. A CIsAndRelationsUpdates instance does not necessarily include all three elements.

    CIsForUpdate is a CIs collection. relationsForUpdate is a Relations collection. The CI and relation elements in the collections have a props element. When creating a CI or relation, properties that have either the required attribute or the key attribute in the CI Type definition must be populated with values. The items in these collections are updated or created by the method.

    referencedCIs and referencedRelations are collections of CIs that are already defined in the CMDB. The elements in the collection are identified with a temporary ID in conjunction with all the key properties. These items are used to resolve the identities of CIs and relations for update. They are never created or updated by the method.

    Each of the CI and relation elements in these collections has a properties collection. New items are created with the property values in these collections.

    For details, see CIsAndRelationsUpdates.

Use of ID Types with Update Methods

The following describes ID CITs, and CIs and relations. When the ID is not a real CMDB ID, the type and key attributes are required.

  • Deleting or Updating Configuration Items

    A temporary or empty ID may be used by the client when calling a method to delete or update an item. In this case, the CI type and the Key Attributes that identify the CI must be set.

  • Deleting or Updating Relations

    When deleting or updating relations, the relation ID can be empty, temporary, or real.

    If a CI's ID is temporary, the CI must be passed in the referencedCIs collection and its key attributes must be specified. For details, see referencedCIs in Update the CMDB.

  • Inserting New Configuration Items into the CMDB

    It is possible to use either an empty ID or a temporary ID to insert a new CI. However, if the ID is empty, the server cannot return the real CMDB ID in the structure createIDsMap because there is no clientID. For details, see addCIsAndRelations and UCMDB Query Methods.

  • Inserting New Relations into the CMDB

    The relation ID can be either temporary or empty. However, if the relation is new but the configuration items on either end of the relation are already defined in the CMDB, then those CIs that already exist must be identified by a real CMDB ID or be specified in a referencedCIs collection.