Note: for a simple library, you can check pylooker
!
This document describes the Looker API. Please note that this is the 'new' Looker RESTful API. This API uses Looker 'API 3' keys. Those keys can be created for Looker users by Looker admins on the admin/user edit page. Such keys will allow a user to autheticate to the API as that user; having that user's permissions. Admins can create 'dummy' accounts specifically for API use, or add keys to real users' accounts. A Ruby SDK is available to integrate this API into applications. Standard RESTful practices are used by the API, so it should be callable by any RESTful client framework - or just using raw HTTP requests. Additionally, the 'api-docs' page served by the Looker instance includes 'Try it out!' buttons for each API method so that anyone logged in with an API3 key can call the API directly from the documentation page. Future releases of Looker will expand this API release-by-release to securely expose more and more of the core power of Looker to API client applications. This document does not cover the old Looker Query API. The methods in the 'Query' section below are intended to replace that old API. Nonetheless, information about the old API can be found at Query API and Ruby SDK.
This Python package is automatically generated by the Swagger Codegen project:
- API version: 3.0.0
- Package version: 1.0.0
- Build date: 2016-05-09T14:19:41.756-07:00
- Build package: class io.swagger.codegen.languages.PythonClientCodegen
Python 2.7 and 3.4+
You can install directly from Github:
pip install git+https://github.com/bufferapp/lookerpy.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/bufferapp/lookerpy.git
)
Then import the package:
import lookerpy
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import lookerpy
Please follow the installation procedure and then run the following:
import time
import lookerpy
from lookerpy.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = lookerpy.ApiAuthApi()
client_id = 'client_id_example' # str | client_id part of API3 Key. (optional)
client_secret = 'client_secret_example' # str | client_secret part of API3 Key. (optional)
try:
# login
api_response = api_instance.login(client_id=client_id, client_secret=client_secret)
pprint(api_response)
except ApiException as e:
print "Exception when calling ApiAuthApi->login: %s\n" % e
All URIs are relative to https://looker.buffer.com:19999/api/3.0
Class | Method | HTTP request | Description |
---|---|---|---|
ApiAuthApi | login | POST /login | login |
ApiAuthApi | logout | DELETE /logout | logout |
AuthApi | all_embed_secrets | GET /embed_config/secrets | get all embed secrets |
AuthApi | check_embed_domain | PUT /embed_config/check_domain | check embed domain |
AuthApi | create_embed_secret | POST /embed_config/secrets | create embed secret |
AuthApi | create_saml_test_config | POST /saml_test_configs | create saml test configuration |
AuthApi | delete_embed_secret | DELETE /embed_config/secrets/{embed_secret_id} | delete embed secret |
AuthApi | delete_saml_test_config | DELETE /saml_test_configs/{test_slug} | delete saml test configuration |
AuthApi | embed_config | GET /embed_config | get embed config |
AuthApi | embed_secret | GET /embed_config/secrets/{embed_secret_id} | get embed secret |
AuthApi | fetch_and_parse_saml_idp_metadata | POST /fetch_and_parse_saml_idp_metadata | fetch and parse saml idp metadata xml |
AuthApi | ldap_config | GET /ldap_config | get ldap configuration |
AuthApi | parse_saml_idp_metadata | POST /parse_saml_idp_metadata | parse saml idp metadata xml |
AuthApi | saml_config | GET /saml_config | get saml configuration |
AuthApi | saml_test_config | GET /saml_test_configs/{test_slug} | get saml test configuration |
AuthApi | test_ldap_config_auth | PUT /ldap_config/test_auth | test ldap auth config |
AuthApi | test_ldap_config_connection | PUT /ldap_config/test_connection | test ldap connection config |
AuthApi | test_ldap_config_user_auth | PUT /ldap_config/test_user_auth | test ldap user auth config |
AuthApi | test_ldap_config_user_info | PUT /ldap_config/test_user_info | test ldap user info config |
AuthApi | update_embed_config | PATCH /embed_config | update embed config |
AuthApi | update_embed_secret | PATCH /embed_config/secrets/{embed_secret_id} | update embed secret |
AuthApi | update_ldap_config | PATCH /ldap_config | update ldap configuration |
AuthApi | update_saml_config | PATCH /saml_config | update saml configuration |
ConfigApi | all_legacy_features | GET /legacy_features | get all legacy features |
ConfigApi | all_timezones | GET /timezones | get all timezones |
ConfigApi | backup_configuration | GET /backup_configuration | get backup configuration |
ConfigApi | legacy_feature | GET /legacy_features/{legacy_feature_id} | get legacy feature |
ConfigApi | update_backup_configuration | PATCH /backup_configuration | update backup configuration |
ConfigApi | update_legacy_feature | PATCH /legacy_features/{legacy_feature_id} | update legacy feature |
ConnectionApi | all_connections | GET /connections | get all connections |
ConnectionApi | all_dialect_infos | GET /dialect_info | get all dialect infos |
ConnectionApi | connection | GET /connections/{connection_name} | get connection |
ConnectionApi | create_connection | POST /connections | create connection |
ConnectionApi | delete_connection | DELETE /connections/{connection_name} | delete connection |
ConnectionApi | test_connection | PUT /connections/{connection_name}/test | test existing connection |
ConnectionApi | test_connection_config | PUT /connections/test | test connection configuration |
ConnectionApi | update_connection | PATCH /connections/{connection_name} | update connection |
DashboardApi | all_dashboards | GET /dashboards | get all dashboards |
DashboardApi | copy_dashboards | POST /dashboards/copy | copy dashboards to space |
DashboardApi | create_dashboard | POST /dashboards | create dashboard |
DashboardApi | create_dashboard_prefetch | POST /dashboards/{dashboard_id}/prefetch | create a prefetch |
DashboardApi | dashboard | GET /dashboards/{dashboard_id} | get dashboard |
DashboardApi | dashboard_prefetch | GET /dashboards/{dashboard_id}/prefetch | get a prefetch |
DashboardApi | dashboards_move_plan | GET /dashboards/move_plan | plan for moving dashboards to space |
DashboardApi | delete_dashboard | DELETE /dashboards/{dashboard_id} | delete dashboard |
DashboardApi | move_dashboards | PATCH /dashboards/move | move dashboards to space |
DashboardApi | update_dashboard | PATCH /dashboards/{dashboard_id} | update dashboard |
LookApi | all_looks | GET /looks | get all looks |
LookApi | create_look_prefetch | POST /looks/{look_id}/prefetch | create a prefetch |
LookApi | look | GET /looks/{look_id} | get look |
LookApi | look_prefetch | GET /looks/{look_id}/prefetch | get a prefetch |
LookApi | run_look | GET /looks/{look_id}/run/{format} | run look |
ProjectApi | reset_project_to_production | POST /projects/{project_id}/reset_to_production | Reset a project to the version that is in production. |
QueryApi | create_query | POST /queries | create query |
QueryApi | create_query_and_run_async | POST /queries/run_async | Create a Query and run it asynchronously. |
QueryApi | query | GET /queries/{query_id} | get query |
QueryApi | query_for_slug | GET /queries/slug/{slug} | get query for slug |
QueryApi | query_task | GET /query_tasks/{query_task_id} | Get a Query Task |
QueryApi | query_task_multi_results | GET /query_tasks/multi_results | Get multiple query task results in one request. |
QueryApi | query_task_results | GET /query_tasks/{query_task_id}/results | Get a Query Task's results |
QueryApi | run_async | POST /queries/{query_id}/run_async | Run a Query asynchronously. |
QueryApi | run_inline_query | POST /queries/run/{format} | run inline query |
QueryApi | run_query | GET /queries/{query_id}/run/{format} | run query |
QueryApi | run_url_encoded_query | GET /queries/models/{model_name}/views/{view_name}/run/{format} | run url encoded query |
RoleApi | all_model_sets | GET /model_sets | get all model sets |
RoleApi | all_permission_sets | GET /permission_sets | get all permission sets |
RoleApi | all_permissions | GET /permissions | get all permissions |
RoleApi | all_roles | GET /roles | get all roles |
RoleApi | create_model_set | POST /model_sets | create a model set |
RoleApi | create_permission_set | POST /permission_sets | create a permission set |
RoleApi | create_role | POST /roles | create a role |
RoleApi | delete_model_set | DELETE /model_sets/{model_set_id} | delete a model set |
RoleApi | delete_permission_set | DELETE /permission_sets/{permission_set_id} | delete a permission set |
RoleApi | delete_role | DELETE /roles/{role_id} | delete a role |
RoleApi | model_set | GET /model_sets/{model_set_id} | Get a model set |
RoleApi | permission_set | GET /permission_sets/{permission_set_id} | Get a permission set |
RoleApi | role | GET /roles/{role_id} | Get a role |
RoleApi | role_users | GET /roles/{role_id}/users | Get users with role |
RoleApi | set_role_users | PUT /roles/{role_id}/users | Set users with role |
RoleApi | update_model_set | PATCH /model_sets/{model_set_id} | update a model set |
RoleApi | update_permission_set | PATCH /permission_sets/{permission_set_id} | update a permission set |
RoleApi | update_role | PATCH /roles/{role_id} | update a role |
RunningQueriesApi | all_running_queries | GET /running_queries | get all running queries |
RunningQueriesApi | kill_query | DELETE /running_queries/{query_slug} | Kill a running query |
ScheduledPlanApi | all_scheduled_plans | GET /scheduled_plans | get all scheduled plans |
ScheduledPlanApi | create_scheduled_plan | POST /scheduled_plans | create scheduled plan |
ScheduledPlanApi | create_scheduled_plan_destination | POST /scheduled_plan_destinations | create scheduled plan destination |
ScheduledPlanApi | delete_scheduled_plan | DELETE /scheduled_plans/{scheduled_plan_id} | delete scheduled plan |
ScheduledPlanApi | delete_scheduled_plan_destination | DELETE /scheduled_plan_destinations/{scheduled_plan_destination_id} | delete scheduled plan destination |
ScheduledPlanApi | scheduled_plan | GET /scheduled_plans/{scheduled_plan_id} | get scheduled plan |
ScheduledPlanApi | scheduled_plan_destination | GET /scheduled_plan_destinations/{scheduled_plan_destination_id} | get scheduled plan destination |
ScheduledPlanApi | scheduled_plans_by_dashboard | GET /scheduled_plans/dashboard/{dashboard_id} | get all scheduled plans for a given dashboard for the requesting user |
ScheduledPlanApi | scheduled_plans_by_look | GET /scheduled_plans/look/{look_id} | get all scheduled plans for a given look for the requesting user |
ScheduledPlanApi | scheduled_plans_by_lookml_dashboard | GET /scheduled_plans/lookml_dashboard/{lookml_dashboard_id} | get all scheduled plans for a given lookml dashboard for the requesting user |
ScheduledPlanApi | scheduled_plans_by_space | GET /scheduled_plans/space/{space_id} | get all scheduled plans for a given space for the requesting user |
ScheduledPlanApi | update_scheduled_plan | PATCH /scheduled_plans/{scheduled_plan_id} | update scheduled plan |
ScheduledPlanApi | update_scheduled_plan_destination | PATCH /scheduled_plan_destinations/{scheduled_plan_destination_id} | update scheduled plan destination |
SpaceApi | all_spaces | GET /spaces | get all spaces |
SpaceApi | create_space | POST /spaces | create space |
SpaceApi | delete_space | DELETE /spaces/{space_id} | delete space |
SpaceApi | space | GET /spaces/{space_id} | get space |
SpaceApi | space_ancestors | GET /spaces/{space_id}/ancestors | get ancestors of space |
SpaceApi | space_children | GET /spaces/{space_id}/children | get children of space |
SpaceApi | space_children_search | GET /spaces/{space_id}/children/search | search children of space |
SpaceApi | space_parent | GET /spaces/{space_id}/parent | get parent of space |
SpaceApi | update_space | PATCH /spaces/{space_id} | update space |
SqlQueryApi | create_sql_query | POST /sql_queries | create SQL Runner query |
SqlQueryApi | sql_query | GET /sql_queries/{slug} | get SQL Runner query |
StoryApi | all_stories | GET /stories | Get all stories |
StoryApi | story | GET /stories/{story_id} | Get a story |
StoryApi | story_assets | GET /stories/assets | Get assets used by stories |
UploadApi | all_uploads | GET /uploads | get all uploads |
UploadApi | create_upload | POST /uploads | Upload a csv file and return the inferred table definition |
UploadApi | delete_upload | DELETE /uploads/{upload_id} | Delete UploadTable and drop upload created table if exists |
UploadApi | get_upload | GET /uploads/{upload_id} | Get table definition for an upload |
UploadApi | get_upload_lookml | GET /uploads/{upload_id}/lookml | Get the generated lookml for a table created via upload |
UploadApi | load_upload | POST /uploads/{upload_id} | Upload contents of a file to create and load a table in the DB |
UploadApi | update_upload | PUT /uploads/{upload_id} | Update upload table definition and create/load the DB table |
UserApi | all_user_access_filters | GET /users/{user_id}/access_filters | get all Access filters |
UserApi | all_user_credentials_api3s | GET /users/{user_id}/credentials_api3 | get all API 3 credentials |
UserApi | all_user_credentials_embeds | GET /users/{user_id}/credentials_embed | get all Embedding credentials |
UserApi | all_user_sessions | GET /users/{user_id}/sessions | get all Web login sessions |
UserApi | all_users | GET /users | get all users |
UserApi | create_user | POST /users | create a user |
UserApi | create_user_access_filter | POST /users/{user_id}/access_filters | create Access filter |
UserApi | create_user_credentials_api | POST /users/{user_id}/credentials_api | create API credential |
UserApi | create_user_credentials_api3 | POST /users/{user_id}/credentials_api3 | create API 3 credential |
UserApi | create_user_credentials_email | POST /users/{user_id}/credentials_email | create email/password credential |
UserApi | create_user_credentials_email_password_reset | POST /users/{user_id}/credentials_email/password_reset | create a email/password credential password reset token |
UserApi | create_user_credentials_totp | POST /users/{user_id}/credentials_totp | create Two-factor credential |
UserApi | delete_user | DELETE /users/{user_id} | delete a user |
UserApi | delete_user_access_filter | DELETE /users/{user_id}/access_filters/{access_filter_id} | delete Access filter |
UserApi | delete_user_credentials_api | DELETE /users/{user_id}/credentials_api | delete API credential |
UserApi | delete_user_credentials_api3 | DELETE /users/{user_id}/credentials_api3/{credentials_api3_id} | delete API 3 credential |
UserApi | delete_user_credentials_email | DELETE /users/{user_id}/credentials_email | delete email/password credential |
UserApi | delete_user_credentials_embed | DELETE /users/{user_id}/credentials_embed/{credentials_embed_id} | delete Embedding credential |
UserApi | delete_user_credentials_google | DELETE /users/{user_id}/credentials_google | delete Google auth credential |
UserApi | delete_user_credentials_ldap | DELETE /users/{user_id}/credentials_ldap | delete LDAP credential |
UserApi | delete_user_credentials_looker_openid | DELETE /users/{user_id}/credentials_looker_openid | delete Looker Openid credential |
UserApi | delete_user_credentials_saml | DELETE /users/{user_id}/credentials_saml | delete Saml auth credential |
UserApi | delete_user_credentials_totp | DELETE /users/{user_id}/credentials_totp | delete Two-factor credential |
UserApi | delete_user_session | DELETE /users/{user_id}/sessions/{session_id} | delete Web login session |
UserApi | me | GET /user | Get current user |
UserApi | search_users | GET /users/search | search users |
UserApi | search_users_names | GET /users/search/names/{pattern} | search users names |
UserApi | set_user_roles | PUT /users/{user_id}/roles | Set roles for a user |
UserApi | update_user | PATCH /users/{user_id} | update a user |
UserApi | update_user_access_filter | PATCH /users/{user_id}/access_filters/{access_filter_id} | update Access filter |
UserApi | update_user_credentials_email | PATCH /users/{user_id}/credentials_email | update email/password credential |
UserApi | user | GET /users/{user_id} | Get a user |
UserApi | user_access_filter | GET /users/{user_id}/access_filters/{access_filter_id} | get Access filter |
UserApi | user_credentials_api | GET /users/{user_id}/credentials_api | get API credential |
UserApi | user_credentials_api3 | GET /users/{user_id}/credentials_api3/{credentials_api3_id} | get API 3 credential |
UserApi | user_credentials_email | GET /users/{user_id}/credentials_email | get email/password credential |
UserApi | user_credentials_embed | GET /users/{user_id}/credentials_embed/{credentials_embed_id} | get Embedding credential |
UserApi | user_credentials_google | GET /users/{user_id}/credentials_google | get Google auth credential |
UserApi | user_credentials_ldap | GET /users/{user_id}/credentials_ldap | get LDAP credential |
UserApi | user_credentials_looker_openid | GET /users/{user_id}/credentials_looker_openid | get Looker Openid credential |
UserApi | user_credentials_saml | GET /users/{user_id}/credentials_saml | get Saml auth credential |
UserApi | user_credentials_totp | GET /users/{user_id}/credentials_totp | get Two-factor credential |
UserApi | user_roles | GET /users/{user_id}/roles | Get roles for a user |
UserApi | user_session | GET /users/{user_id}/sessions/{session_id} | get Web login session |
- AccessFilter
- AccessToken
- AsyncQuery
- BackupConfiguration
- CredentialsApi
- CredentialsApi3
- CredentialsEmail
- CredentialsEmbed
- CredentialsGoogle
- CredentialsLDAP
- CredentialsLookerOpenid
- CredentialsSaml
- CredentialsTotp
- DBConnection
- DBConnectionBase
- DBConnectionTestResult
- Dashboard
- DashboardBase
- DashboardElement
- DashboardFilter
- DashboardLayout
- DashboardLayoutComponent
- Dialect
- DialectInfo
- DialectInfoOptions
- EmbedCheckDomainResult
- EmbedConfig
- EmbedSecret
- Error
- LDAPConfig
- LDAPConfigTestResult
- LDAPGroupRead
- LDAPGroupWrite
- LDAPUser
- LegacyFeature
- Look
- LookBasic
- LookMovePlan
- LookWithDashboards
- LookWithQuery
- LookmlSpace
- ModelSet
- Permission
- PermissionSet
- PrefetchAccessFilterValue
- PrefetchDashboardFilterValue
- PrefetchDashboardRequestMapper
- PrefetchLookRequestMapper
- PrefetchMapper
- ProjectListItem
- Query
- Role
- RunningQueries
- SamlConfig
- SamlGroupRead
- SamlGroupWrite
- SamlMetadataParseResult
- ScheduledJob
- ScheduledJobDestination
- ScheduledJobStage
- ScheduledPlan
- ScheduledPlanDestination
- Session
- Space
- SpaceBase
- SqlQuery
- Story
- StoryAssets
- StoryListItem
- Timezone
- UploadTable
- User
- UserIdOnly
- UserPublic
- ValidationError
All endpoints do not require authorization.