cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Clone Report - targetWorkspaceId and targetModelId

I am looking to use the clone report Power BI REST API resource. In the request, the 'targetModelId' and the 'targetWorkspaceId' are required strings. What are these values? Where can I find or obtain these values? What is 'targetModelId' and 'targetWorkspaceId'?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: Clone Report - targetWorkspaceId and targetModelId

Hi,

 

You can clone a report into the same workspace, or you can clone the report to a different workspace.

TargetWorkspaceId is the ID of the workspace where you want to clone the report.

TargetModelId is the ID of the dataset in the target workspace from where the report will take the data.

To obtain the values, you can loop through the reports and dashboards collections in the target database, and get the id.

If you need more help let me know.

Mariano

View solution in original post

2 REPLIES 2
Highlighted
Frequent Visitor

Re: Clone Report - targetWorkspaceId and targetModelId

Hi,

 

You can clone a report into the same workspace, or you can clone the report to a different workspace.

TargetWorkspaceId is the ID of the workspace where you want to clone the report.

TargetModelId is the ID of the dataset in the target workspace from where the report will take the data.

To obtain the values, you can loop through the reports and dashboards collections in the target database, and get the id.

If you need more help let me know.

Mariano

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Clone Report - targetWorkspaceId and targetModelId

Hi @ac17211 

 

I hope you are successful in cloning the report from one workspace to another workspace.

Can you please share me the script for cloning the report?

 

I have been trying to clone the report using the "Try it" option on this below link and keep getting the below error

 

{
  "error": {
    "code": "BadRequest",
    "message": "Bad Request",
    "details": [
      {
        "message": "Error converting value \"6778155\" to type 'System.Nullable`1[System.Guid]'. Path 'targetModelId', line 3, position 32.",
        "target": "request.targetModelId"
      }
    ]
  }
}

 https://docs.microsoft.com/en-us/rest/api/power-bi/reports/clonereportingroup#clonereportrequest

Helpful resources

Announcements
Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!