API to get a list of LookML dashboards

Hi there…

Can someone point me in the direction of how to get a list of LookML Dashboards?

Thanks
Greg

1 Like

Hello @gsvitak ,

Have you tried the GET all_dashboards?

From there, you can filter on dashboards that have those attributes:

“user_id”: null,
“space”: {
“name”: “LookML Dashboards”,
“parent_id”: null,
“id”: “lookml”,
“content_metadata_id”: null,
“created_at”: null,
“creator_id”: null,

1 Like

thank you!

1 Like

Hi,

The GET /dashboards endpoint is only for regular dashboards. LookML Dashboards are entirely different. They are dashboards defined by a LookML file.

I am attempting to create new dashboards by importing an existing LookML Dashboard.

POST /dashboards/{lookml_dashboard_id}/import/{space_id}

I can’t find the LookML Dashboards anywhere though outside of the projects in the looker UI. The Looker UI doesn’t show you the ID of the LookML Dashboards.

Is there any way to find LookML Dashboards and their respective ids?

Did you find the answer to this?

“Is there any way to find LookML Dashboards and their respective ids?”

Looking for that one too!

Hi,

I was able to use the all_dashboards GET endpoint as Cyril suggested above, thank you.

Here’s the location in the Python SDK I’m using: https://github.com/looker-open-source/sdk-codegen/blob/main/python/looker_sdk/sdk/api31/methods.py#L2248

and a snippet of my usage:

    all_dashboards = sdk.all_dashboards()

    for d in all_dashboards:
        space = d.get('space')
        space_name = space.get('name')

        if space_name == 'LookML Dashboards':

            dash_title = d.get('title')

            dashboard_id = d.get('id')
1 Like

The alternative solution, Looker CLI “Gazer”:

https://github.com/looker-open-source/gzr

1 Like

@kbollG - your solution is clever as all LookML dashboards are currently stored inside the “LookML Dashboards” folder (previously known as “spaces”). I like it

1 Like

Looker API: To get list of all dashboards( including LookML dashboards)