Examples

GET /api/host_statuses
200
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "name": "Build",
      "description": null,
      "ok_total_path": "/hosts?search=build_status+%3D+pending+OR+build_status+%3D+built",
      "ok_owned_path": "/hosts?search=owner+%3D+current_user+AND+%28build_status+%3D+pending+OR+build_status+%3D+built%29",
      "warn_total_path": null,
      "warn_owned_path": null,
      "error_total_path": "/hosts?search=build_status+%3D+token_expired+OR+build_status+%3D+build_failed",
      "error_owned_path": "/hosts?search=owner+%3D+current_user+AND+%28build_status+%3D+token_expired+OR+build_status+%3D+build_failed%29",
      "details": [
        {
          "label": "Pending installation",
          "global_status": 0,
          "total": 0,
          "owned": 0,
          "total_path": "/hosts?search=build_status+%3D+pending",
          "owned_path": "/hosts?search=owner+%3D+current_user+AND+%28build_status+%3D+pending%29"
        },
        {
          "label": "Installed",
          "global_status": 0,
          "total": 0,
          "owned": 0,
          "total_path": "/hosts?search=build_status+%3D+built",
          "owned_path": "/hosts?search=owner+%3D+current_user+AND+%28build_status+%3D+built%29"
        },
        {
          "label": "Token expired",
          "global_status": 2,
          "total": 0,
          "owned": 0,
          "total_path": "/hosts?search=build_status+%3D+token_expired",
          "owned_path": "/hosts?search=owner+%3D+current_user+AND+%28build_status+%3D+token_expired%29"
        },
        {
          "label": "Installation error",
          "global_status": 2,
          "total": 0,
          "owned": 0,
          "total_path": "/hosts?search=build_status+%3D+build_failed",
          "owned_path": "/hosts?search=owner+%3D+current_user+AND+%28build_status+%3D+build_failed%29"
        }
      ]
    }
  ]
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, ‘all’ to return all results

Validations:

  • Must match regular expression /\A([1-9]\d|all)\Z$/.