Bug 968269

Summary: Make endpoints for pushing metric data more consistent
Product: [Other] RHQ Project Reporter: Libor Zoubek <lzoubek>
Component: RESTAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.8CC: theute
Target Milestone: ---   
Target Release: RHQ 4.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-31 10:14:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch fixing this issue none

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.