Forum Discussion

wasimCG's avatar
wasimCG
New Member
1 year ago
Solved

Automate Deployment Pipelines | Power BI API and Invoke-PowerBIRestMethod

Hello

 

I’m trying to automate the creation of Power BI deployment pipeline with stages using  azure yaml pipeline. My yaml code got the inspiration from the below example PowerShell script that was provided my Microsoft https://github.com/microsoft/PowerBI-Developer-Samples/blob/master/PowerShell%20Scripts/DeploymentPipelines-E2ESampleFromPipelineCreationToDeployment.ps1

 

 

I’m just wondering if the below two options are possible

 

 

I’m using the Power BI Rest API and Invoke-PowerBIRestMethod command to create deployment pipeline where it would have more than three stages Dev, Test and  Pre-Production and Production. After reading through lot of documentation, it seems to me that Power BI Rest API and Invoke-PowerBIRestMethod would only allow me to create three fixed default stages and I wont be able to add Pre-Production stage between Test and production. Is my statement correct?

 

 

The alternative approach is to create the deployment pipeline manually within the GUI itself where there is no stage restriction. Let’s say I create four stages in GUI, then I create a yaml automation pipeline that uses Power BI Rest API and Invoke-PowerBIRestMethod command. Would the Power BI Rest API and Invoke-PowerBIRestMethod command recognize and identify the existing deployment pipeline that was created manually especially the Pre-Production stage?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4 Replies