Forum Discussion
Failing: CloneTileInGroupAsync() in .NET API v2
- Anonymous4 years ago
Three weeks after I opened a support ticket on this, it finally got transfered to a team with REST API expertise. And they found the solution. When constructing a CloneTIleRequest object, we need to omit the target workspace id, and instead we need to include the target dataset id (which the class calls the "model ID"). So the object declaration should be:
var cloneRequest = new CloneTileRequest
{
TargetDashboardId = newDashboard.Id,
TargetReportId = targetReport.Id,TargetModelId = targetReport.DatasetId
};In my opinion the API documentation on this is incorrect. It says: “targetModelId - string - Optional. A parameter for specifying a target model ID. When cloning a tile linked to a dataset, pass the target model ID to rebind the new tile to a different dataset.” This implies that the parameter should not be sent if a tile is linked to a report not a dataset. Our support ticket would have been unnecessary if the documentation had described the purpose of this parameter correctly. See Dashboards - Clone Tile - REST API (Power BI Power BI REST APIs) | Microsoft Docs
I appreciate Microsoft support for showing us how to solve this. I wish Power BI REST APIs were better documented. And I really wish customers could get more usefull diagnostic information with API calls fail.
Ibendlin,
Thank you. I've opened a support ticket but I'm not sure if they'll help me. My initial contact person said she only works on "break/fix issues", and I have no idea if that's what this is.
Tell her you want the ticket forwarded to the next level. It may take a while but so far all our tickets have eventually been resolved. You have leverage because only you can allow the ticket to be closed.