要添加配置项之间的关系,请使用以下格式:
http://<hostname>:<portnumber>/api/cmdb/cirelationships
假设您要在本地服务器的端口号为8080的配置项之间添加关系,则URL应为:
http://localhost:8080/api/cmdb/cirelationships
关键点:
输入是以密钥"INPUT_DATA"作为"POST attribute"发送的XML字符串。
操作名"add"应通过密钥"OPERATION_NAME"作为"POST attribute"发送。
技术员密钥应通过密钥"TECHNICIAN_KEY"作为"POST attribute"发送。
注意事项: 如果未指定结果格式,则API将以JSON格式返回输出。
|
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?>
<API version="1.0" locale="en">
<records>
<relationships>
<addrelationship>
<toci>balaguru.zohocorpin.com</toci>
<relationshiptype>Connected to</relationshiptype>
<relatedcis>
<citype>CPU Cores</citype>
<ci>
<name>rack-012W23</name>
</ci>
</relatedcis>
<relatedcis>
<citype>Disks</citype>
<ci>
<name>disk-01123</name>
</ci>
</relatedcis>
<relatedcis>
<citype>Processors</citype>
<ci>
<name>Dual-Core-Procesor-011212</name>
</ci>
</relatedcis>
</addrelationship>
</relationships>
</records>
</API>