Summary
The Looker API provides endpoints to create, update, and delete LookML project files (POST/PUT/DELETE /projects/{id}/files), but there is no endpoint to commit those changes to the git branch. Changes made via the API remain as uncommitted working tree modifications.
This creates a gap in the programmatic LookML development lifecycle: tools can create and modify files, but cannot commit them without human intervention via the Looker IDE.
Current behavior
| Operation |
API Endpoint |
Result |
| Create file |
POST /projects/{id}/files |
File saved to working tree (uncommitted) |
| Update file |
PUT /projects/{id}/files |
File updated in working tree (uncommitted) |
| Delete file |
DELETE /projects/{id}/files |
File removed from working tree (uncommitted) |
| Commit changes |
None |
No API equivalent |
| Deploy to production |
POST /projects/{id}/deploy_to_production |
Pushes existing commits only — does not commit pending changes |
Evidence
Using looker-sdk v26.4.0 (Python):
import looker_sdk
sdk = looker_sdk.init40()
sdk.update_session(looker_sdk.models40.WriteApiSession(workspace_id="dev"))
# Get branch ref before file creation
branch_before = sdk.git_branch("my_project")
print(f"ref before: {branch_before.ref}") # e.g., abc123
# Create a file via undocumented API (same as Looker IDE uses internally)
# POST /4.0/projects/my_project/files with body {"path": "views/test.view.lkml", "content": "..."}
# Check file git status
files = sdk.all_project_files("my_project")
for f in files:
if "test" in f.path:
print(f"git_status: {f.git_status}")
# Output: git_status: GitStatus(action='add', text='New file')
# Branch ref is unchanged — no commit was made
branch_after = sdk.git_branch("my_project")
print(f"ref after: {branch_after.ref}") # same abc123 — unchanged
Impact on branch switching
Because changes are uncommitted, they are workspace-scoped, not branch-scoped. When switching branches via PUT /projects/{id}/git_branch, uncommitted changes travel with the user to the new branch (unlike the IDE which blocks the switch). This makes it impossible to work on parallel feature branches via the API — changes from one branch contaminate the other.
Requested endpoint
A POST /projects/{project_id}/git/commit (or similar) that:
- Commits all pending changes on the current dev branch
- Accepts an optional
message parameter for the commit message
- Optionally pushes to the remote (or this could be a separate step)
This would complete the programmatic LookML development lifecycle:
dev_mode → create/update_project_file → validate_project → git/commit → deploy_to_production
Use case
MCP Toolbox for Looker (googleapis/genai-toolbox) and custom MCP servers use the file management APIs to let AI agents generate LookML code. Without a commit endpoint, the generated code requires manual intervention via the IDE to reach production, breaking the automated pipeline.
Environment
- SDK:
looker-sdk 26.4.0 (Python)
- API version: 4.0
- Looker instance: Google Cloud core 26.2
Summary
The Looker API provides endpoints to create, update, and delete LookML project files (
POST/PUT/DELETE /projects/{id}/files), but there is no endpoint to commit those changes to the git branch. Changes made via the API remain as uncommitted working tree modifications.This creates a gap in the programmatic LookML development lifecycle: tools can create and modify files, but cannot commit them without human intervention via the Looker IDE.
Current behavior
POST /projects/{id}/filesPUT /projects/{id}/filesDELETE /projects/{id}/filesPOST /projects/{id}/deploy_to_productionEvidence
Using
looker-sdkv26.4.0 (Python):Impact on branch switching
Because changes are uncommitted, they are workspace-scoped, not branch-scoped. When switching branches via
PUT /projects/{id}/git_branch, uncommitted changes travel with the user to the new branch (unlike the IDE which blocks the switch). This makes it impossible to work on parallel feature branches via the API — changes from one branch contaminate the other.Requested endpoint
A
POST /projects/{project_id}/git/commit(or similar) that:messageparameter for the commit messageThis would complete the programmatic LookML development lifecycle:
dev_mode→create/update_project_file→validate_project→git/commit→deploy_to_productionUse case
MCP Toolbox for Looker (
googleapis/genai-toolbox) and custom MCP servers use the file management APIs to let AI agents generate LookML code. Without a commit endpoint, the generated code requires manual intervention via the IDE to reach production, breaking the automated pipeline.Environment
looker-sdk26.4.0 (Python)