How to get a chargeback rate details through API?


#1

hi,

Can you please some one help me how to get a chargeback rate details through API?

Regards,
Jeni


#2
GET /api/chargebacks
GET /api/chargebacks/<id>
GET /api/chargebacks/<id>/rates
GET /api/chargebacks/<id>/rates?expand=resources
GET /api/chargebacks/<id>/rates/<rate_id>

As per: https://github.com/ManageIQ/manageiq/pull/3611

You can also query rates as a primary collection

GET /api/rates
GET /api/rates/<id>
GET /api/rates?expand=resources

CC’ing @imtayadeway in case I mis-spoke.


#3

@abellotti I believe that is correct. Apologies for missing this and not responding myself!


#4

@abellotti,
Seems, the above APIs are not available in the Cloud Forms which I’m using. My CFME version is 3.2. If I try the above APIs, it will throw the following response,

{“error”:{“kind”:“bad_request”,“message”:“Unsupported Collection chargebacks specified”,“klass”:“ApiController::BadRequestError”}}

Please correct me if I’m worng.


#5

@saleth123 These APIs will be included in CloudForms 4.0 (aka cfme-5.5)


#6

@chessbyte, do you have any idea, how to get the chargeback report through API in CFME 3.2?


#7

@saleth123 These APIs will be included in ManageIQ Capablanca release and CloudForms 4.0 (aka cfme-5.5). They are NOT available in prior releases.


#8

@chessbyte, I’m new to CFME, so don’t have much idea about chargeback. Shall we write any automation script to get a chargeback report? if so can you please give me some basic hints about that?


#9

According to the “CFME 5.4.2 bug fixes, and enhancement update” (https://rhn.redhat.com/errata/RHBA-2015-1744.html), BZ #1245715 - [RFE] Retrieve ChargeBack reports from RESTapi is now included in 5.4.

I’m not sure if this is the full implementation though.

pemcg


#10

Please keep this forum for the ManageIQ project, and not the CloudForms product.

Thanks,
Oleg
Sent from my iPad


#11

Looks like /api/chargebacks does not support Delete action.

Any reason why this cannot be created and deleted other than the web UI.
Also how this can be assigned to a tenant?

I am using CFME5.5.


#12

Chargeback deletes are now available.

POST /api/chargebacks/:id - action "delete"
POST /api/chagebacks - action “delete” for bulk deletes
DELETE /api/chargebacks/:id