Feature #20516

API Hosts GET returning also owner_name

Added by Ivan Necas 12 months ago. Updated 8 days ago.

Status:Closed
Priority:Normal
Assignee:-
Category:API
Target version:1.17.0
Difficulty: Team Backlog:
Triaged: Fixed in Releases:
Bugzilla link:1478849 Found in Releases:
Pull request:https://github.com/theforeman/foreman/pull/4742

Description

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

Description of problem:
Currently GET of hosts returns only owner_id and owner_type. As an API user i would like to have also the owner_name for presentation and easier verification. The missing owner_name is also inconsistent with almost all other fields that have a _name variant available

[crash/LI] root@li-lc-1578:~# time curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999}" -XGET https://localhost/api/v2/hosts/7 | jq . | grep owner_
"owner_id": 1,
"owner_type": "User",

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. API GET hosts/x
2.
3.

Actual results:
There is no owner_name field returned

Expected results:
An owner_name with the login name of the owner is returned-

Additional info:

Associated revisions

Revision 558a7590
Added by Nagoor Shaik 10 months ago

Fixes #20516 - GET hosts API displays owner_name attribute

History

#1 Updated by Ivan Necas 12 months ago

  • Subject changed from API Hosts GET returning also owner_name to API Hosts GET returning also owner_name
  • Category changed from Unattended installations to API

#2 Updated by The Foreman Bot 11 months ago

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

#3 Updated by Daniel Lobato Garcia 10 months ago

  • Legacy Backlogs Release (now unused) set to 296

#4 Updated by Nagoor Shaik 10 months ago

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

Also available in: Atom PDF