The expected columns fetched from the view are very different from the resulting ones. It looks like if the payload of the API is specified in the right way, it returns all the columns as seen in the Azure UI.
Is there a way I can specifically give the payload for the API?
Hi, is this question regarding the azure_costmanagement_views or azure_costmanagement_view_queries?
Fetching view queries, we need to convert the date range related parameters (timeframe and daterange) between types, to be able to query data for a saved view. There’s no current way to add additional payload to the query API, but if you have anything in mind, maybe this might be a general feature to be included in the future?
Or did you just want to set arbitrary parameters in the query call?
The date range related parameters are converted automatically as the plugin generates the HTTP request to the query endpoint.
What do you mean by payload? The query endpoint takes armcostmanagement.QueryDefinition as payload. Which part of the payload do you want to modify?
I looked at the resource code a little bit more. What the plugin does is it transfers the ReportConfigDefinition (which is the query.* fields under View) into QueryDefinition, and then converts the time range fields (because the time range fields aren’t 100% compatible).
So if you manage to create the View you wish to see in terms of report type etc. in the Azure UI, it should translate automatically to the query results.
Created a view with the columns required and desired granularity and group by filter.
Still, I’m able to get only a few columns, whereas the API call to the view gives me a full set of columns that the view has.