Category / Section
How to connect Google Cloud Storage in Bold BI through WEB API connector?
Published:
Integrating Google Cloud Storage with Bold BI can be achieved through the WEB API connector. This integration allows you to access and visualize your data stored in Google Cloud Storage within your Bold BI dashboards. Here’s a step-by-step guide to setting up the connection:
Prerequisites
- A Google Cloud account with access to Google Cloud Storage.
- A Bold BI account.
Steps to Connect Google Cloud Storage to Bold BI
Setting Up Google Cloud Console
-
Create an App in Google Cloud Console:
- Navigate to the Google Cloud Console and create a new application or use your existing application.
- Enable the following scopes for your application to obtain the necessary permissions:
- Profile
https://www.googleapis.com/auth/devstorage.full_control
https://www.googleapis.com/auth/devstorage.read_only
https://www.googleapis.com/auth/devstorage.read_write
- Obtain the client ID and client secret for your application.
-
Configure Redirect URL:
- Add
https://developers.google.com/oauthplayground
as the redirect URL for your app.
- Add
Obtaining Access Tokens
- Use Google Developer Playground:
- Visit Google Developer Playground.
- Click the settings icon and enter your client ID and client secret.
- Select all the required scopes for Google Cloud Storage and authorize the API.
- Proceed with the Unsafe mode if warned about unverified apps.
- Exchange the authorization code for tokens to get the refresh token.
- Save Credentials:
- Make a note of the client ID, client secret, and refresh token.
Configuring Bold BI
- Create Dashboard in Bold BI:
- Log in to Bold BI and create a new dashboard.
- Set Up WEB API Data Source for token:
- Create a WEB API data source to generate the access token with the following settings:
- URL:
https://oauth2.googleapis.com/token
- Method: POST
- Parameters:
client_id
- Your client IDclient_secret
- Your client secretrefresh_token
- The refresh token obtained previouslygrant_type
-refresh_token
- URL:
- Create a WEB API data source to generate the access token with the following settings:
- Schedule Data Source Refresh:
- Schedule the data source to refresh every hour to ensure a valid access token is always available.
- Configure Access Token in Dashboard Parameter:
- In the data source designer page, click the dashboard parameter icon.
- Save the dashboard parameter with the access token value.
- Set up another Web API data source:
- Create another WEB API data source with the following settings:
- URL:
https://storage.googleapis.com/storage/v1/b/{your-bucket-name}/o/{your-filename}.json
- Method: GET
- Headers:
Authorization
– Use the Bearer token syntax with the access token saved as a dashboard parameter from Step 8.
- URL:
- Create another WEB API data source with the following settings:
- Add dashboard parameter:
- Once the above data source is saved, Create a dashboard parameter for the URL obtained from the mediaLink field.
- Save the data source.
- Create the final Web API Data Source:
- Use the URL from the second data source (Step 10) and the token from the first data source (Step 8).
- Set the method to GET.
- Preview, connect, and save the data source.
- Utilize Data Source for Dashboard:
- The configured data source is now ready to be used for creating dashboards in Bold BI.
Conclusion
By following these steps, you can successfully connect Google Cloud Storage to Bold BI using the WEB API connector. This integration will enable you to visualize and analyze your cloud storage data directly within Bold BI dashboards.