How to get all panel ids present in a dashboard?

I have a dashboard which has four sub menus and each sub menu has 7 panels.
I need to retrieve all panel ids present in a dashboard. Tried following two options:

  1. GET /api/dashboards/uid/:squid:
  2. GET /api/dashboards/db/:slug
    But I am not getting all the panel ids. Getting only the ids present under first sub menu in that dashboard.
    Can anyone help?
1 Like