With Peaka as a Data Management Tool with UI, you can access all of its premium features through either its powerful API or/and its intuitive user interface (UI). Whether you prefer seamless automation via the API or a more visual approach using the UI, Peaka offers the flexibility to suit your needs. If you prefer to use Peaka exclusively as a connector solution, we provide a dedicated approach for that use case. To learn more about this focused implementation, please refer to the Peaka as a Connector-Only Solution section.
Embed Peaka’s UI in Your Web Application
You can easily integrate Peaka’s UI into your own web application. This allows your users to enjoy the full range of Peaka’s advanced features without ever leaving your platform. By embedding Peaka, you provide a seamless and cohesive experience, empowering your users with the tools they need to maximize productivity and efficiency.
Key Benefits:
- Access all premium features via API or UI.
- Embed Peaka’s UI directly into your web application.
- Deliver a unified experience for your users.
- Enhance productivity with Peaka’s advanced tools.
TLDR;
If you want to see it in action you can check our example applications that created in NextJs with Python/NodeJS backend.
Go to Python App
Go to Node App
Go to Running Example
Prerequisites
Initiate the Session
- To begin, you need to initiate a session with Peaka using your Partner API Key as the token.
- The endpoint will provide a URL to initiate your session.
You can access the user interface using the provided URL.
Enabling Embedded UI for Peaka Integration Using an iframe
For security reasons, you cannot use the session URL directly in an iframe. To embed Peaka within an iframe, you need to enable the embedded UI for your partner API key.
In order to do that you should;
Now you are ready to embed Peaka’s UI into your web application using an iframe.
Note: The application requires clipboard access to perform copy actions. Please ensure your iframe code includes allow=“clipboard-write *” to prevent browser blocking.
Note: If you want to switch between different themes in runtime you can do it with iframe’s post message method.
Congratulations! You have successfully embedded Peaka’s UI into your web application. Your users can now seamlessly interact with Peaka’s interface to manage their data efficiently and effectively.
Hiding Parts of the Embedded UI
In Embedded Mode, you can customize the Peaka UI by hiding specific components or features. To do this, use the featureFlags key when initiating the UI session. This allows you to tailor the interface to your application’s needs, ensuring a seamless and focused user experience.
Example:
When initializing the UI session, specify the features you want to hide or disable using the featureFlags configuration. This ensures that only the relevant parts of the UI are displayed to your users. For example you can hide queries sections in Peaka’s UI with following configuration.
For more details, refer to the Embedded API Reference.
Peaka as a Connector-Only Solution
When you need to use Peaka exclusively as a connector solution, you can configure the UI session to display only the connector functionality. This streamlined approach is perfect for applications that focus on data source connections without requiring the full Peaka studio experience.
First, initialize the session with following payload options:
Configuration Options:
SessionMode: Specifies the mode of the session. Available options are:
ConnectorType: Specifies the type of connector interface to display. Available options can be found in the API Reference.
CatalogCreateEnabled: Boolean flag that controls whether catalogs are automatically created when establishing connections. The default value is true. Set this to false only when using CONNECTOR_MODAL_ONLY mode to prevent automatic catalog creation.
CONNECTOR_MODAL_ONLY
FULL_STUDIO
Note: ConnectorType and CatalogCreateEnabled are only available in the CONNECTOR_MODAL_ONLY mode.
Example:
The API response includes sessionUrl and partnerOrigin properties, allowing you to open the Peaka interface in a popup window for seamless integration.
In this example, we’re using the CONNECTOR_MODAL_ONLY mode to display only the connector modal interface. We get the session URL and partner origin from the API response and open the Peaka interface in a popup window.
Troubleshooting
If you are having trouble with having status from the connector popup, follow these steps to troubleshoot the issue:
- Check if you have enabled Embedded UI Settings for your API Key.
- Add your domain that you want to embed the Peaka app to the Embedded UI Settings in the Developer Settings.