User Guide Getting Started Help Center Documentation Community Training
Looker
  
English
Français
Deutsch
日本語
Project : Manage Projects

Get All Git Branches beta

GET/api/3.1/projects/{project_id}/git_branches
all_git_branches(project_id)

Implementation Notes

Get All Git Branches.

Returns a list of git branches in the project repository

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Get Active Git Branch beta

GET/api/3.1/projects/{project_id}/git_branch
git_branch(project_id)

Implementation Notes

Get the Current Git Branch.

Returns the git branch currently checked out in the given project repository

Response Class

GitBranch {
name (string): The short name on the local. Updating name results in git checkout <new_name>,
remote (string, read-only): The name of the remote,
remote_name (string, read-only): The short name on the remote,
error (string, read-only): Name of error,
message (string, read-only): Message describing an error if present,
owner_name (string, read-only): Name of the owner of a personal branch,
readonly (boolean, read-only): Whether or not this branch is readonly,
personal (boolean, read-only): Whether or not this branch is a personal branch - readonly for all developers except the owner,
is_local (boolean, read-only): Whether or not a local ref exists for the branch,
is_remote (boolean, read-only): Whether or not a remote ref exists for the branch,
is_production (boolean, read-only): Whether or not this is the production branch,
ahead_count (long, read-only): Number of commits the local branch is ahead of the remote,
behind_count (long, read-only): Number of commits the local branch is behind the remote,
commit_at (long, read-only): UNIX timestamp at which this branch was last committed.,
ref (string): The resolved ref of this branch. Updating ref results in `git reset —hard “.,
remote_ref (string, read-only): The resolved ref of this branch remote.,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Checkout New Git Branch beta

POST/api/3.1/projects/{project_id}/git_branch
create_git_branch(project_id, body)

Implementation Notes

Create and Checkout a Git Branch.

Creates and checks out a new branch in the given project repository Only allowed in development mode - Call update_session to select the ‘dev’ workspace.

Optionally specify a branch name, tag name or commit SHA as the start point in the ref field. If no ref is specified, HEAD of the current branch will be used as the start point for the new branch.

Response Class

GitBranch {
name (string): The short name on the local. Updating name results in git checkout <new_name>,
remote (string, read-only): The name of the remote,
remote_name (string, read-only): The short name on the remote,
error (string, read-only): Name of error,
message (string, read-only): Message describing an error if present,
owner_name (string, read-only): Name of the owner of a personal branch,
readonly (boolean, read-only): Whether or not this branch is readonly,
personal (boolean, read-only): Whether or not this branch is a personal branch - readonly for all developers except the owner,
is_local (boolean, read-only): Whether or not a local ref exists for the branch,
is_remote (boolean, read-only): Whether or not a remote ref exists for the branch,
is_production (boolean, read-only): Whether or not this is the production branch,
ahead_count (long, read-only): Number of commits the local branch is ahead of the remote,
behind_count (long, read-only): Number of commits the local branch is behind the remote,
commit_at (long, read-only): UNIX timestamp at which this branch was last committed.,
ref (string): The resolved ref of this branch. Updating ref results in `git reset —hard “.,
remote_ref (string, read-only): The resolved ref of this branch remote.,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
body false Git Branch body
GitBranch {
name (string): The short name on the local. Updating name results in git checkout <new_name>,
remote (string, read-only): The name of the remote,
remote_name (string, read-only): The short name on the remote,
error (string, read-only): Name of error,
message (string, read-only): Message describing an error if present,
owner_name (string, read-only): Name of the owner of a personal branch,
readonly (boolean, read-only): Whether or not this branch is readonly,
personal (boolean, read-only): Whether or not this branch is a personal branch - readonly for all developers except the owner,
is_local (boolean, read-only): Whether or not a local ref exists for the branch,
is_remote (boolean, read-only): Whether or not a remote ref exists for the branch,
is_production (boolean, read-only): Whether or not this is the production branch,
ahead_count (long, read-only): Number of commits the local branch is ahead of the remote,
behind_count (long, read-only): Number of commits the local branch is behind the remote,
commit_at (long, read-only): UNIX timestamp at which this branch was last committed.,
ref (string): The resolved ref of this branch. Updating ref results in `git reset —hard “.,
remote_ref (string, read-only): The resolved ref of this branch remote.,
can (object, read-only): Operations the current user is able to perform on this object
}

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
409 Resource Already Exists
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Update Project Git Branch beta

PUT/api/3.1/projects/{project_id}/git_branch
update_git_branch(project_id, body)

Implementation Notes

Checkout and/or reset —hard an existing Git Branch.

Only allowed in development mode - Call update_session to select the ‘dev’ workspace.

Checkout an existing branch if name field is different from the name of the currently checked out branch.

Optionally specify a branch name, tag name or commit SHA to which the branch should be reset. DANGER hard reset will be force pushed to the remote. Unsaved changes and commits may be permanently lost.

Response Class

GitBranch {
name (string): The short name on the local. Updating name results in git checkout <new_name>,
remote (string, read-only): The name of the remote,
remote_name (string, read-only): The short name on the remote,
error (string, read-only): Name of error,
message (string, read-only): Message describing an error if present,
owner_name (string, read-only): Name of the owner of a personal branch,
readonly (boolean, read-only): Whether or not this branch is readonly,
personal (boolean, read-only): Whether or not this branch is a personal branch - readonly for all developers except the owner,
is_local (boolean, read-only): Whether or not a local ref exists for the branch,
is_remote (boolean, read-only): Whether or not a remote ref exists for the branch,
is_production (boolean, read-only): Whether or not this is the production branch,
ahead_count (long, read-only): Number of commits the local branch is ahead of the remote,
behind_count (long, read-only): Number of commits the local branch is behind the remote,
commit_at (long, read-only): UNIX timestamp at which this branch was last committed.,
ref (string): The resolved ref of this branch. Updating ref results in `git reset —hard “.,
remote_ref (string, read-only): The resolved ref of this branch remote.,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
body true Git Branch body
GitBranch {
name (string): The short name on the local. Updating name results in git checkout <new_name>,
remote (string, read-only): The name of the remote,
remote_name (string, read-only): The short name on the remote,
error (string, read-only): Name of error,
message (string, read-only): Message describing an error if present,
owner_name (string, read-only): Name of the owner of a personal branch,
readonly (boolean, read-only): Whether or not this branch is readonly,
personal (boolean, read-only): Whether or not this branch is a personal branch - readonly for all developers except the owner,
is_local (boolean, read-only): Whether or not a local ref exists for the branch,
is_remote (boolean, read-only): Whether or not a remote ref exists for the branch,
is_production (boolean, read-only): Whether or not this is the production branch,
ahead_count (long, read-only): Number of commits the local branch is ahead of the remote,
behind_count (long, read-only): Number of commits the local branch is behind the remote,
commit_at (long, read-only): UNIX timestamp at which this branch was last committed.,
ref (string): The resolved ref of this branch. Updating ref results in `git reset —hard “.,
remote_ref (string, read-only): The resolved ref of this branch remote.,
can (object, read-only): Operations the current user is able to perform on this object
}

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Find a Git Branch beta

GET/api/3.1/projects/{project_id}/git_branch/{branch_name}
find_git_branch(project_id, branch_name)

Implementation Notes

Get the specified Git Branch.

Returns the git branch specified in branch_name path param if it exists in the given project repository

Response Class

GitBranch {
name (string): The short name on the local. Updating name results in git checkout <new_name>,
remote (string, read-only): The name of the remote,
remote_name (string, read-only): The short name on the remote,
error (string, read-only): Name of error,
message (string, read-only): Message describing an error if present,
owner_name (string, read-only): Name of the owner of a personal branch,
readonly (boolean, read-only): Whether or not this branch is readonly,
personal (boolean, read-only): Whether or not this branch is a personal branch - readonly for all developers except the owner,
is_local (boolean, read-only): Whether or not a local ref exists for the branch,
is_remote (boolean, read-only): Whether or not a remote ref exists for the branch,
is_production (boolean, read-only): Whether or not this is the production branch,
ahead_count (long, read-only): Number of commits the local branch is ahead of the remote,
behind_count (long, read-only): Number of commits the local branch is behind the remote,
commit_at (long, read-only): UNIX timestamp at which this branch was last committed.,
ref (string): The resolved ref of this branch. Updating ref results in `git reset —hard “.,
remote_ref (string, read-only): The resolved ref of this branch remote.,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
branch_name true Branch Name string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Delete a Git Branch beta

DELETE/api/3.1/projects/{project_id}/git_branch/{branch_name}
delete_git_branch(project_id, branch_name)

Implementation Notes

Delete the specified Git Branch.

Delete git branch specified in branch_name path param from local and remote of specified project repository

Response Class

  None

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
branch_name true Branch Name string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
204 Successfully deleted. string

Deploy To Production beta

POST/api/3.1/projects/{project_id}/deploy_to_production
deploy_to_production(project_id)

Implementation Notes

Deploy LookML from this Development Mode Project to Production.

Git must have been configured, must be in dev mode and deploy permission required

Deploy is a two / three step process 1. Push commits in current branch of dev mode project to the production branch (origin/master). Note a. This step is skipped in read-only projects. Note b. If this step is unsuccessful for any reason (e.g. rejected non-fastforward because production branch has commits not in current branch), subsequent steps will be skipped. 2. If this is the first deploy of this project, create the production project with git repository. 3. Pull the production branch into the production project.

Response Class

  string

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Id of project string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
204 Returns 204 if project was successfully deployed to production, otherwise 400 with an error message

Reset To Production beta

POST/api/3.1/projects/{project_id}/reset_to_production
reset_project_to_production(project_id)

Implementation Notes

Reset a project to the revision of the project that is in production.

DANGER this will delete any changes that have not been pushed to a remote repository.

Response Class

  string

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Id of project string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
204 Returns 204 if project was successfully reset, otherwise 400 with an error message

Reset To Remote beta

POST/api/3.1/projects/{project_id}/reset_to_remote
reset_project_to_remote(project_id)

Implementation Notes

Reset a project development branch to the revision of the project that is on the remote.

DANGER this will delete any changes that have not been pushed to a remote repository.

Response Class

  string

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Id of project string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
204 Returns 204 if project was successfully reset, otherwise 400 with an error message

Get All Projects beta

GET/api/3.1/projects
all_projects(fields)

Implementation Notes

Get All Projects.

Returns all projects visible to the current user

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
fields false Requested fields string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Create Project beta

POST/api/3.1/projects
create_project(body)

Implementation Notes

Create A Project.

dev mode required. - Call update_session to select the ‘dev’ workspace.

name is required. git_remote_url is not allowed. To configure Git for the newly created project, follow the instructions in update_project.

Response Class

Project {
id (string, read-only): Project Id,
name (string): Project display name,
uses_git (boolean, read-only): If true the project is configured with a git repository,
git_remote_url (string): Git remote repository url,
git_username (string): Git username for HTTPS authentication. (For production only, if using user attributes.),
git_password (string): (Write-Only) Git password for HTTPS authentication. (For production only, if using user attributes.),
git_username_user_attribute (string): User attribute name for username in per-user HTTPS authentication.,
git_password_user_attribute (string): User attribute name for password in per-user HTTPS authentication.,
git_service_name (string): Name of the git service provider,
deploy_secret (string): (Write-Only) Optional secret token with which to authenticate requests to the webhook deploy endpoint. If not set, endpoint is unauthenticated.,
unset_deploy_secret (boolean): (Write-Only) When true, unsets the deploy secret to allow unauthenticated access to the webhook deploy endpoint.,
pull_request_mode (string): The git pull request policy for this project. Valid values are: "off", "links", "recommended", "required".,
validation_required (boolean): Validation policy: If true, the project must pass validation checks before project changes can be committed to the git repository,
folders_enabled (boolean): If true, folders are enabled for this project,
allow_warnings (boolean): Validation policy: If true, the project can be committed with warnings when validation_required is true. (allow_warnings does nothing if validation_required is false).,
is_example (boolean, read-only): If true the project is an example project and cannot be modified,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
body false Project body
Project {
id (string, read-only): Project Id,
name (string): Project display name,
uses_git (boolean, read-only): If true the project is configured with a git repository,
git_remote_url (string): Git remote repository url,
git_username (string): Git username for HTTPS authentication. (For production only, if using user attributes.),
git_password (string): (Write-Only) Git password for HTTPS authentication. (For production only, if using user attributes.),
git_username_user_attribute (string): User attribute name for username in per-user HTTPS authentication.,
git_password_user_attribute (string): User attribute name for password in per-user HTTPS authentication.,
git_service_name (string): Name of the git service provider,
deploy_secret (string): (Write-Only) Optional secret token with which to authenticate requests to the webhook deploy endpoint. If not set, endpoint is unauthenticated.,
unset_deploy_secret (boolean): (Write-Only) When true, unsets the deploy secret to allow unauthenticated access to the webhook deploy endpoint.,
pull_request_mode (string): The git pull request policy for this project. Valid values are: "off", "links", "recommended", "required".,
validation_required (boolean): Validation policy: If true, the project must pass validation checks before project changes can be committed to the git repository,
folders_enabled (boolean): If true, folders are enabled for this project,
allow_warnings (boolean): Validation policy: If true, the project can be committed with warnings when validation_required is true. (allow_warnings does nothing if validation_required is false).,
is_example (boolean, read-only): If true the project is an example project and cannot be modified,
can (object, read-only): Operations the current user is able to perform on this object
}

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Get Project beta

GET/api/3.1/projects/{project_id}
project(project_id, fields)

Implementation Notes

Get A Project.

Returns the project with the given project id

Response Class

Project {
id (string, read-only): Project Id,
name (string): Project display name,
uses_git (boolean, read-only): If true the project is configured with a git repository,
git_remote_url (string): Git remote repository url,
git_username (string): Git username for HTTPS authentication. (For production only, if using user attributes.),
git_password (string): (Write-Only) Git password for HTTPS authentication. (For production only, if using user attributes.),
git_username_user_attribute (string): User attribute name for username in per-user HTTPS authentication.,
git_password_user_attribute (string): User attribute name for password in per-user HTTPS authentication.,
git_service_name (string): Name of the git service provider,
deploy_secret (string): (Write-Only) Optional secret token with which to authenticate requests to the webhook deploy endpoint. If not set, endpoint is unauthenticated.,
unset_deploy_secret (boolean): (Write-Only) When true, unsets the deploy secret to allow unauthenticated access to the webhook deploy endpoint.,
pull_request_mode (string): The git pull request policy for this project. Valid values are: "off", "links", "recommended", "required".,
validation_required (boolean): Validation policy: If true, the project must pass validation checks before project changes can be committed to the git repository,
folders_enabled (boolean): If true, folders are enabled for this project,
allow_warnings (boolean): Validation policy: If true, the project can be committed with warnings when validation_required is true. (allow_warnings does nothing if validation_required is false).,
is_example (boolean, read-only): If true the project is an example project and cannot be modified,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
fields false Requested fields string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Update Project beta

PATCH/api/3.1/projects/{project_id}
update_project(project_id, body, fields)

Implementation Notes

Update Project Configuration.

Apply changes to a project’s configuration.

Configuring Git for a Project

To set up a Looker project with a remote git repository, follow these steps:

  1. Call update_session to select the ‘dev’ workspace.
  2. Call create_git_deploy_key to create a new deploy key for the project
  3. Copy the deploy key text into the remote git repository’s ssh key configuration
  4. Call update_project to set project’s git_remote_url ()and git_service_name, if necessary).

When you modify a project’s git_remote_url, Looker connects to the remote repository to fetch metadata. The remote git repository MUST be configured with the Looker-generated deploy key for this project prior to setting the project’s git_remote_url.

To set up a Looker project with a git repository residing on the Looker server (a ‘bare’ git repo): 1. Call update_session to select the ‘dev’ workspace. 1. Call update_project setting git_remote_url to nil and git_service_name to “bare”.

Response Class

Project {
id (string, read-only): Project Id,
name (string): Project display name,
uses_git (boolean, read-only): If true the project is configured with a git repository,
git_remote_url (string): Git remote repository url,
git_username (string): Git username for HTTPS authentication. (For production only, if using user attributes.),
git_password (string): (Write-Only) Git password for HTTPS authentication. (For production only, if using user attributes.),
git_username_user_attribute (string): User attribute name for username in per-user HTTPS authentication.,
git_password_user_attribute (string): User attribute name for password in per-user HTTPS authentication.,
git_service_name (string): Name of the git service provider,
deploy_secret (string): (Write-Only) Optional secret token with which to authenticate requests to the webhook deploy endpoint. If not set, endpoint is unauthenticated.,
unset_deploy_secret (boolean): (Write-Only) When true, unsets the deploy secret to allow unauthenticated access to the webhook deploy endpoint.,
pull_request_mode (string): The git pull request policy for this project. Valid values are: "off", "links", "recommended", "required".,
validation_required (boolean): Validation policy: If true, the project must pass validation checks before project changes can be committed to the git repository,
folders_enabled (boolean): If true, folders are enabled for this project,
allow_warnings (boolean): Validation policy: If true, the project can be committed with warnings when validation_required is true. (allow_warnings does nothing if validation_required is false).,
is_example (boolean, read-only): If true the project is an example project and cannot be modified,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
body true Project body
Project {
id (string, read-only): Project Id,
name (string): Project display name,
uses_git (boolean, read-only): If true the project is configured with a git repository,
git_remote_url (string): Git remote repository url,
git_username (string): Git username for HTTPS authentication. (For production only, if using user attributes.),
git_password (string): (Write-Only) Git password for HTTPS authentication. (For production only, if using user attributes.),
git_username_user_attribute (string): User attribute name for username in per-user HTTPS authentication.,
git_password_user_attribute (string): User attribute name for password in per-user HTTPS authentication.,
git_service_name (string): Name of the git service provider,
deploy_secret (string): (Write-Only) Optional secret token with which to authenticate requests to the webhook deploy endpoint. If not set, endpoint is unauthenticated.,
unset_deploy_secret (boolean): (Write-Only) When true, unsets the deploy secret to allow unauthenticated access to the webhook deploy endpoint.,
pull_request_mode (string): The git pull request policy for this project. Valid values are: "off", "links", "recommended", "required".,
validation_required (boolean): Validation policy: If true, the project must pass validation checks before project changes can be committed to the git repository,
folders_enabled (boolean): If true, folders are enabled for this project,
allow_warnings (boolean): Validation policy: If true, the project can be committed with warnings when validation_required is true. (allow_warnings does nothing if validation_required is false).,
is_example (boolean, read-only): If true the project is an example project and cannot be modified,
can (object, read-only): Operations the current user is able to perform on this object
}
fields false Requested fields string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
409 Resource Already Exists
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}
500 Server Error
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Get Manifest beta

GET/api/3.1/projects/{project_id}/manifest
manifest(project_id)

Implementation Notes

Get A Projects Manifest object.

Returns the project with the given project id

Response Class

Manifest {
name (string, read-only): Manifest project name,
imports (Array[ImportedProject], read-only): Imports for a project,
localization_settings (LocalizationSettings, read-only): Localization settings for a project,
can (object, read-only): Operations the current user is able to perform on this object
}
ImportedProject {
name (string, read-only): Dependency name,
url (string, read-only): Url for a remote dependency,
ref (string, read-only): Ref for a remote dependency,
is_remote (boolean, read-only): Flag signifying if a dependency is remote or local,
can (object, read-only): Operations the current user is able to perform on this object
}
LocalizationSettings {
default_locale (string, read-only): Default locale for localization,
localization_level (string, read-only): Localization level - strict or permissive,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Create Deploy Key beta

POST/api/3.1/projects/{project_id}/git/deploy_key
create_git_deploy_key(project_id)

Implementation Notes

Create Git Deploy Key.

Create a public/private key pair for authenticating ssh git requests from Looker to a remote git repository for a particular Looker project.

Returns the public key of the generated ssh key pair.

Copy this public key to your remote git repository’s ssh keys configuration so that the remote git service can validate and accept git requests from the Looker server.

Response Class

  string

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
409 Resource Already Exists
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Git Deploy Key beta

GET/api/3.1/projects/{project_id}/git/deploy_key
git_deploy_key(project_id)

Implementation Notes

Git Deploy Key.

Returns the ssh public key previously created for a project’s git repository.

Response Class

  string

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Validate Project beta

POST/api/3.1/projects/{project_id}/validate
validate_project(project_id, fields)

Implementation Notes

Validate Project.

Performs lint validation of all lookml files in the project. Returns a list of errors found, if any.

Validating the content of all the files in a project can be computationally intensive for large projects. For best performance, call validate_project(project_id) only when you really want to recompute project validation. To quickly display the results of the most recent project validation (without recomputing), use project_validation_results(project_id)

Response Class

ProjectValidation {
errors (Array[ProjectError], read-only): A list of project errors,
project_digest (string, read-only): A hash value computed from the project's current state,
models_not_validated (Array[ModelsNotValidated], read-only): A list of models which were not fully validated,
computation_time (float, read-only): Duration of project validation in seconds
}
ProjectError {
code (string, read-only): A stable token that uniquely identifies this class of error, ignoring parameter values. Error message text may vary due to parameters or localization, but error codes do not. For example, a "File not found" error will have the same error code regardless of the filename in question or the user's display language,
severity (string, read-only): Severity: fatal, error, warning, info, success,
kind (string, read-only): Error classification: syntax, deprecation, model_configuration, etc,
message (string, read-only): Error message which may contain information such as dashboard or model names that may be considered sensitive in some use cases. Avoid storing or sending this message outside of Looker,
field_name (string, read-only): The field associated with this error,
file_path (string, read-only): Name of the file containing this error,
line_number (long, read-only): Line number in the file of this error,
model_id (string, read-only): The model associated with this error,
explore (string, read-only): The explore associated with this error,
help_url (string, read-only): A link to Looker documentation about this error,
params (object, read-only): Error parameters,
sanitized_message (string, read-only): A version of the error message that does not contain potentially sensitive information. Suitable for situations in which messages are stored or sent to consumers outside of Looker, such as external logs. Sanitized messages will display "(?)" where sensitive information would appear in the corresponding non-sanitized message
}
ModelsNotValidated {
name (string, read-only): Model name,
project_file_id (string, read-only): Project file
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
fields false Requested fields string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Cached Project Validation Results beta

GET/api/3.1/projects/{project_id}/validate
project_validation_results(project_id, fields)

Implementation Notes

Get Cached Project Validation Results.

Returns the cached results of a previous project validation calculation, if any. Returns http status 204 No Content if no validation results exist.

Validating the content of all the files in a project can be computationally intensive for large projects. Use this API to simply fetch the results of the most recent project validation rather than revalidating the entire project from scratch.

A value of "stale": true in the response indicates that the project has changed since the cached validation results were computed. The cached validation results may no longer reflect the current state of the project.

Response Class

ProjectValidationCache {
errors (Array[ProjectError], read-only): A list of project errors,
project_digest (string, read-only): A hash value computed from the project's current state,
models_not_validated (Array[ModelsNotValidated], read-only): A list of models which were not fully validated,
computation_time (float, read-only): Duration of project validation in seconds,
stale (boolean, read-only): If true, the cached project validation results are no longer accurate because the project has changed since the cached results were calculated
}
ProjectError {
code (string, read-only): A stable token that uniquely identifies this class of error, ignoring parameter values. Error message text may vary due to parameters or localization, but error codes do not. For example, a "File not found" error will have the same error code regardless of the filename in question or the user's display language,
severity (string, read-only): Severity: fatal, error, warning, info, success,
kind (string, read-only): Error classification: syntax, deprecation, model_configuration, etc,
message (string, read-only): Error message which may contain information such as dashboard or model names that may be considered sensitive in some use cases. Avoid storing or sending this message outside of Looker,
field_name (string, read-only): The field associated with this error,
file_path (string, read-only): Name of the file containing this error,
line_number (long, read-only): Line number in the file of this error,
model_id (string, read-only): The model associated with this error,
explore (string, read-only): The explore associated with this error,
help_url (string, read-only): A link to Looker documentation about this error,
params (object, read-only): Error parameters,
sanitized_message (string, read-only): A version of the error message that does not contain potentially sensitive information. Suitable for situations in which messages are stored or sent to consumers outside of Looker, such as external logs. Sanitized messages will display "(?)" where sensitive information would appear in the corresponding non-sanitized message
}
ModelsNotValidated {
name (string, read-only): Model name,
project_file_id (string, read-only): Project file
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
fields false Requested fields string string

Response Messages

HTTP Status Code Reason Response Model
204 Deleted
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Get Project Workspace beta

GET/api/3.1/projects/{project_id}/current_workspace
project_workspace(project_id, fields)

Implementation Notes

Get Project Workspace.

Returns information about the state of the project files in the currently selected workspace

Response Class

ProjectWorkspace {
project_id (string, read-only): The id of the project,
workspace_id (string, read-only): The id of the local workspace containing the project files,
git_status (string, read-only): The status of the local git directory,
git_head (string, read-only): Git head revision name,
git_branch (GitBranch, read-only): GitBranch,
lookml_type (string, read-only): The lookml syntax used by all files in this project,
can (object, read-only): Operations the current user is able to perform on this object
}
GitBranch {
name (string): The short name on the local. Updating name results in git checkout <new_name>,
remote (string, read-only): The name of the remote,
remote_name (string, read-only): The short name on the remote,
error (string, read-only): Name of error,
message (string, read-only): Message describing an error if present,
owner_name (string, read-only): Name of the owner of a personal branch,
readonly (boolean, read-only): Whether or not this branch is readonly,
personal (boolean, read-only): Whether or not this branch is a personal branch - readonly for all developers except the owner,
is_local (boolean, read-only): Whether or not a local ref exists for the branch,
is_remote (boolean, read-only): Whether or not a remote ref exists for the branch,
is_production (boolean, read-only): Whether or not this is the production branch,
ahead_count (long, read-only): Number of commits the local branch is ahead of the remote,
behind_count (long, read-only): Number of commits the local branch is behind the remote,
commit_at (long, read-only): UNIX timestamp at which this branch was last committed.,
ref (string): The resolved ref of this branch. Updating ref results in `git reset —hard “.,
remote_ref (string, read-only): The resolved ref of this branch remote.,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
fields false Requested fields string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Get All Project Files beta

GET/api/3.1/projects/{project_id}/files
all_project_files(project_id, fields)

Implementation Notes

Get All Project Files.

Returns a list of the files in the project

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
fields false Requested fields string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Get Project File beta

GET/api/3.1/projects/{project_id}/files/file
project_file(project_id, file_id, fields)

Implementation Notes

Get Project File Info.

Returns information about a file in the project

Response Class

ProjectFile {
id (string, read-only): An opaque token uniquely identifying a file within a project. Avoid parsing or decomposing the text of this token. This token is stable within a Looker release but may change between Looker releases,
path (string, read-only): Path, file name, and extension of the file relative to the project root directory,
title (string, read-only): Display name,
type (string, read-only): File type: model, view, etc,
extension (string, read-only): The extension of the file: .view.lkml, .model.lkml, etc,
mime_type (string, read-only): File mime type,
editable (boolean, read-only): State of editability for the file.,
git_status (GitStatus, read-only): Status of the file according to git,
can (object, read-only): Operations the current user is able to perform on this object
}
GitStatus {
action (string, read-only): Git action: add, delete, etc,
conflict (boolean, read-only): When true, changes to the local file conflict with the remote repository,
revertable (boolean, read-only): When true, the file can be reverted to an earlier state,
text (string, read-only): Git description of the action,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
file_id true File Id string string
fields false Requested fields string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Get All Git Connection Tests beta

GET/api/3.1/projects/{project_id}/git_connection_tests
all_git_connection_tests(project_id, remote_url)

Implementation Notes

Get All Git Connection Tests.

Returns a list of tests which can be run against a project’s (or the dependency project for the provided remote_url) git connection. Call Run Git Connection Test) to execute each test in sequence.

Tests are ordered by increasing specificity. Tests should be run in the order returned because later tests require functionality tested by tests earlier in the test list.

For example, a late-stage test for write access is meaningless if connecting to the git server (an early test) is failing.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
remote_url false (Optional: leave blank for root project) The remote url for remote dependency to test. string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Run Git Connection Test beta

GET/api/3.1/projects/{project_id}/git_connection_tests/{test_id}
run_git_connection_test(project_id, test_id, remote_url)

Implementation Notes

Run a git connection test.

Run the named test on the git service used by this project (or the dependency project for the provided remote_url) and return the result. This is intended to help debug git connections when things do not work properly, to give more helpful information about why a git url is not working with Looker.

Tests should be run in the order they are returned by Get All Git Connection Tests).

Response Class

GitConnectionTestResult {
id (string, read-only): A short string, uniquely naming this test,
message (string, read-only): Additional data from the test,
status (string, read-only): Either 'pass' or 'fail',
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
test_id true Test Id string string
remote_url false (Optional: leave blank for root project) The remote url for remote dependency to test. string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Get All LookML Tests beta

GET/api/3.1/projects/{project_id}/lookml_tests
all_lookml_tests(project_id, file_id)

Implementation Notes

Get All LookML Tests.

Returns a list of tests which can be run to validate a project’s LookML code and/or the underlying data, optionally filtered by the file id. Call Run LookML Test) to execute tests.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
file_id false File Id string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}

Run LookML Test beta

GET/api/3.1/projects/{project_id}/lookml_tests/run
run_lookml_test(project_id, file_id, test, model)

Implementation Notes

Run LookML Tests.

Runs all tests in the project, optionally filtered by file, test, and/or model.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
project_id true Project Id string string
file_id false File Name string string
test false Test Name string string
model false Model Name string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Create Repository Credential beta

PUT/api/3.1/projects/{root_project_id}/credential/{credential_id}
update_repository_credential(root_project_id, credential_id, body)

Implementation Notes

Configure Repository Credential for a remote dependency.

Admin required.

root_project_id is required. credential_id is required.

Response Class

RepositoryCredential {
id (string, read-only): Unique Id,
root_project_id (string, read-only): Root project Id,
remote_url (string, read-only): Git remote repository url,
git_username (string): Git username for HTTPS authentication.,
git_password (string): (Write-Only) Git password for HTTPS authentication.,
ssh_public_key (string): Public deploy key for SSH authentication.,
is_configured (boolean, read-only): Whether the credentials have been configured for the Git Repository.,
can (object, read-only): Operations the current user is able to perform on this object
}

Parameters

Parameter Required? Description Parameter Type Data Type
root_project_id true Root Project Id string string
credential_id true Credential Id string string
body true Remote Project Information body
RepositoryCredential {
id (string, read-only): Unique Id,
root_project_id (string, read-only): Root project Id,
remote_url (string, read-only): Git remote repository url,
git_username (string): Git username for HTTPS authentication.,
git_password (string): (Write-Only) Git password for HTTPS authentication.,
ssh_public_key (string): Public deploy key for SSH authentication.,
is_configured (boolean, read-only): Whether the credentials have been configured for the Git Repository.,
can (object, read-only): Operations the current user is able to perform on this object
}

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
409 Resource Already Exists
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
422 Validation Error
ValidationError {
message (string, read-only, required): Error details,
errors (Array[ValidationErrorDetail], read-only): Error detail array,
documentation_url (string, read-only, required): Documentation link
}
ValidationErrorDetail {
field (string, read-only): Field with error,
code (string, read-only): Error code,
message (string, read-only): Error info message,
documentation_url (string, read-only, required): Documentation link
}

Delete Repository Credential beta

DELETE/api/3.1/projects/{root_project_id}/credential/{credential_id}
delete_repository_credential(root_project_id, credential_id)

Implementation Notes

Repository Credential for a remote dependency.

Admin required.

root_project_id is required. credential_id is required.

Response Class

  None

Parameters

Parameter Required? Description Parameter Type Data Type
root_project_id true Root Project Id string string
credential_id true Credential Id string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
204 Successfully deleted. string

Get All Repository Credentials beta

GET/api/3.1/projects/{root_project_id}/credentials
get_all_repository_credentials(root_project_id)

Implementation Notes

Get all Repository Credentials for a project.

root_project_id is required.

Response Class

  array

Parameters

Parameter Required? Description Parameter Type Data Type
root_project_id true Root Project Id string string

Response Messages

HTTP Status Code Reason Response Model
400 Bad Request
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
404 Not Found
Error {
message (string, read-only, required): Error details,
documentation_url (string, read-only, required): Documentation link
}
Top