获取配置项类型的明细



要获取某个配置项类型的明细,使用以下URL:

http://<servername>:<portnumber>/api/cmdb/citype/<CI Type>

假设您的AssetExplorer运行在本地服务器的8080端口,则示例URL为:

http://localhost:8080/api/cmdb<CI Type>


关键参数:

  1. 操作名称 - 属性名称为:"OPERATION_NAME",值为:"read"。

  2. 技术员密钥 - 属性名称为:"TECHNICIAN_KEY",值为:密钥的值。


注意:  

  • CI Type - 必填项. 配置项类型的名称,区分大小写

  • 参数: Result Format - 可选项,指定返回结果的格式 ( XML 或 JSON )

  • 如果不指定该参数,则API将返回JSON 格式的结果。



XML格式的输出:

 

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 格式的输出:

 

 

{
    "API": {
        "response": {
            "result": {
                "created-date": "Sep 2, 2013 01:02 PM",
                "field-names": {
                    "name": [
                        {
                            "type": "String",
                            "content": "Attribute Name"
                        },
                        {
                            "type": "String",
                            "content": "Data Type"
                        }
                    ]
                },
                "message": "Successfully fetched.",
                "field-values": {
                    "record": [
                        {
                            "value": [
                                "Availability Target(%)",
                                "String"
                            ]
                        },
                        {
                            "value": [
                                "Service Support Hours",
                                "String"
                            ]
                        },
                        {
                            "value": [
                                "Cost",
                                "String"
                            ]
                        },
                        {
                            "value": [
                                "Incident restoration target",
                                "String"
                            ]
                        },
                        {
                            "value": [
                                "Owned By",
                                "String"
                            ]
                        },
                        {
                            "value": [
                                "Business Impact",
                                "String"
                            ]
                        },
                        {
                            "value": [
                                "CI Name",
                                "String"
                            ]
                        },
                        {
                            "value": [
                                "Site",
                                "String"
                            ]
                        },
                        {
                            "value": [
                                "Description",
                                "String"
                            ]
                        }
                    ],
                    "totalRecords": "10"
                },
                "status": "Success",
                "statuscode": "200"
            }
        },
        "version": "1.0"
    }
}

 

 



Copyright © 2015 卓豪(北京)技术有限公司版权所有