Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1358924 - Rest Api Guide under About as well as redhat docs api guide for CF are missing examples for /reports and /chargeback
Summary: Rest Api Guide under About as well as redhat docs api guide for CF are missin...
Keywords:
Status: CLOSED DUPLICATE of bug 1339803
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Documentation
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: 5.7.0
Assignee: Red Hat CloudForms Documentation
QA Contact: Red Hat CloudForms Documentation
URL:
Whiteboard: doc
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-21 19:24 UTC by ldomb
Modified: 2017-08-10 12:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-10 12:37:29 UTC
Category: ---
Cloudforms Team: ---


Attachments (Terms of Use)

Description ldomb 2016-07-21 19:24:59 UTC
Document URL: https://access.redhat.com/documentation/en/red-hat-cloudforms/4.1/red-hat-cloudforms-rest-api/

Section Number and Name: N/A

Describe the issue: Per

https://github.com/ManageIQ/manageiq_docs/blob/master/api/reference/reports.adoc

Reports api is available and works but it's not in the api documentation. 

Suggestions for improvement: 

Please add the above the rest api pdf on the appliance as well as online

Additional information: 

Here an example that it works in 4.1

https://cfmeldo1.rdu.salab.redhat.com/api/reports/347000000000183/results?expand=resources

{"name":"results","count":78,"subcount":2,"resources":[{"href":"https://cfmeldo1.rdu.salab.redhat.com/api/reports/347000000000183/results/347000000000102","id":347000000000102,"name":"container chargeback mem","miq_report_id":347000000000183,"miq_task_id":347000000039702,"userid":"admin","report_source":"Requested by user","db":"ChargebackContainerProject","report":{"name":"container chargeback mem","title":"container chargeback mem","rpt_group":"Custom","rpt_type":"Custom","db":"ChargebackContainerProject","cols":["start_date","display_range","project_name","cpu_cores_used_cost","cpu_cores_used_metric","net_io_used_metric","net_io_used_cost","total_cost","provider_name","provider_uid","memory_used_metric","memory_used_cost"],"include":{},"col_order":["display_range","project_name","cpu_cores_used_cost","cpu_cores_used_metric","net_io_used_metric","net_io_used_cost","total_cost","provider_name","provider_uid","memory_used_metric","memory_used_cost"],"headers":["Date Range","Project Name","Cpu Cores Used Cost","Cpu Cores Used Metric","Network I/O Used","Network I/O Used Cost","Total Cost","Provider Name","Provider Uid","Memory Used","Memory Used Cost"],"order":"Ascending","sortby":["start_date","project_name"],"group":"y","categories":[],"template_type":"report","db_options":{"rpt_type":"ChargebackContainerProject","options":{"interval":"daily","interval_size":1,"end_interval_offset":1,"provider_id":"347000000000020","entity_id":"all"}},"col_formats":[null,null,null,null,null,null,null,null,null,null,null],"tz":"UTC","col_options":{"cpu_cores_used_cost":{"grouping":["total"]},"cpu_cores_used_metric":{"grouping":["total"]},"fixed_compute_1_cost":{"grouping":["total"]},"fixed_compute_2_cost":{"grouping":["total"]},"fixed_cost":{"grouping":["total"]},"memory_used_cost":{"grouping":["total"]},"memory_used_metric":{"grouping":["total"]},"net_io_cost":{"grouping":["total"]},"net_io_metric":{"grouping":["total"]},"net_io_used_cost":{"grouping":["total"]},"net_io_used_metric":{"grouping":["total"]},"total_cost":{"grouping":["total"]}},"rpt_options":{"pdf":{"page_size":"US-Letter"},"summary":{"hide_detail_rows":false}},"miq_group_id":347000000000002,"user_id":347000000000001,"extras":{"grouping":{"2016-07-20 00:00:00 UTC":{"count":4,"row":{"start_date":"2016-07-20T00:00:00.000Z","display_range":"07/20/2016","project_name":"default","cpu_cores_used_cost":2.0000213081827063,"cpu_cores_used_metric":0.025569819247222222,"net_io_used_metric":4936.368499891494,"net_io_used_cost":48.638752750651044,"total_cost":53.66930070633086,"provider_name":"osemastersa","provider_uid":"0aaa0b62-4d26-11e6-87f1-001a4a160151","memory_used_metric":3636.631976996528,"memory_used_cost":3.0305266474971067},"total":{"cpu_cores_used_cost":9.00734845049676,"cpu_cores_used_metric":8.818140596112634,"fixed_compute_1_cost":0.0,"fixed_compute_2_cost":0.0,"fixed_cost":0.0,"memory_used_cost":64.85656682219327,"memory_used_metric":77827.88018663194,"net_io_cost":0.0,"net_io_metric":0.0,"net_io_used_cost":138.63672679036458,"net_io_used_metric":9855.216951768665,"total_cost":212.5006420630546}},"_total_":{"count":4,"row":{},"total":{"cpu_cores_used_cost":9.00734845049676,"cpu_cores_used_metric":8.818140596112634,"fixed_compute_1_cost":0.0,"fixed_compute_2_cost":0.0,"fixed_cost":0.0,"memory_used_cost":64.85656682219327,"memory_used_metric":77827.88018663194,"net_io_cost":0.0,"net_io_metric":0.0,"net_io_used_cost":138.63672679036458,"net_io_used_metric":9855.216951768665,"total_cost":212.5006420630546}}},"total_html_rows":9},"trend_data":{}},"created_on":"2016-07-21T18:30:55Z","last_run_on":"2016-07-21T18:31:00Z","last_accessed_on":"2016-07-21T18:31:00Z","miq_group_id":347000000000002,"result_set":[{"start_date":"2016-07-20T00:00:00.000Z","display_range":"07/20/2016","project_name":"default","cpu_cores_used_cost":2.0000213081827063,"cpu_cores_used_metric":0.025569819247222222,"net_io_used_metric":4936.368499891494,"net_io_used_cost":48.638752750651044,"total_cost":53.66930070633086,"provider_name":"osemastersa","provider_uid":"0aaa0b62-4d26-11e6-87f1-001a4a160151","memory_used_metric":3636.631976996528,"memory_used_cost":3.0305266474971067},{"start_date":"2016-07-20T00:00:00.000Z","display_range":"07/20/2016","project_name":"mycakephp","cpu_cores_used_cost":2.0002990378954766,"cpu_cores_used_metric":0.358845474572639,"net_io_used_metric":348.3644978841146,"net_io_used_cost":24.0,"total_cost":33.61941133354073,"provider_name":"osemastersa","provider_uid":"0aaa0b62-4d26-11e6-87f1-001a4a160151","memory_used_metric":9142.93475477431,"memory_used_cost":7.619112295645256},{"start_date":"2016-07-20T00:00:00.000Z","display_range":"07/20/2016","project_name":"mynodejs","cpu_cores_used_cost":2.000285516856899,"cpu_cores_used_metric":0.3426202282788887,"net_io_used_metric":34.61939208984375,"net_io_used_cost":24.0,"total_cost":30.520796575522983,"provider_name":"osemastersa","provider_uid":"0aaa0b62-4d26-11e6-87f1-001a4a160151","memory_used_metric":5424.613270399302,"memory_used_cost":4.520511058666083},{"start_date":"2016-07-20T00:00:00.000Z","display_range":"07/20/2016","project_name":"openshift-infra","cpu_cores_used_cost":3.006742587561678,"cpu_cores_used_metric":8.091105074013885,"net_io_used_metric":4535.864561903212,"net_io_used_cost":41.99797403971355,"total_cost":94.69113344766004,"provider_name":"osemastersa","provider_uid":"0aaa0b62-4d26-11e6-87f1-001a4a160151","memory_used_metric":59623.700184461806,"memory_used_cost":49.68641682038483}]},{"href":"https://cfmeldo1.rdu.salab.redhat.com/api/reports/347000000000183/results/347000000000101","id":347000000000101,"name":"container chargeback mem","miq_report_id":347000000000183,"miq_task_id":347000000039542,"userid":"admin","report_source":"Requested by user","db":"ChargebackContainerProject","report":{"name":"container chargeback mem","title":"container chargeback mem","rpt_group":"Custom","rpt_type":"Custom","db":"ChargebackContainerProject","cols":["start_date","display_range","project_name","cpu_cores_used_cost","cpu_cores_used_metric","net_io_used_metric","net_io_used_cost","total_cost","provider_name","provider_uid","memory_used_metric","memory_used_cost"],"include":{},"col_order":["display_range","project_name","cpu_cores_used_cost","cpu_cores_used_metric","net_io_used_metric","net_io_used_cost","total_cost","provider_name","provider_uid","memory_used_metric","memory_used_cost"],"headers":["Date Range","Project Name","Cpu Cores Used Cost","Cpu Cores Used Metric","Network I/O Used","Network I/O Used Cost","Total Cost","Provider Name","Provider Uid","Memory Used","Memory Used Cost"],"order":"Ascending","sortby":["start_date","project_name"],"group":"y","categories":[],"template_type":"report","db_options":{"rpt_type":"ChargebackContainerProject","options":{"interval":"daily","interval_size":1,"end_interval_offset":1,"provider_id":"347000000000020","entity_id":"all"}},"col_formats":[null,null,null,null,null,null,null,null,null,null,null],"tz":"UTC","col_options":{"cpu_cores_used_cost":{"grouping":["total"]},"cpu_cores_used_metric":{"grouping":["total"]},"fixed_compute_1_cost":{"grouping":["total"]},"fixed_compute_2_cost":{"grouping":["total"]},"fixed_cost":{"grouping":["total"]},"memory_used_cost":{"grouping":["total"]},"memory_used_metric":{"grouping":["total"]},"net_io_cost":{"grouping":["total"]},"net_io_metric":{"grouping":["total"]},"net_io_used_cost":{"grouping":["total"]},"net_io_used_metric":{"grouping":["total"]},"total_cost":{"grouping":["total"]}},"rpt_options":{"pdf":{"page_size":"US-Letter"},"summary":{"hide_detail_rows":false}},"miq_group_id":347000000000002,"user_id":347000000000001,"extras":{"grouping":{"2016-07-19 00:00:00 UTC":{"count":4,"row":{"start_date":"2016-07-19T00:00:00.000Z","display_range":"07/19/2016","project_name":"default","cpu_cores_used_cost":0.7500071788408981,"cpu_cores_used_metric":0.008614609077870318,"net_io_used_metric":1596.6636503895918,"net_io_used_cost":16.967067479894585,"total_cost":18.83728767076172,"provider_name":"osemastersa","provider_uid":"0aaa0b62-4d26-11e6-87f1-001a4a160151","memory_used_metric":1344.2556144314913,"memory_used_cost":1.1202130120262428},"total":{"cpu_cores_used_cost":3.377800915067421,"cpu_cores_used_metric":3.361098080905128,"fixed_compute_1_cost":0.0,"fixed_compute_2_cost":0.0,"fixed_cost":0.0,"memory_used_cost":20.67725772701678,"memory_used_metric":24812.709272420136,"net_io_cost":0.0,"net_io_metric":0.0,"net_io_used_cost":48.46706747989458,"net_io_used_metric":3185.957785133596,"total_cost":72.5221261219788}},"_total_":{"count":4,"row":{},"total":{"cpu_cores_used_cost":3.377800915067421,"cpu_cores_used_metric":3.361098080905128,"fixed_compute_1_cost":0.0,"fixed_compute_2_cost":0.0,"fixed_cost":0.0,"memory_used_cost":20.67725772701678,"memory_used_metric":24812.709272420136,"net_io_cost":0.0,"net_io_metric":0.0,"net_io_used_cost":48.46706747989458,"net_io_used_metric":3185.957785133596,"total_cost":72.5221261219788}}},"total_html_rows":9},"trend_data":{}},"created_on":"2016-07-20T18:53:09Z","last_run_on":"2016-07-20T18:54:10Z","last_accessed_on":"2016-07-20T18:54:22Z","miq_group_id":347000000000002,"result_set":[{"start_date":"2016-07-19T00:00:00.000Z","display_range":"07/19/2016","project_name":"default","cpu_cores_used_cost":0.7500071788408981,"cpu_cores_used_metric":0.008614609077870318,"net_io_used_metric":1596.6636503895918,"net_io_used_cost":16.967067479894585,"total_cost":18.83728767076172,"provider_name":"osemastersa","provider_uid":"0aaa0b62-4d26-11e6-87f1-001a4a160151","memory_used_metric":1344.2556144314913,"memory_used_cost":1.1202130120262428},{"start_date":"2016-07-19T00:00:00.000Z","display_range":"07/19/2016","project_name":"mycakephp","cpu_cores_used_cost":0.7501134003704052,"cpu_cores_used_metric":0.13608044448618759,"net_io_used_metric":130.23615752203662,"net_io_used_cost":9.0,"total_cost":12.57441312140831,"provider_name":"osemastersa","provider_uid":"0aaa0b62-4d26-11e6-87f1-001a4a160151","memory_used_metric":3389.1596652454846,"memory_used_cost":2.8242997210379044},{"start_date":"2016-07-19T00:00:00.000Z","display_range":"07/19/2016","project_name":"mynodejs","cpu_cores_used_cost":0.7501076956482822,"cpu_cores_used_metric":0.12923477793879634,"net_io_used_metric":12.970803584346069,"net_io_used_cost":9.0,"total_cost":11.41879392772454,"provider_name":"osemastersa","provider_uid":"0aaa0b62-4d26-11e6-87f1-001a4a160151","memory_used_metric":2002.42347849151,"memory_used_cost":1.6686862320762588},{"start_date":"2016-07-19T00:00:00.000Z","display_range":"07/19/2016","project_name":"openshift-infra","cpu_cores_used_cost":1.1275726402078354,"cpu_cores_used_metric":3.087168249402274,"net_io_used_metric":1446.0871736376216,"net_io_used_cost":13.5,"total_cost":29.69163140208422,"provider_name":"osemastersa","provider_uid":"0aaa0b62-4d26-11e6-87f1-001a4a160151","memory_used_metric":18076.87051425165,"memory_used_cost":15.064058761876375}]}]}

Comment 2 ldomb 2016-07-21 19:28:33 UTC
I think that we have a dup here:

https://bugzilla.redhat.com/show_bug.cgi?id=1339803

Comment 3 Chris Pelland 2017-08-10 12:37:29 UTC

*** This bug has been marked as a duplicate of bug 1339803 ***


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