Forum Discussion
Import to group via API
- Anonymous7 years ago
I narrowed down the bug and found a workaround. (Or rather, I found the workaround, which informed the bug.)
The API is generally case insensitive. As a long time PowerShell guy, I default to initial caps in such circumstances, as that's what PowerShell people are used to. Turns out this bug only appears when /groups is not in all lowercase. /Imports can be in whatever case you want. /Groups can be whatever case you want in other API calls.
But when creating a new import job, this works:
https://api.powerbi.com/v1.0/myorg/groups/[guid]/ImPoRtS?datasetDisplayName=TestFile.pbix
And this leads to the bug:
https://api.powerbi.com/v1.0/myorg/Groups/[guid]/Imports?datasetDisplayName=TestFile.pbix
Thanks,
Tim Curwick.
I narrowed down the bug and found a workaround. (Or rather, I found the workaround, which informed the bug.)
The API is generally case insensitive. As a long time PowerShell guy, I default to initial caps in such circumstances, as that's what PowerShell people are used to. Turns out this bug only appears when /groups is not in all lowercase. /Imports can be in whatever case you want. /Groups can be whatever case you want in other API calls.
But when creating a new import job, this works:
https://api.powerbi.com/v1.0/myorg/groups/[guid]/ImPoRtS?datasetDisplayName=TestFile.pbix
And this leads to the bug:
https://api.powerbi.com/v1.0/myorg/Groups/[guid]/Imports?datasetDisplayName=TestFile.pbix
Thanks,
Tim Curwick.