Forum Discussion
Call any Power BI REST API with PowerShell issue
- Anonymous4 years ago
HI kanth999,
I think you may miss the required part in the request so these requests do not work.
It works well when I test the script with all required parameters: (since the API has no response so I check that in my workspace and you can find the dataset has been updated correctly)
Datasets - Refresh Dataset - REST API (Power BI Power BI REST APIs) | Microsoft Docs
Test script:
$Body ="{'notifyOption'='NoNotification'}" Invoke-PowerBIRestMethod -Url 'datasets/62b66b9e-a296-439f-8fb2-95b526196c13/refreshes' -Method Post -Body $BodyRegards,
Xiaoxin Sheng
HI kanth999,
I think you may miss the required part in the request so these requests do not work.
It works well when I test the script with all required parameters: (since the API has no response so I check that in my workspace and you can find the dataset has been updated correctly)
Datasets - Refresh Dataset - REST API (Power BI Power BI REST APIs) | Microsoft Docs
Test script:
$Body ="{'notifyOption'='NoNotification'}"
Invoke-PowerBIRestMethod -Url 'datasets/62b66b9e-a296-439f-8fb2-95b526196c13/refreshes' -Method Post -Body $Body
Regards,
Xiaoxin Sheng
Can you please let me know, is there are any documents that will run the PowerShell commandlet in Mac os?, Mac OS is suitable to run the PowerShell commands ?
- Anonymous4 years agoNot applicable
HI kanth999,
If the modules do not require any additional package that your system does not support, you can also run these on the mac os system.
I check the document and found it seems not to include any additional software requirements so I think these scripts may also work on your device. (prerequisites are for PowerShell itself: windows system PowerShell 3.0 and .net 4.7.1, other types of system PowerShell core support and PowerShell core v6)Power BI Cmdlets reference | Microsoft Docs
Regards,
Xiaoxin Sheng