LookerApi - Get unused looks (last_accessed_at)

api

#1

I’m trying to use LookerApi to find unused Looks and Dashboards. I found the field last_accessed_at and I assumed it was a good one to use for unused content. Although I realised that when a look is in a Dashboard this date is not updated.

Is it expected behaviour? Is there a better way to find unused content through the API?


(Yuriy) #2

Hi @ksilva. We have used Most Recent Query Date Date field from i__looker history table. You use the url below, just replace the <looker_host> with your host name.

<looker_host>/explore/i__looker/history?fields=look.id&f[history.created_date]=before+2018%2F10%2F01&sorts=look.id&limit=500&query_timezone=America%2FNew_York&vis=%7B%22type%22%3A%22table%22%7D&filter_config=%7B%22history.created_date%22%3A%5B%7B%22type%22%3A%22before%22%2C%22values%22%3A%5B%7B%22date%22%3A%222018-10-01T00%3A00%3A00.000Z%22%2C%22constant%22%3A%227%22%2C%22unit%22%3A%22day%22%2C%22tz%22%3Atrue%7D%5D%2C%22id%22%3A5%2C%22error%22%3Afalse%2C%22variant%22%3A%22absolute%22%7D%5D%7D&origin=share-expanded