How to execute Bold BI rest API using PowerShell scripts?
Executing Bold BI REST API with PowerShell
This article provides a step-by-step guide on how to execute Bold BI REST APIs using PowerShell scripts. For this example, we will focus on the Copy Dashboard API.
Prerequisites
Before you begin, ensure that you have the following:
- PowerShell installed on your system.
- Access to Bold BI Server.
- An authorization token for the Bold BI API.
Step 1: Prepare the PowerShell Script
Download or create a PowerShell script designed to interact with the Bold BI REST API. For the purpose of this guide, we will refer to the script as CopyDashboard.ps1
.
Step 2: Execute the Script
Open PowerShell and navigate to the directory containing the CopyDashboard.ps1
script. Execute the script by typing the following command:
.\CopyDashboard.ps1
Step 3: Enter Server Details
Upon execution, the script will prompt you to enter the following Bold BI server details:
- Domain Name: The domain where your Bold BI server is hosted.
- Site Category: The category within Bold BI where your dashboard resides.
- Authorization Token: The token that authenticates your API request.
Step 4: Provide Dashboard Information
Next, you will need to provide information about the dashboard you wish to copy:
- Dashboard Name: The name of the dashboard to be copied.
- Category ID: The ID of the category where the dashboard should be copied.
- Public Dashboard: Specify whether the copied dashboard should be public.
- Copy Data Source: Indicate if the data source should be copied along with the dashboard.
Step 5: Receive the Result
After you have provided all the necessary information, the script will send a request to the server. The result of the operation will be displayed in the PowerShell window.
Conclusion
By following these steps, you can successfully execute Bold BI REST APIs using PowerShell scripts. This method can be applied to other APIs provided by Bold BI by adjusting the script accordingly.
Additional References
Please note that the above steps are based on the specific example of copying a dashboard. For other API operations, refer to the Bold BI Server API Reference and modify the script as needed.