This method makes it possible to add a relationship to CMDB through a REST web service. The recorded relationship will be available in CMDB in asset data.
Input parameters
|
ID #
|
Constant value
|
Parameter
|
Type
|
Description
|
cdprod
|
109
|
QUERY
|
NUMERIC
|
Product code
|
classname
|
CMDBInsertRelationshipInterface
|
QUERY
|
STRING
|
Class name used in WADL
|
classpath
|
ast_import
|
QUERY
|
STRING
|
Path to the class used in WADL
|
Request body
|
{
"TypeFrom": "string",
"IdentifierFrom": "string",
"TypeTo": "string",
"IdentifierTo": "string"
"RelationshipName": "string",
"ReverseRelationship": "string"
}
|
Output parameter
|
{
"success": true,
"total": 1,
"results": [
{
"Result": true,
"Code": 1
}
]
}
|
To enter each of these request items it is necessary to follow the pattern documented below.
Request
|
ID #
|
Required
|
Description
|
TypeFrom
|
X
|
Source object type:
1 - Asset;
2 – Process;
3 – Process activity.
|
IdentifierFrom
|
X
|
Source object ID #
|
TypeTo
|
X
|
Destination object type:
1 - Asset;
2 – Process;
3 – Process activity.
|
IdentifierTo
|
X
|
Destination object ID #
|
RelationshipName
|
X
|
Relationship name
|
ReverseRelationship
|
X
|
Reverse relationship:
1 – Yes;
2 – No.
|
|