Beispiele

GET /api/hosts
200
{
  "total": 10,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": "host650.example361.com",
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "ip": "0.0.0.98",
      "ip6": null,
      "environment_id": null,
      "environment_name": null,
      "last_report": null,
      "mac": "00:53:67:ab:00:7d",
      "realm_id": null,
      "realm_name": null,
      "sp_mac": "00:43:56:cd:00:0b",
      "sp_ip": "1.0.0.7",
      "sp_name": null,
      "domain_id": 759776793,
      "domain_name": "example361.com",
      "architecture_id": 578327787,
      "architecture_name": "x86_64-361",
      "operatingsystem_id": 1073012858,
      "operatingsystem_name": "operatingsystem180 192",
      "subnet_id": null,
      "subnet_name": null,
      "subnet6_id": null,
      "subnet6_name": null,
      "sp_subnet_id": null,
      "ptable_id": 1007981802,
      "ptable_name": "ptable284",
      "medium_id": 1011586648,
      "medium_name": "medium183",
      "pxe_loader": "Grub2 UEFI",
      "build": false,
      "comment": null,
      "disk": null,
      "installed_at": null,
      "model_id": null,
      "hostgroup_id": null,
      "owner_id": 886836129,
      "owner_name": "apiadmin User",
      "owner_type": "User",
      "enabled": true,
      "managed": true,
      "use_image": null,
      "image_file": "",
      "uuid": null,
      "compute_resource_id": null,
      "compute_resource_name": null,
      "compute_profile_id": null,
      "compute_profile_name": null,
      "capabilities": [
        "build"
      ],
      "provision_method": "build",
      "certname": "host650.example361.com",
      "image_id": null,
      "image_name": null,
      "created_at": "2019-11-07 08:39:29 UTC",
      "updated_at": "2019-11-07 08:39:29 UTC",
      "last_compile": null,
      "global_status": 0,
      "global_status_label": "OK",
      "uptime_seconds": null,
      "organization_id": 447626438,
      "organization_name": "Organization 1",
      "location_id": 255093256,
      "location_name": "Location 1",
      "puppet_status": 0,
      "model_name": null,
      "build_status": 0,
      "build_status_label": "Installed",
      "name": "host650.example361.com",
      "id": 51,
      "puppet_proxy_id": null,
      "puppet_proxy_name": null,
      "puppet_ca_proxy_id": null,
      "puppet_ca_proxy_name": null,
      "puppet_proxy": null,
      "puppet_ca_proxy": null,
      "hostgroup_name": null,
      "hostgroup_title": null
    }
  ]
}

Parameter

Parametername Beschreibung
thin
optional

Nur Kennung und Namen von Hosts auflisten

Validations:

  • Must be one of: true, false, 1, 0.

hostgroup_id
optional

Kennung der Hostgruppe

Validations:

  • Must be a String

location_id
optional

Standortkennung

Validations:

  • Must be a String

organization_id
optional

Kennung der Organisation

Validations:

  • Must be a String

environment_id
optional

Umgebungskennung

Validations:

  • Must be a String

include
optional

Array of extra information types to include

Validations:

  • Must be one of: parameters, all_parameters.

search
optional

Ergebnisse filtern

Validations:

  • Must be a String

order
optional

Feld und Reihenfolge sortieren, z.B. ‘id DESC’

Validations:

  • Must be a String

page
optional

Seitennummer, beginnend bei 1

Validations:

  • Must be a number.

per_page
optional

Anzahl der angezeigten Ergebnisse pro Seite

Validations:

  • Must be a number.

Suchfelder

Feld Name Typ Mögliche Werte
architecture string
boot_time datetime
build true, false
class string
comment text
compute_resource string
compute_resource_id integer
config_group string
created_at datetime
domain string
domain_id integer
environment string
facts string
global_status ok, warning, error
has_ip string
has_mac string
hostgroup string
hostgroup_fullname string
hostgroup_id integer
hostgroup_name string
hostgroup_title string
image string
installed_at datetime
ip string
last_report datetime
location string
location_id integer
mac string
managed true, false
model string
name string
organization string
organization_id integer
origin string
os string
os_description string
os_id integer
os_major string
os_minor string
os_title string
owner string
owner_id integer
owner_type string
params string
params_name string
parent_hostgroup string
puppet_ca string
puppet_proxy_id integer
puppetmaster string
realm string
realm_id integer
smart_proxy string
status.applied integer
status.enabled true, false
status.failed integer
status.failed_restarts integer
status.interesting true, false
status.pending integer
status.restarted integer
status.skipped integer
subnet string
subnet.name text
subnet6 string
subnet6.name text
user.firstname string
user.lastname string
user.login string
user.mail string
usergroup string
usergroup.name string
uuid string