Looker API for views

Is it possible to create a new view file and then update an explore through looker API? I tried using APIv3.1 and could not find any lead.

0 7 1,124
7 REPLIES 7

Check out my answer here:

The Looker API tries to stay out of the business of file management. We hook up to Github (or whatever you like) for source control, so we recommend that you go through your source control provider’s API in order to actually modify files. In your case, using the Github API or just some shell commands to write new files + push them to the git repo in question should work. Make sure to hook up the deploy webhook also: https://help.looker.com/hc/en-us/articles/360001288268-Deploy-Webhook-Pulling-F…

Short version: The Looker API doesn’t have file management endpoints, you should use your git provider to change or create files.

Hi, Is this still a valid answer (after 1 year) that using Looker APIs we will not be able to update the views dynamically?

It is @addankirao . Looker does not support editing LookML via the API, we rely on Git for all LookML file management.

Hi @jamesnestler @izzymiller is there any tutorial about this process of creating and updating view files using Git? 

@leilaapsilva generally, we would recommend pylookml rather than programmatically updating the code in github. Have you seen this documentation by chance?

(we should note that pylookml is not an official thing, but it’s something folks commonly use)

@leilaapsilva generally, we would recommend pylookml rather than programmatically updating the code in github. Have you seen this documentation by chance?

Yes, I am trying to use Pylookml now, but I don’t understand how to add new dimensions to a view, the documentation is a bit confusing…