Bug 976813 - submitting a resource with links in body fails to parse
submitting a resource with links in body fails to parse
Product: RHQ Project
Classification: Other
Component: REST (Show other bugs)
Unspecified Unspecified
unspecified Severity low (vote)
: ---
: RHQ 4.9
Assigned To: Heiko W. Rupp
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2013-06-21 10:11 EDT by Libor Zoubek
Modified: 2015-11-01 19:43 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-24 15:08:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Libor Zoubek 2013-06-21 10:11:52 EDT
Description of problem: Our REST api has a little inconvenience. We add 'links' to response bodies (for example resource, alert def and almost everything else). This is good. But if a client wants to send such body back, server does not accept such object (with 'links' key)

This is inconvenient for clients, because they have to "clean up" a body from links

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

How reproducible: always

Consider auto-import discovery queue script:

resources = requests.get(endpoint+'resource?status=NEW').json()
for res in resources:
    res['status'] = 'committed'
    req = requests.put(endpoint+'resource/%d' % res['resourceId'],data=json.dumps(res))

Actual results: this code does not work, because in $res body are links, server refuses such resource.

Expected results: server should ignore links (or maybe any other unknown keys within resource body)
Comment 1 Heiko W. Rupp 2013-06-27 12:02:24 EDT
master a4b1412282bb4423cb7fbafc67ad8d03a6b08727
Comment 2 Heiko W. Rupp 2013-09-24 15:08:49 EDT
Bulk closing of RHQ 4.9 verified items

Note You need to log in before you can comment on or make changes to this bug.