Project

General

Profile

Actions

Bug #11156

closed

Org create API returns different wrapping and attributes

Added by Stephen Herr over 8 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

On 07/16/2015 08:47 AM, Joseph Magen wrote:

https://github.com/theforeman/foreman/commit/d575926a689fd6abd6f26ee2823ce95eef07dd38

Fixes #10356 - changed the POST/PUT RABL template to be the same as

the GET template

You're right. This should have been mentioned as breaking version. I

would bring it up on the foreman-devel channel.

Hi guys,

I believe that the change above broke backwards compatibility in the
API. I believe you should revert the change, and please don't break
backwards compatibility unless it's accompanied with an API version
bump. Thanks!

-Stephen

POST https://server1/katello/api/v2/organizations/
with {"name":"api_name"}
returns {
"organization": {
"id": 126,
"name": "api_name",
"title": "api_name",
"label": "api_name",
"description": null,
"created_at": "2015-06-24T18:50:57Z",
"updated_at": "2015-06-24T18:50:57Z"
}
}

POST
https://server2/katello/api/v2/organizations/
with {"name":"api_name"}
returns {
"ancestry": null,
"apply_info_task_id": null,
"created_at": "2015-06-24T18:52:28Z",
"default_info": {
"system": [],
"distributor": []
},
"description": null,
"id": 3,
"ignore_types": [],
"katello_default": true,
"label": "api_name",
"name": "api_name",
"title": "api_name",
"updated_at": "2015-06-24T18:52:28Z",
"service_levels": [],
"service_level": null
}


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #10356: POST and PUT should use RABL templates for the response.ClosedAlon Goldboim05/04/2015Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

  • Related to Bug #10356: POST and PUT should use RABL templates for the response. added
Actions #2

Updated by Dominic Cleal over 8 years ago

  • Project changed from Foreman to Katello
  • Subject changed from Broken API to Org create API returns different wrapping and attributes
  • Category set to API
  • Triaged set to No

I'm not sure which is the before/after in the bug report, but I'm guessing this is something to do with the inherited controller. It may be that Katello needs to ship a create.json.rabl like Foreman's to get the additional attributes, don't know about the wrapping.

Foreman does this before and after #10356.

# after
{
  "ancestry": null,
  "created_at": "2015-07-20T13:53:03Z",
  "description": null,
  "id": 24,
  "ignore_types": [],
  "name": "bugtest",
  "title": "bugtest",
  "updated_at": "2015-07-20T13:53:03Z" 
}

# before
{
  "ancestry": null,
  "created_at": "2015-07-20T13:53:44Z",
  "description": null,
  "id": 25,
  "ignore_types": [],
  "name": "bugtest2",
  "title": "bugtest2",
  "updated_at": "2015-07-20T13:53:44Z" 
}
Actions #3

Updated by Eric Helms over 8 years ago

  • translation missing: en.field_release set to 31
  • Triaged changed from No to Yes
Actions #4

Updated by Stephen Benjamin over 8 years ago

  • Priority changed from Normal to High
  • translation missing: en.field_release changed from 31 to 77
Actions #5

Updated by Stephen Benjamin over 8 years ago

  • translation missing: en.field_release changed from 77 to 78
Actions #6

Updated by Eric Helms about 8 years ago

  • translation missing: en.field_release changed from 78 to 113
Actions #7

Updated by Eric Helms about 8 years ago

  • translation missing: en.field_release changed from 113 to 86
Actions #8

Updated by Eric Helms about 8 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF