Hello, how can I get the dashboards created in the...
# gooddata-ui
g
Hello, how can I get the dashboards created in the current workspace, excluding the inherited ones, as we can do with the Python SDK and the API?
j
Hi Goncalo, Are you managing these workspaces via LCM, and that’s what you mean by the inherited dashboards?
g
we have gooddata cn self hosted, what I mean by inherited dashboards, are the dashboards that are available in the current workspace, that were created in parent workspaces right now, I have this snippet to get all dashboards (IListedDashboard) from a workspace:
Copy code
const workspace = useWorkspaceStrict();

workspace
      .dashboards()
      .getDashboards()
      .then(dashboards => {
        // do something with dashboards
      });
But I want to leave out the dashboards inherited from parent workspaces.
m
Hi @Gonçalo Teixeira, you can identify inherited dashboards with
data.meta.origin.originType
dashboard object property, as listed here: https://www.gooddata.com/developers/cloud-native/doc/2.3/workspaces/api/objects-identification/#object-origin I'll check whether it is possible to access it without calling the back end API directly.
1
g
yeah, I'm familiar with that, I just wanted to check if that would be possible with the react sdk
m
Hi again, unfortunately this property is not exposed currently. But there is a workaround to this -- if a dashboard has
isLocked: true
property set up by default, it is inherited from the parent.
g
Ok thank you!