We are currently using version 3.3 of the Usage Meter. I'd like to programmatically pull the Detailed Billing Report from the API. Currently, the response is a TSV string. Is there any way to get the API response in a better format (XML or JSON)? Thanks.
Hi. To get JSON, set the accept and content-type headers to text/json or application/json.
Lead developer, vCloud Usage Meter
Thanks for the response Dave. It seems to work for other reports, but not for the Detailed Billing Report. Even when I specify the content-type header, it returns it as a TSV. Any thoughts? Is it maybe a limitation of that report?
Sorry. I forgot that the two detail reports are not available in other formats.
How much would it help you if they were, and do you have any other feedback on the API?
Dave, thanks again for the quick reply. Though it would be helpful to have the API response in XML or JSON, it's not necessary. I can write code to parse the file in its current TSV format. It just makes the response easier to consume in the other formats. From a consistency standpoint, it would make sense to have the report part of the API return XML as the response. Or, if the TSV format is used by the majority of your user base to paste the values into Excel, give the option to specify the content-type header to get XML or JSON.
The API seems good. We are merely looking at it from a reporting standpoint so I cannot speak regarding the other features. For the reporting part of the documentation, it definitely seems to be a little lacking. It would be nice to know the possible parameters that could be used to pull the reports. The sample in 4.2 shows the parameters "dateFrom" and "dateTo", but that is all that is mentioned. I actually found the API guide for version 3.0 online and it contained a lot of other samples specifying other parameters (such as customerName, customerPostalCode, and licenseSet). It would be nice to include those in the latest API documentation and any other available parameters.
Adam, thanks for the feedback.