In Azure, you can create dashboards and export them using a button on the portal. However, there seems to be no option to export the ARM through an API/SDK/CLI. Am I wrong, or is this indeed a gap in the Dashboard experience?
You can also export the template of the resource group via Azure CLI, PowerShell, and the REST API.
Update:
You can see the description here like below:
Shared dashboards in Azure are resources just like virtual machines and storage accounts. Therefore, they can be managed programmatically via the Azure Resource Manager REST APIs, the Azure CLI, Azure PowerShell commands, and many Azure portal features build on top of these APIs to make resource management easier.
Actually, what you download in the Azure Dashboard with the button is not a resource, so you cannot export it with commands or API. What you need is to make the dashboard template as a resource, then you can use the commands(Azure CLI or PowerShell) and API to export it.
Here is the example in the portal as a resource:
Then use the Azure CLI command to export the template like this:
az group deployment export -g grouName -n templateName > dashboard.json