示例

POST /api/hosts/facts
{
  "name": "brslc022.brs.infineon.com",
  "facts": {
    "is_virtual": "true",
    "processorcount": "2",
    "serialnumber": "VMware-56 4d 15 06 72 86 a9 d3-8a 09 fc 27 5a cf 00 45",
    "kernel": "Linux",
    "virtual": "vmware",
    "_timestamp": "2010-02-16 12:52:38.163833 +01:00",
    "network_eth0": "172.29.205.0",
    "operatingsystemrelease": "4",
    "uniqueid": "1dac16cd",
    "hardwaremodel": "i686",
    "rubysitedir": "/usr/lib/site_ruby/1.8",
    "platform": "Linux_2.6_i386_all",
    "uptime_seconds": "3756",
    "lsbrelease": ":core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch",
    "memorysize": "1.45 GB",
    "gi": "4",
    "netmask_eth0": "255.255.255.128",
    "ipaddress": "172.29.205.22",
    "physicalprocessorcount": "0",
    "swapfree": "1.95 GB",
    "vmware": "virtual",
    "netmask": "255.255.255.128",
    "clientversion": "0.24.8",
    "fqdn": "brslc022.brs.infineon.com",
    "timezone": "GMT",
    "ps": "ps -ef",
    "kernelrelease": "2.6.9-89.0.16.ELsmp",
    "hardwareisa": "i686",
    "domain": "brs.infineon.com",
    "type": "Other",
    "kernelversion": "2.6.9",
    "id": "root",
    "lsbdistdescription": "Red Hat Enterprise Linux AS release 4 (Nahant Update 8)",
    "uptime_hours": "1",
    "lsbdistrelease": "4",
    "macaddress_eth0": "00:0C:29:CF:00:45",
    "manufacturer": "VMware, Inc.",
    "memoryfree": "1.39 GB",
    "selinux": "false",
    "gateway_if": "eth0",
    "lsbdistcodename": "NahantUpdate8",
    "sshrsakey": "AAAAB3NzaC1yc2EAAAABIwAAAIEAyj0XAKzx4WlNE8Vzj0ABBEHxqHr2H4AZZnabnQkYTOfz5kObXL+BvYqPONg2EqeUYCTNaFtQQPpJ4H+TM+GCJDNvFEKJTRd+cFoOuramf9LunWN/+ETreQ5V8KhKvdYTNw5blPBKiQz/XxSxcm7beo5QiBVr/lOM0u8YhGTLawk=",
    "uptime_days": "0",
    "interfaces": "eth0",
    "hostname": "brslc022",
    "graphcard": "VMware",
    "uptime": "1:02 hours",
    "processor0": "Intel(R) Xeon(R) CPU           X5460  @ 3.16GHz",
    "puppetversion": "0.24.8",
    "productname": "VMware Virtual Platform",
    "architecture": "i386",
    "gateway": "172.29.205.1",
    "rubyversion": "1.8.1",
    "environment": "brs_test",
    "path": "/usr/bin:/sbin:/bin:/usr/sbin:/opt/csw/bin",
    "swapsize": "1.95 GB",
    "ipaddress_eth0": "172.29.205.22",
    "facterversion": "1.5.7",
    "kernelmajversion": "2.6",
    "operatingsystem": "RedHat",
    "macaddress": "00:0C:29:CF:00:45",
    "processor1": "Intel(R) Xeon(R) CPU           X5460  @ 3.16GHz",
    "lsbmajdistrelease": "4",
    "sshdsakey": "AAAAB3NzaC1kc3MAAACBAIUasO2eEvlRHfcO8wMPfbo98YfgVsJj0qhUDSSoSa6xmYI8QWBDMoxf1h8INiDfrNQ5e4VreLQjt4/2Ex7OXoeB7C9Cg18/TlfZU+RTNMdsL85W5hQrrKoBm+ksMnxidkDC66ROq+pmxBTGDwwxg3ugF8eZnVSzCZ1FE605AsStAAAAFQCrr3s1cLQFRc6oZJAx3EZDxDraCQAAAIBqIqIvY7KtRsI+8y8E5MSZXpRRZxf0zqbraDxASwzImUr6ysEmpJsHbHyi6UePnF55tG/iZNM4bSNg/3qExK8So040byV71qN4HNT48nIh3cCS0z8oKLqvlCRJ+dOY1QMkE8ZLfOyF4A6ZOTuE8TTsGpvUIR0HyXkpoiIR9XcgzgAAAIA4nkedBQi+VA01NvWx27GGz5P3TTQ36yDODZdLmXoepQM1rPfKWvPFFd5MxgJumSU5BKhYUiQTOImcRlQcY5DA3dGbog1dOAKlWyeJn4WRHbYr+VNgR/HwBzHLMW4TXLt38ThmPv9TiLS1RvTdHuDm2oRTadNZOrmQz619kZejmw==",
    "lsbdistid": "RedHatEnterpriseAS"
  },
  "host": {
    "name": "brslc022.brs.infineon.com"
  }
}
403
{
  "error": {
    "message": "Access denied",
    "details": "Missing one of the required permissions: upload_facts",
    "missing_permissions": [
      "upload_facts"
    ]
  }
}

參數

參數名字 描述
location_id
選填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
選填

Set the current organization context for the request

Validations:

  • Must be a Integer

name
必填

主機的主機名稱

Validations:

  • Must be a String

facts
必填

包含主機詳情的雜湊

Validations:

  • Must be a Hash

certname
選填

選用性:主機的憑證名稱

Validations:

  • Must be a String

type
選填

選用性:欲建立之主機的 STI 類型

Validations:

  • Must be a String