azure portal dashboard create uses "apiVersion": "2015-08-01-preview" and not "apiVersion": "2022-12-01-preview" #30198
Labels
Auto-Assign
Auto assign by bot
Auto-Resolve
Auto resolve by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
feature-request
Portal
az portal
Milestone
Describe the bug
We have multiple azure environments with our software deployed and would like to use the following workflow to create a dashboard:
Related command
az portal dashboard create --input-path ...
Errors
Issue script & Debug output
NA
Expected behavior
The dashboard export generates the file with apiVersion": "2022-12-01-preview" now.
The az cli though expects the imported file to be of the "apiVersion": "2015-08-01-preview"
The structure of data is different between the two versions:
"apiVersion": "2015-08-01-preview" has the following format.
Note1: the lenses item is a single element and not an array. Plus the items are elements with numbers "0", etc.
Note2: The parts element is similarly a single object and not an array and items inside them are elements with numbers "0" etc.
apiVersion": "2022-12-01-preview" that azure portal now exports has the following format:
Note1: the lenses item is an array. Plus the items are just objects inside the array, no "0" named elements.
Note2: The parts element is similarly an array and items inside them are objects in the array, without "0" etc. named elements.
The older api version can be imported by following this example: https://stackoverflow.com/a/65435018/987191
The portal exports for a later API version that cannot be used by azure cli to create the dashboard.
I understand the feature is in preview, but it doesn't align with the portal output.
Can the api be changed to import latest api version or allow to take api version as an input if multiple api versions and file formats need to be supported?
Environment Summary
azure-cli: 2.59.0
Additional context
No response
The text was updated successfully, but these errors were encountered: