要获取组织可用的CI类型数量,请使用以下URL格式:
http://<hostname>:<port>/api/cmdb/citype/count/
假设要获取与端口号为8080的本地服务器关联的CI类型的数量,则URL应指定为:
http://localhost:8080/api/cmdb/citype/count/
关键点:
操作名"GET"应通过密钥"OPERATION_NAME"作为"POST attribute"发送。
技术员密钥应通过密钥"TECHNICIAN_KEY"作为"POST attribute"发送。
注意事项: 如果未指定结果格式,则API将以JSON格式返回输出。
|
获取所有CI计数的JSON输出示例:
{
"API": {
"response": {
"result": {
"created-date": "Sep 2, 2013 01:01 PM",
"field-names": {
"name": {
"type": "Integer",
"content": "Count"
}
},
"message": "Successfully fetched.",
"field-values": {
"record": {
"value": "1"
},
"totalRecords": "1"
},
"status": "Success",
"statuscode": "200"
}
},
"version": "1.0"
}
}