Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated the code macro with the following parameter(s): [theme]
Scroll ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue
#F0F0F0#F0F0F0

3

Scroll export button
scopecurrent
template-id4fda9400-a7df-4ede-a95f-e4ae5fcf4796
captionDownload this Page
add-onScroll PDF Exporter

You can link CIs with other CIs using the following API Request. 

To authenticate the below API, see API Authentication and Authorization.

Service NameHTTP Method
CMDB_CreateCIRelations

POST


Below is the sample request to link a CI.

theme
Code Block
DJangotitleSample Request
linenumberstrue
{
  "ServiceName": "CMDB_CreateCIRelations",
  "objCommonParameters": {
    "_ProxyDetails": {
      "ProxyID": 0,
      "ReturnType": "JSON",
      "APIKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "AuthType": "APIKEY"
    },
    "_CMDBCIRelations": {
      "SourceKey": "CIID",
      "TargetKey": "CIID",
      "SourceType": "CI",
      "TargetType": "CI",
      "SourceValue": "354",
      "Relationship": "Parent",
      "TargetValues": "340"
    }
  }
}

Anchor
Request Parameters
Request Parameters
Request Parameters

Parameter NameMandatoryDescriptionTypeLinking Type and Parameter Values
CI-CICI-ServiceService-CI

SourceKey

Status
colourGreen
titletrue

Description

Status
colourGreen
titlestring

The value can be one of the following: 

  • CIID
  • HostName 
  • SerialNo 
  • IP Address

The value can be one of the following: 

  • CIID
  • HostName 
  • SerialNo 
  • IP Address
The value is either Service ID or ServiceName.

TargetKey

Status
colourGreen
titletrue

Name of the Source.

Status
colourGreen
titlestring

The value can be one of the following: 

  • CIID
  • HostName 
  • SerialNo 
  • IP Address
The value is either ServiceID or ServiceName.

The value can be one of the following: 

  • CIID
  • HostName 
  • SerialNo 
  • IP Address

SourceType

Status
colourGreen
titletrue

Name of the Target.

Status
colourGreen
titlestring

The value is CI.

The value is CI.The value is Service.

TargetType

Status
colourGreen
titletrue

Type of Source.

Status
colourGreen
titlestring

The value is CI.

The value is Service.The value is CI.

SourceValue

Status
colourGreen
titletrue

Type of Target.

Status
colourGreen
titlestring

or

Status
titleInteger

Note:

If the Sourcekey parameter value is CIID, the SourceValue parameter value must be numeric or else string.


Note:

If the Sourcekey parameter value is ServiceID, the SourceValue parameter value must be numeric or else string.

Relationship

Status
colourGreen
titletrue

Value of the Source.

Status
colourGreen
titlestring

Note:

The Relationship parameter value must not be Service if the SourceKey and Targetkey parameter values are any of the following: 

  • CIID
  • HostName 
  • SerialNo 
  • IP Address

Note:

The Relationship parameter value must be Service if the SourceKey parameter value is one of the following:

  • CIID
  • HostName 
  • SerialNo 
  • IP Address

TargetValues

Status
colourGreen
titletrue

Relationship between the Source and Target.

Status
colourGreen
titlestring

or

Status
titleInteger

Note:

If the TargetKey parameter value is CIID, the TargetValues parameter value must be numeric or else string.

Note:

If the TargetKey parameter value is ServiceID, the TargetValues parameter value must be numeric or else string.

Note:

If the TargetKey parameter value is CIID, the TargetValues parameter value must be numeric or else string.


DJango
Code Block
theme
titleSample Response
linenumberstrue
{
  "Errors": "",
  "Message": "CMDB CI Relations created successfully!",
  "Output": "",
  "TokenID": null,
  "OrgID": 0,
  "OutputObject": null,
  "OutputID": 0,
  "Input": null
}

Status and Error Codes

For more information, see Status and Error Messages

Scroll ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue
1

| |