Insert Topology

This call creates entities as described by the payload.

URL

/dataModel

Method

POST

Headers

Required:

Authorization: Bearer <token>

Note <token> is the token that is returned by the Authentication call.

Example:

Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0Njc5ODQ5MTcsImN1c3RvbWVyIjoxLCJ1c2VybmFtZSI6InN5c2FkbWluIn0.Ph8WHtzvpvfuH1j0CtwHqyBhX1uLlfhr0eQQ7m0_gT0

Request type

JSON

Response type

JSON

URL Parameters

Required: None

Optional: None

Payload

{
  cis: [
    {
      ucmdbId: [temp_id],
      type: [ucmdb_cit],
      properties: {
        <ucmdb_cit_prop>: [ucmdb_cit_prop_value],
        …
      }
    },
    …
  ],
  relations: [
    {
      ucmdbId: [temp_id],
      type: [ucmdb_cit],
      end1Id: [temp_id],
      end2Id: [temp_id],
      properties: {
        <ucmdb_cit_prop>: [ucmdb_cit_prop_value],
        …
      }
    },
    …
  ]
}

Note The (three dots) denotes that there can be 0 or more values.

Data Types:

[temp_id]

The string that represents a temporary ID of the objects. This temporary ID can be used for referring to the object inside this payload. For example, you can specify the two ends of a relationship, if you want to use an object that was defined in the same payload, use the object’s temporary ID.

[ucmdb_cit]

The string that represents the name of a valid CI Type from the UCMDB. You have to use the name of the CI Type, not the display name. The name of the CI Type can be found inside the CI Type Manager.

[ucmdb_cit_prop_value]

The property value, which can be integer, string, Boolean, long, double, ISO8601 date, or a list of values depending on the CIT property data type.

Custom fields:

<ucmdb_cit_prop>

The valid property name of the CI Type. You can get the name and the list of all properties of a CI Type from the CI Type Manager. You have to use the name of the property, not its display name.

Example:

{
     cis: [{
            ucmdbId: 1,
            type: node,
            properties: {
                  name: Test1
            }
      }, {
            ucmdbId: 2,
            type: node,
            properties: {
                  name: Test2
            }
      }],
      relations: [{
            ucmdbId: 3,
            type: managed_relationship,
            end1Id: 1,
            end2Id: 2,
            properties: {
            }
      }]
}

Success response

Code: 200

Content:

{
     addedCis: list of [ucmdb_id]
     removedCis: list of [ucmdb_id],
     updatedCis: list of [ucmdb_id],
     ignoredCis: list of [ucmdb_id]
}

Data Types:

[ucmdb_id]

The string that represents the UCMDB ID of a configuration item.

Example:

Code: 200

Content:

{
    addedCis: [
        4dc01bee04c76cc0ac4bb069f46e8b56,
        4b8416a13e686092b2a2e142ecceff46
    ],
    removedCis: [],
    updatedCis: [],
    ignoredCis: []
}

Error response

Code: 400

Content:

{
  error: [string]
} 

Example:

Code: 400

Content:

{
  error: The following error has occurred: Class "nodeo" is not defined in the class model. Please consult logs for more details
}

Note

The user that the token belongs to must have the required permissions for modifying the data inside UCMDB through the SDK.