What type of API does Looker provide?
Looker has a REST API. Key points about Looker's API:
- It is a JSON-oriented REST API that provides access to most Looker functionality.
- It includes a wide range of endpoints for running queries, managing users, content, schedules, configurations, and more.
- As of Looker 22.4, the Looker API 4.0 is generally available.
- The API requires authentication using OAuth 2.0 bearer access tokens.
Does the Looker API have webhooks?
Yes, the official Looker API supports webhooks. Looker provides webhook functionality as part of its content delivery capabilities.
Looker allows you to send data using webhooks for the following types of events:
- Explore results: You can send one-time webhook deliveries for Explore results.
- Look results: You can set up both one-time and recurring webhook deliveries for Look results.
- Dashboard results: Similar to Looks, you can configure one-time and recurring webhook deliveries for Dashboard results.
Key points to consider:
- Webhook as a Delivery Option: Webhooks are one of several delivery options available in Looker, alongside email, Amazon S3 buckets, SFTP servers, and admin-enabled integrations.
- Content Types: The types of content that can be sent via webhooks include Explores, Looks, and Dashboards.
- Format Options: Depending on the content type, you can send data in various formats such as Data Table, Visualization, CSV, XLSX, JSON, Text, HTML, and PDF.
- Action API: Looker also provides an Action API, which is a webhook-like API that allows you to build custom actions. This API can be used to create an "Action Hub" that can be connected to one or more Looker instances.
- Authentication: When setting up webhooks or custom actions, you can implement authentication to ensure that the requests originate from an authorized Looker instance.
Best practices:
- Use appropriate authentication methods when implementing webhooks to ensure data security.
- Consider the format of the data you need when setting up webhooks, as different content types support different format options.
- For more complex integrations, explore the Action API to create custom actions that can be triggered from within Looker.
- When implementing custom actions, make use of the Action Execute Endpoint, which works similarly to a Looker webhook endpoint.
Rate Limits and other limitations
Based on the search results provided, here are the key points regarding the API Rate Limits of the Looker API:
Rate Limiting
The Looker API implements rate limiting to prevent excessive requests. When a user sends too many requests in a given amount of time, they may receive a 429 Too Many Requests error response.
Quota Limits
While the search results don't provide specific numbers for API rate limits, they do mention quota limits for accessing GA4 data through Looker Studio, which uses the Google Analytics API:
- There are 200,000 core tokens per property per day.
- There is a maximum of 40,000 tokens per property per hour.
- Paid Analytics 360 customers get 10 times more available tokens compared to unpaid standard properties.
Key Points to Consider
-
Most API requests should consume 10 tokens or less, according to Google.
-
To manage quota usage, Google recommends:
- Sending fewer API requests
- Sending less complex requests
-
These quota limits were increased in May 2023, representing a significant improvement over previous limits.
-
Different types of requests (e.g., Realtime, Funnel, Core) have separate quota categories.
Row Limits
While not directly related to API rate limits, it's worth noting that Looker implements row limits for certain operations:
- API calls based on an Explore, Look, or dashboard are subject to a 5,000 row limit.
- Certain download and schedule file formats can be unlimited.
- To download unlimited results with the API, use the appropriate Run call with the
limit
parameter set to -1
.
Best Practices
-
When using the API without an SDK, be aware of possible runtime errors depending on the language's type sensitivity.
-
Keep up to date with the latest API reference documentation for the most current information on changes and features.
-
Familiarize yourself with Looker's API and SDK support policies and versioning practices.
In conclusion, while the search results don't provide specific API rate limit numbers for the Looker API itself, they do offer insights into quota limits for related services and best practices for managing API usage. For the most accurate and up-to-date information on Looker API rate limits, it's recommended to consult the official Looker API documentation or contact Looker support directly.
Latest API Version
The most recent version of the Looker API is 4.0.
Key points to consider:
-
Looker API 4.0 became generally available in Looker 22.4 [1][2].
-
As of Looker 23.18, the previous version, Looker API 3.1, has been removed [1].
-
The current specific version of the API is 4.0.24.12, as mentioned in the API reference documentation [3].
-
Looker API 4.0 includes multiple breaking and additive changes, and promotes several endpoints from Beta to Stable [2].
-
Looker has updated both their officially supported and community-supported SDKs to support the Looker API 4.0 GA endpoints [2].
Best practices:
-
When developing new applications or updating existing ones, it's recommended to use the latest API version (4.0) to take advantage of new features and improvements [2].
-
Always refer to the most recent API reference documentation for the latest changes and additions to the API [2][3].
-
Be aware of any deprecated endpoints and plan to update your code accordingly to avoid issues in future releases [1].
-
Keep an eye on Looker's release notes for any updates or changes to the API [1].
-
When using beta endpoints, consider the potential impact of changes on your application and development cycle [1].
How to get a Looker developer account and API Keys?
To get a developer account for Looker to create an API integration, here are the key steps:
-
Contact Looker sales or support to request a developer instance.
-
Once you have a developer instance, you'll need to create API credentials:
- Go to the Users page in the Admin section of your Looker instance
- Create API credentials, which will include a client ID and client secret
-
API credentials are bound to a Looker user account. Requests will execute with the permissions of that user.
-
For production use, it's recommended to:
- Create a minimal privilege user account specifically for API activities (often called a "service account")
- Generate API credentials for this service account
- Grant only the necessary permissions for your intended API usage
-
To authenticate API requests:
- Use the client ID and secret to obtain an OAuth 2.0 access token from the Looker API login endpoint
- Include this access token in the Authorization header of API requests
-
Consider using one of Looker's official SDKs (Python, TypeScript, Ruby) to simplify authentication and API usage.
-
Familiarize yourself with the API documentation and Explorer to understand available endpoints.
What can you do with the Looker API?
Based on the search results provided, here is a list of data models you can interact with using the Looker API, along with what is possible for each:
User Data Model
- Manage users
- Create users
- Send custom welcome emails
Content Data Model
- Manage content
- Convert Looks to dashboard tiles
- Create and manage folders
- Generate PDFs of content
Query Data Model
- Run queries in various formats
- Retrieve query history
Schedule Data Model
- Manage schedules
- Create unique schedule plans
Instance Configuration Data Model
- Manage instance configurations
Embedding Data Model
- Embed Looker content
- Get signed embed URLs
Dashboard Data Model
- Create and edit dashboards
- Apply custom themes to embedded dashboards
Look Data Model
Data Dictionary Model
- Create a data dictionary using the API
Localization Model
- Localize Looker content using the API and translation services
Authentication Model
- Authenticate API requests
- Use OAuth for authentication
Folder Access Model
- Manage folder access permissions
Key points to consider:
- The Looker API 4.0 is the current stable version and is fully supported
- The API provides access to most Looker functionality via a REST API
- There are SDKs available for languages like Python, TypeScript, and Ruby to interact with the API
- The API can be explored and tested using the API Explorer tool
The Looker API allows for extensive interaction with various data models, enabling developers to automate tasks, integrate Looker with other systems, and build custom applications on top of Looker's functionality.