If you are using the databricks CLI, you can get the dashboard id the same way you're getting a notebook id: dashboardsCommands for modifying legacy dashboards:create, delete, get, list, restore, update
https://docs.databricks.com/aws/en/dev-tools/cli/commands