获取配置项类型详细信息

要获取CI类型的详细信息,请使用以下URL:

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

假设您正在本地端口号为8080的服务器中获取CI类型的详细信息,则URL应为:

http://localhost:8080/api/cmdb/citype/BusinessService

关键点:

  1. 输入是以密钥"INPUT_DATA"作为"POST attribute"发送的XML字符串。

  2. 操作名"read"应通过密钥"OPERATION_NAME"作为"POST attribute"发送。

  3. 技术员密钥应通过密钥"TECHNICIAN_KEY"作为"POST attribute"发送。

注意

注意事项

    • CI类型-强制CI类型名称。不区分大小写)。

    • 参数Result Format - Optional指定返回格式(XML或JSON),如果未指定返回格式,则API将以JSON格式返回输出。

如果未指定结果格式,则API将以JSON格式返回输出


XML输出示例:


Note:Please note that theInputandOutput XMLformats have been changed.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<API version="1.0">
    <response>
        <operation name="read">
            <result>
                <statuscode>200</statuscode>
                <status>Success</status>
                <message>Successfully fetched.</message>
                <created-date>Aug 16, 2016 03:36 PM</created-date>
            </result>
            <Details>
                <field-names>
                    <name type="String">Attribute Name</name>
                    <name type="String">Data Type</name>
                    <name type="String">Description</name>
                </field-names>
                <field-values totalRecords="10">
                    <record>
                        <value>Cost</value>
                        <value>String</value>
                        <value>(null)</value>
                    </record>
                    <record>
                        <value>Incident restoration target</value>
                        <value>String</value>
                        <value>(null)</value>
                    </record>
                    <record>
                        <value>Service Support Hours</value>
                        <value>String</value>
                        <value>Hours spent for service.</value>
                    </record>
                    <record>
                        <value>Owned By</value>
                        <value>String</value>
                        <value>Technician who owns this service</value>
                    </record>
                    <record>
                        <value>Business Impact</value>
                        <value>String</value>
                        <value>(null)</value>
                    </record>
                    <record>
                        <value>Availability Target(%)</value>
                        <value>String</value>
                        <value>Availability target in percentage.</value>
                    </record>
                    <record>
                        <value>CI Name</value>
                        <value>String</value>
                    </record>
                    <record>
                        <value>Site</value>
                        <value>String</value>
                    </record>
                    <record>
                        <value>Description</value>
                        <value>String</value>
                    </record>
                </field-values>
            </Details>
        </operation>
    </response>
</API>


JSON 输出示例:


{
	"API": {
		"response": {
			"operation": {
				"result": {
					"message": "Successfully fetched.",
					"created-date": "Aug 16, 2016 03:35 PM",
					"status": "Success",
					"statuscode": "200"
				},
				"Details": {
					"field-names": {
						"name": [{
							"content": "Attribute Name",
							"type": "String"
						},
						{
							"content": "Data Type",
							"type": "String"
						},
						{
							"content": "Description",
							"type": "String"
						}]
					},
					"field-values": {
						"record": [{
							"value": ["Cost",
							"String",
							"(null)"]
						},
						{
							"value": ["Incident restoration target",
							"String",
							"(null)"]
						},
						{
							"value": ["Service Support Hours",
							"String",
							"Hours spent for service."]
						},
						{
							"value": ["Owned By",
							"String",
							"Technician who owns this service"]
						},
						{
							"value": ["Business Impact",
							"String",
							"(null)"]
						},
						{
							"value": ["Availability Target(%)",
							"String",
							"Availability target in percentage."]
						},
						{
							"value": ["CI Name",
							"String"]
						},
						{
							"value": ["Site",
							"String"]
						},
						{
							"value": ["Description",
							"String"]
						}],
						"totalRecords": "10"
					}
				},
				"name": "read"
			}
		},
		"version": "1.0"
	}
}