要获取某个配置项类型的明细,使用以下URL:
http://<servername>:<portnumber>/api/cmdb/citype/<CI Type>
假设您的AssetExplorer运行在本地服务器的8080端口,则示例URL为:
http://localhost:8080/api/cmdb<CI Type>
关键参数:
操作名称 - 属性名称为:"OPERATION_NAME",值为:"read"。
技术员密钥 - 属性名称为:"TECHNICIAN_KEY",值为:密钥的值。
|
注意:
如果不指定该参数,则API将返回JSON 格式的结果。 |
Note: Please note that the Input and Output XML formats have been changed.
<?xml version="1.0" encoding="UTF-8"?>
<API version="1.0">
<response>
<result>
<statuscode>200</statuscode>
<status>Success</status>
<message>Successfully fetched.</message>
<created-date>Sep 2, 2013 01:02 PM</created-date>
<field-names>
<name type="String">Attribute Name</name>
<name type="String">Data Type</name>
</field-names>
<field-values totalRecords="10">
<record>
<value>Availability Target(%)</value>
<value>String</value>
</record>
<record>
<value>Service Support Hours</value>
<value>String</value>
</record>
<record>
<value>Cost</value>
<value>String</value>
</record>..................................
..................................
..................................
..................................
<record>
<value>Incident restoration target</value>
<value>String</value>
</record>
<record>
<value>Site</value>
<value>String</value>
</record>
<record>
<value>Description</value>
<value>String</value>
</record>
</field-values>
</result>
</response>
</API>
JSON 格式的输出:
|