Hi, how to identify ObjectId for all the component...
# gooddata-cloud
a
Hi, how to identify ObjectId for all the components of a dashboard to migrate from one workspace to another? Appreciated for your feedback
j
Hello Atit, You should be able to see all object entities in a dashboard using the GET call: https://www.gooddata.com/docs/cloud/api-and-sdk/api/api_reference_all/#operation/getEntity@AnalyticalDashboards
a
Thanks Joseph but I don't think the output of this dashboard api returns the dependent metrics as I couldn't see that information from the output
j
The metrics would be displayed within the visualization rather than the dashboard definition.
a
Basically in order to get all dashboard dependency objects, we have to: 1 . Get all dependent visualization from the dashboard api 2. Call each visualization api to get all dependent metrics Is this correct?
j
Yes, that is correct
👍 1
t
Hi @Atit Wajanasomboonkul, there is a dependency graph API that maybe could be used in your situation. This API is used for example to check impact of your model changes. I guess it could be used to check dependencies of a particular dashboard, but I haven’t tried to do.
Especially the endpoint that allows you to include ObjectIDs of interested objects (Dashboard ID in your case) looks promising.
a
Thanks @Tomas Muchka. I tried using that API endpoint, and it seems to only function in one direction. For instance, if you have dashboardA -> visualizationA -> metricA, passing the ID of metricA to the endpoint allows it to identify all dependent objects. In this example, passing the ID of metricA would return dashboardA and visualizationA. However, it doesn't seem to work the other way around. If I pass the ID of dashboardA to the API, it returns nothing
t
I’m sorry to hear that. The only option I’m aware of is the suggestion made by @Joseph Heun then.
a
That's okay. Much appreciated for your response anyway.