Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
bprob
New Member

URL for HttpWebRequerst

Hi, I try to get a Power Bi Report List per c# code. My problem is to find the right URL for my workspace.

The error happens, when I try to get the report list from the xml string in line:

 

PBIReports PBIReports = JsonConvert.DeserializeObject<PBIReports>(json)

 

Can someone help please, I try:

 

var uri = String.Format("https://api.powerbi.com/v1.0/collections/{0}/workspaces/{1}/reports", workspaceName, workspaceId);

 

How I get workspaceName and the

workspaceId ?

 

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee


@bprob wrote:

Hi, I try to get a Power Bi Report List per c# code. My problem is to find the right URL for my workspace.

The error happens, when I try to get the report list from the xml string in line:

 

PBIReports PBIReports = JsonConvert.DeserializeObject<PBIReports>(json)

 

Can someone help please, I try:

 

var uri = String.Format("https://api.powerbi.com/v1.0/collections/{0}/workspaces/{1}/reports", workspaceName, workspaceId);

 

How I get workspaceName and the

workspaceId ?

 


@bprob

That collections and workspaces are for Power BI Embedded. You could find  the collection name, workspaceid and accesskey in Azure portal.

 

GET /v1.0/collections/cisdemo/workspaces/79c71931-de23-49a8-a3c8-b79d2192fe0b/reports HTTP/1.1
Host: api.powerbi.com
Authorization: AppKey KJixsmmw+NGNOtjDZTLOMxxxxxxxxxxxHFp7G45RYHRIO23ViXY8iE/zNVHROCmcaOIFr6a2vmQ==

Capture.PNG

 

 

To get the reports from Power BI Service, you could reference

 

GET /v1.0/myorg/groups/dc581184-a209-463b-8446-5432f16b6c15/reports HTTP/1.1
Host: api.powerbi.com
Authorization: Bearer eyJ0eXAiOiJKV1QixxxxxxxxPclZvM0Q1_m0Y3PA0k0pnytbhhcAzpzS2Mw
Content-Type: application/json

View solution in original post

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee


@bprob wrote:

Hi, I try to get a Power Bi Report List per c# code. My problem is to find the right URL for my workspace.

The error happens, when I try to get the report list from the xml string in line:

 

PBIReports PBIReports = JsonConvert.DeserializeObject<PBIReports>(json)

 

Can someone help please, I try:

 

var uri = String.Format("https://api.powerbi.com/v1.0/collections/{0}/workspaces/{1}/reports", workspaceName, workspaceId);

 

How I get workspaceName and the

workspaceId ?

 


@bprob

That collections and workspaces are for Power BI Embedded. You could find  the collection name, workspaceid and accesskey in Azure portal.

 

GET /v1.0/collections/cisdemo/workspaces/79c71931-de23-49a8-a3c8-b79d2192fe0b/reports HTTP/1.1
Host: api.powerbi.com
Authorization: AppKey KJixsmmw+NGNOtjDZTLOMxxxxxxxxxxxHFp7G45RYHRIO23ViXY8iE/zNVHROCmcaOIFr6a2vmQ==

Capture.PNG

 

 

To get the reports from Power BI Service, you could reference

 

GET /v1.0/myorg/groups/dc581184-a209-463b-8446-5432f16b6c15/reports HTTP/1.1
Host: api.powerbi.com
Authorization: Bearer eyJ0eXAiOiJKV1QixxxxxxxxPclZvM0Q1_m0Y3PA0k0pnytbhhcAzpzS2Mw
Content-Type: application/json

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors