Azure-Samples / powerbi-powershell

Samples for calling the Power BI REST API via PowerShell
MIT License
260 stars 191 forks source link

update parameters #27

Open cramtorte opened 5 years ago

cramtorte commented 5 years ago

@guyinacube Not an issue per se but can you post the updateparameters script from your vid?

joebaratto22 commented 5 years ago

@guyinacube I'm looking for this as well

cramtorte commented 5 years ago

@guyinacube I'm looking for this as well

@joebaratto22 - here is a snippet, hope it helps:

$updateDetails = @{ 
    updateDetails = @( 

        @{

            name = 'Parameter1_Name'
            newValue = 'YOURPARAMVALUE'
        },
        @{       
            name = 'Parameter2_Name'
            newValue = 'YOURPARAMVALUE'
        }
    )                                        
}
"== Updating Report OBDC Parameter"
$udpateParamUri = "https://api.powerbi.com/v1.0/myorg/groups/$destGroupID/datasets/$dSetToUpdate/Default.UpdateParameters"

$body = $updateDetails | ConvertTo-Json
Invoke-RestMethod -Uri $udpateParamUri -Headers $auth_header -Body $body -Method POST -Verbose
joebaratto22 commented 5 years ago

@cramtorte Thank you!

canbicak commented 2 years ago

@guyinacube I'm looking for this as well

@joebaratto22 - here is a snippet, hope it helps:

$updateDetails = @{ 
    updateDetails = @( 

        @{

            name = 'Parameter1_Name'
            newValue = 'YOURPARAMVALUE'
        },
        @{       
            name = 'Parameter2_Name'
            newValue = 'YOURPARAMVALUE'
        }
    )                                        
}
"== Updating Report OBDC Parameter"
$udpateParamUri = "https://api.powerbi.com/v1.0/myorg/groups/$destGroupID/datasets/$dSetToUpdate/Default.UpdateParameters"

$body = $updateDetails | ConvertTo-Json
Invoke-RestMethod -Uri $udpateParamUri -Headers $auth_header -Body $body -Method POST -Verbose

' Hi, where can i find the full code? Kind regards,

Can