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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Connect GitHub using API error

Hi!

 

Need to connect GitHub to Power BI using the API. As Power BI connector doesn't give a lot of information, specifically pull requests reviewers. And I'm wondering if it's or Power BI, or I have not enough rights, or something else?

 

I'm receiving error:

 

Web.Contents failed to get contents from 'https://api.github.com/repos/owner/repo/pulls?state=all' (404): Not Found

 

My source code:

let
Source = Web.Contents("https://api.github.com/repos/owner/repo/pulls?state=all", [ApiKeyName="xxxxxxxx"])
in
Source

 

Many thanks in advance!

5 REPLIES 5
lbendlin
Super User
Super User

This seems to work. Did you specify the owner and repo names?

 

let
    Source = Json.Document(Web.Contents("https://api.github.com/repos/migueesc123/PowerBIRESTAPI/pulls?state=all")),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"url", "id", "node_id", "html_url", "diff_url", "patch_url", "issue_url", "number", "state", "locked", "title", "user", "body", "created_at", "updated_at", "closed_at", "merged_at", "merge_commit_sha", "assignee", "assignees", "requested_reviewers", "requested_teams", "labels", "milestone", "draft", "commits_url", "review_comments_url", "review_comment_url", "comments_url", "statuses_url", "head", "base", "_links", "author_association", "auto_merge", "active_lock_reason"}, {"url", "id", "node_id", "html_url", "diff_url", "patch_url", "issue_url", "number", "state", "locked", "title", "user", "body", "created_at", "updated_at", "closed_at", "merged_at", "merge_commit_sha", "assignee", "assignees", "requested_reviewers", "requested_teams", "labels", "milestone", "draft", "commits_url", "review_comments_url", "review_comment_url", "comments_url", "statuses_url", "head", "base", "_links", "author_association", "auto_merge", "active_lock_reason"})
in
    #"Expanded Column1"
Anonymous
Not applicable

Yes, of course, I specified owner and repo.

Can it be caused because of the fact that my owner is organization and repository is private? Maybe there are some other attributes needed to connect to such type of repository?

Could be.  Most likely anonymous auth wouldn't work in that case. Delete your global permissions and try a different auth method.

Anonymous
Not applicable

I was using Web API key method, and as you can see I'm specifying API Key in connection string. 

Did you go through all these steps?

Basics of authentication - GitHub Docs

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.