Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
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"
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.
I was using Web API key method, and as you can see I'm specifying API Key in connection string.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
26 | |
3 | |
2 | |
2 | |
2 |