Using Github connection?

KatriM
KatriM Member

Hi,

Anyone using Github connection to/from Aperture? If so, for what kind of purpose(s)?

@Josh Boxer How would you recommend to use that?

Br, Katri

Comments

  • Tanj Jagpal
    Tanj Jagpal Administrator

    @Henry Simms @Seamus Kyle @Job any thoughts on this?

  • Henry Simms
    Henry Simms Administrator
    edited March 14

    I have experimented a little with calling the GitHub API from Data Studio. In my case I was looking at bringing in metrics like commit activity and page views for a specific repo.

    The way you'd approach this is to use the packaged Autonomous REST connector, and set up a .rest config file (defining a data model) using the AutoREST Composer, as described in this Community post.

    The GitHub API offers a number of authentication options, and of these Bearer Token auth and OAuth2 auth are supported by the driver. When I tested this out, I used OAuth2, and followed instructions in this tutorial from Progress, the driver providers.

    When I'd generated the necessary security tokens from GitHub and plugged them into the Composer, it looked like this:

    Clicking Fetch OAuth Token initiated the login and prompted me to authorize the app I'd created in GitHub:

    After successful auth, I was able to configure endpoints in the ARC. Note in the screenshot below:

    • Endpoints listed down the left of the page
    • Param config (typically user, repo) on the right

    I was then able to download the .rest config file from ARC and load data from the APIs into Data Studio. Create an External System referencing the .rest file with config based on the instructions in the Progress tutorial. You'll need a Credential, but this can have empty values.

    oAuth2 authentication connection string example

    jdbc:datadirect:autorest:
        config=C:\path\to\github.rest;
        clientId=123a4b567c8901234567d8901e234fg5;
        clientSecret=**************;
        authUri=https://github.com/login/oauth/authorize;
        tokenUri=https://github.com/login/oauth/access_token;
        redirectUri=http://localhost;
        authenticationMethod=OAuth2;
        refreshtoken=**************;
    
    

    BearerToken authentication connection string example

    jdbc:datadirect:autorest:
        config=C:\path\to\github.rest;
        authenticationmethod=BearerToken;
        securitytoken=**********;
    

    You'll mostly use SQL queries when loading data, to specify parameters as WHERE clauses:

    Result:

    Example .rest config file generated by the Composer: