Forum Discussion

Harithh's avatar
Harithh
Frequent Visitor
1 year ago
Solved

Seeking a Working Solution for GitHub Enterprise with PowerBI

Hi Everyone, For context I am still a beginner in this platform and tools. I’ve been exploring ways to integrate GitHub Enterprise with Power BI to create a dashboard that includes metrics like pen...
  • Anonymous's avatar
    Anonymous
    1 year ago
     Hi Harithh,
     
     Thank for reaching out in Microsoft Community Forum.

     Please follow the below steps to specify the hostname while connecting with power BI;
     
     1.usually GitHub Enterprise exposes its API at a specific URL in this format:https://<your-enterprise-hostname>/api/v3/ please replace with <your-enterprise-hostname> with the actual hostname of your GitHub Enterprise instance.
     
     2.Use Power BI's Web Connector:
    a.Open Power BI Desktop.
    b.Click on Get Data > Web.
     In the URL field, enter the GitHub Enterprise API endpoint, for example: https://<your-enterprise-hostname>/api/v3/repos
     
     3. Authenticate to the GitHub Enterprise API:
     When prompted, choose Basic Authentication or OAuth 2.0 depending on your GitHub Enterprise setup.
     For Basic Authentication: Provide your GitHub Enterprise username and a personal access token (PAT) as the password.
     For OAuth 2.0: Follow the steps outlined by your GitHub Enterprise administrator to get an OAuth token.
     
     4. Fetch Data from Specific Endpoints:
     Use the REST API endpoints relevant to your data needs, such as:
     List all repositories: https://<your-enterprise-hostname>/api/v3/orgs/<org-name>/repos
     List pull requests: https://<your-enterprise-hostname>/api/v3/repos/<owner>/<repo>/pulls
     Test the API endpoints in a browser or a tool like Postman first to ensure they return the expected data.
     
     Thank you,
     Pavan.