Feature #20072

API to fetch list of hosts without full host details

Added by Tomer Brisker 10 months ago. Updated 10 months ago.

Status:Closed
Priority:Normal
Assigned To:Tomer Brisker
Category:Inventory
Target version:-
Difficulty: Bugzilla link:1461194
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4609
Story points-
Velocity based estimate-
Release1.16.0Release relationshipAuto

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1461194

Description of problem:

A couple of users have expressed interest in a "host list only" API. This would be useful when scripting and looping over lots of hosts. If it took the same params as the existing /hosts api but returned only the host ID and hostname, that would be ideal.

There are a performance issues with the existing /hosts API call that are being addressed1; however even if it was lightning fast, a more minimal result set is still useful for scripting.

This is similar to Spacewalk's listActiveSystems call2 which does not return system details. The RFE came about from users with spacewalk scripts that run much slower after porting to Katello.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1445623
[2] http://www.spacewalkproject.org/documentation/api/2.3/handlers/SystemHandler.html#listActiveSystems

Associated revisions

Revision 71c08300
Added by Tomer Brisker 10 months ago

Fixes #20072 - Allow thin host list via API

History

#1 Updated by Tomer Brisker 10 months ago

  • Status changed from New to Assigned
  • Assigned To set to Tomer Brisker

#2 Updated by The Foreman Bot 10 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4609 added

#3 Updated by Anonymous 10 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Tomer Brisker 10 months ago

  • Release set to 1.16.0

Also available in: Atom PDF