Question

What happens to a schedule when the LookML dashboard it is attached to is deleted via API?


Userlevel 1

Hi everyone,

 

What happens to a schedule when the LookML dashboard it is attached to is deleted via API?

Our process for embedded dashboards requires deleting them and recreating them from time to time in order to account for model changes  and we need to ensure the schedules are not lost.

Is there a recommended approach to update the schedule in order to attach it to a new LookML dashboard?

 

Thanks!

 


3 replies

Userlevel 3

What I would expect would be that the schedule would also be deleted, but I’m not 100% sure if that holds true to deleting LookML dashboards via the API (if that actually is possible, I think `DELETE/api/3.1/dashboards/{dashboard_id}` should only work for UDDs). 

I suspect you might have to first (before deleting the dashboard) do:

  • `GET/api/3.0/scheduled_plans/lookml_dashboard/{lookml_dashboard_id}` - get all scheduled plan ids associated with the LookML dashboard

  • `DELETE/api/3.0/scheduled_plans/{scheduled_plan_id}` - delete all scheduled plans returned from 1

  • Finally, `DELETE/api/3.1/dashboards/{dashboard_id}` - after all schedules have been removed, delete the dashboard

I would test to confirm though, I’m curious what happens too.

Userlevel 1

I was hoping not to delete them, but rather to attach them to the new dashboard. Any suggestions?

Userlevel 3

Hm you could probably hit `update_scheduled_plan` and supply a new content id- it doesn’t look like the content id fields are read only (dashboard_id, look_id, lookml_dashboard_id) see

Reply