Bug 968269 - Make endpoints for pushing metric data more consistent
Summary: Make endpoints for pushing metric data more consistent
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: REST
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHQ 4.8
Assignee: Heiko W. Rupp
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-29 10:52 UTC by Libor Zoubek
Modified: 2015-11-02 00:43 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-31 10:14:52 UTC
Embargoed:


Attachments (Terms of Use)
Patch fixing this issue (6.80 KB, patch)
2013-05-29 11:19 UTC, Libor Zoubek
no flags Details | Diff

Description Libor Zoubek 2013-05-29 10:52:33 UTC
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
{'scheduleId'12345,'value':123,'timeStamp':12345678}

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 11:19:47 UTC
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 15:22:26 UTC
master 25eb665838cba2

Comment 3 Heiko W. Rupp 2013-08-31 10:14:52 UTC
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.