Feature #2931
API v2 hosts JSON response, add *_name for each *_id
Description
Currently
host": {
"name": "fdev2.sat.lab.tlv.redhat.com",
"id": 394,
"ip": "10.35.27.3",
"operatingsystem_id": 42,
"environment_id": 1,
Wanted
host": {
"name": "fdev2.sat.lab.tlv.redhat.com",
"id": 394,
"ip": "10.35.27.3",
"operatingsystem_id": 42,
"operatingsystem_name": "Centos 6.3",
"environment_id": 1,
"environment_name": "Production",
Related issues
Associated revisions
History
#1
Updated by Tomáš Strachota almost 10 years ago
The same for *_ids -> *_names, please
#2
Updated by Joseph Magen almost 10 years ago
https://github.com/theforeman/foreman/pull/844
Default is *_name for all *_id fields. I would like to make this flexible for performance reasons if a user just wants fields=id,name
#3
Updated by Dominic Cleal almost 10 years ago
- Status changed from Assigned to Ready For Testing
- Target version set to 1.3.0
#4
Updated by Dominic Cleal almost 10 years ago
- Status changed from Ready For Testing to Assigned
The PR's been closed, but I think this is still needed, right?
#5
Updated by Dominic Cleal almost 10 years ago
- Related to Feature #2945: Extend AR to add getter/setter methods *_names similar to *_ids added
#6
Updated by Joseph Magen almost 10 years ago
Yes, PR to provide this functionality is merged, but the JSON rabl views have not been updated, so keep this issue open.
#7
Updated by Lukas Zapletal over 9 years ago
- Target version changed from 1.3.0 to 1.4.0
#8
Updated by Greg Sutcliffe over 9 years ago
- Target version deleted (
1.4.0)
#9
Updated by Joseph Magen over 9 years ago
- Target version set to 1.15.0
#11
Updated by Joseph Magen over 9 years ago
- Status changed from Assigned to Ready For Testing
#12
Updated by Dominic Cleal over 9 years ago
- Target version changed from 1.15.0 to 1.10.0
#13
Updated by Dominic Cleal over 9 years ago
- Legacy Backlogs Release (now unused) set to 2
#14
Updated by Anonymous over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 636e98303ff6166c1dfacbd675264bf1bb658124.
#15
Updated by Dominic Cleal over 9 years ago
- Has duplicate Bug #3098: _name for _id of associated resources are missing in API (rabl) added
fixes #2931 - API v2 hosts JSON response, add *_name for each *_id