Project

General

Profile

Actions

Feature #2931

closed

API v2 hosts JSON response, add *_name for each *_id

Added by Joseph Magen about 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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 2 (0 open2 closed)

Related to Foreman - Feature #2945: Extend AR to add getter/setter methods *_names similar to *_idsClosedJoseph Magen08/18/2013Actions
Has duplicate Foreman - Bug #3098: _name for _id of associated resources are missing in API (rabl)DuplicateMartin Bacovsky09/16/2013Actions
Actions #1

Updated by Tomáš Strachota about 11 years ago

The same for *_ids -> *_names, please

Actions #2

Updated by Joseph Magen about 11 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

Actions #3

Updated by Dominic Cleal about 11 years ago

  • Status changed from Assigned to Ready For Testing
  • Target version set to 1.3.0
Actions #4

Updated by Dominic Cleal about 11 years ago

  • Status changed from Ready For Testing to Assigned

The PR's been closed, but I think this is still needed, right?

Actions #5

Updated by Dominic Cleal about 11 years ago

  • Related to Feature #2945: Extend AR to add getter/setter methods *_names similar to *_ids added
Actions #6

Updated by Joseph Magen about 11 years ago

Yes, PR to provide this functionality is merged, but the JSON rabl views have not been updated, so keep this issue open.

Actions #7

Updated by Lukas Zapletal about 11 years ago

  • Target version changed from 1.3.0 to 1.4.0
Actions #8

Updated by Greg Sutcliffe about 11 years ago

  • Target version deleted (1.4.0)
Actions #9

Updated by Joseph Magen about 11 years ago

  • Target version set to 1.15.0
Actions #11

Updated by Joseph Magen almost 11 years ago

  • Status changed from Assigned to Ready For Testing
Actions #12

Updated by Dominic Cleal almost 11 years ago

  • Target version changed from 1.15.0 to 1.10.0
Actions #13

Updated by Dominic Cleal almost 11 years ago

  • Translation missing: en.field_release set to 2
Actions #14

Updated by Anonymous almost 11 years ago

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

Updated by Dominic Cleal almost 11 years ago

  • Has duplicate Bug #3098: _name for _id of associated resources are missing in API (rabl) added
Actions

Also available in: Atom PDF