Bug 968269 - Make endpoints for pushing metric data more consistent
Make endpoints for pushing metric data more consistent
Product: RHQ Project
Classification: Other
Component: REST (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: RHQ 4.8
Assigned To: Heiko W. Rupp
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2013-05-29 06:52 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-08-31 06:14:52 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)
Patch fixing this issue (6.80 KB, patch)
2013-05-29 07:19 EDT, Libor Zoubek
no flags Details | Diff

  None (edit)
Description Libor Zoubek 2013-05-29 06:52:33 EDT
Description of problem:I see a little inconsistency between endpoint URIs being used to PUT metric data and trait data.

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

Actual results:
you can push raw metrics by doing
PUT metric/data/{scheduleId}/raw/{timeStamp}

with body

pushing trait metric is however done by 
PUT metric/data/{scheduleId}/trait

with body
{'value':'trait value'}

this is inconsistent in 2 things

1. when pushing numeric metric, API consumer does not know, which scheduleId and timeStamp is relevant (is it the one in resource path or body?)
2. when pushing trait, consumer can send only value without being able to specify timestamp

Expected results:

2 endpoints are consistent (following way):
PUT metric/data/{scheduleId}/raw/{timeStamp} with body {'value':123}
PUT metric/data/{scheduleId}/trait/{timeStamp} with body {'value':'trait value'}

Additional info:
Comment 1 Libor Zoubek 2013-05-29 07:19:47 EDT
Created attachment 754310 [details]
Patch fixing this issue

Heiko, please check attached patch that fixes this issue
Comment 2 Heiko W. Rupp 2013-06-05 11:22:26 EDT
master 25eb665838cba2
Comment 3 Heiko W. Rupp 2013-08-31 06:14:52 EDT
Bulk close of old bugs in VERIFIED state.

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