Is there a way to update a Looker bare repository using an API or any other method?

My goal is to push models and views to Looker without relying on a cloud-based solution like GitHub. I discovered that using a bare repository in Looker might be an option. However, I'm interested in exploring ways to automate the process of pushing models and views.

0 5 326
5 REPLIES 5

So there are a few facets to this question.

First, to my knowledge, you can run pretty much all of the Git API endpoints just fine with a bare repo. So LookML validation, pushing to production, etc can all be done via the API.

However, it sounds like you want to update the LookML files using the API? That won't be possible if you're using a bare repo. The only ways to edit the LookML files of a bare repo is in the Looker UI, or by directly modifying the files on the instance (only possible if your instance is customer-hosted, and even then it's a bit risky).

Thanks @sam8 for reply.

Can you please advise how can we push models and views via Git API in case of bare repository.

Check out the Looker API reference, specifically the Project section.

You might be specifically interested in the Deploy to Production endpoint.

This API will deploy a project from the development branch to the master branch. However, my use case involves automating the creation of models and views. To achieve this, I need to push these files to the development branch first. Unfortunately, I have not found a way to automate these steps for a bare repository.

I see. Yes, I think that won't be possible with the Looker API. I know that many Git providers support automation like that, but I don't think you can achieve it with bare repositories.