Setting up of looker dashboard

Continuing the discussion from Creating customer dashboards in harness using looker:

Steps of configuring the looker on harness:

Note: You would need to login using an API3 key that’s generated in Looker:

  1. Set up API3 key for user in Looker

    1. Admin → Users → Edit User → API3 Keys

    2. Client ID and Secrets are used in the login request

  2. Call Login endpoint to get Auth Token (valid for 1 hour) (POST /login)

    1. looker-sdk-ruby/ at master · looker/looker-sdk-ruby

    2. POST -{clientId}&client_secret={clientSecret}

      1. curl -i -d “client_id={clientID}&client_secret={clientSecret}”
    3. Get “access_token” from response (if status 200)

      1. Tokens last 1 hour upon issue or until logged out manually with the /logout endpoint

      2. DELETE -

        1. curl -i -X DELETE -H “Authorization: token {authToken}”
  3. Get Dashboard Elements


      1. curl -i -H “Authorization: token {authToken}”{dashboardId}/dashboard_elements
    2. Get queryID of desired tile ([0].query_id)

      1. You can find the matching element in the returned array either through hard coding the first element, or searching for a matching title (“deploymentData”) / id / lookml_link_id (“Deployment duration by Applications”)
  4. Run the query in format csv and download the result


    2. curl -i -H “Authorization: token {authToken}”{queryId}/run/csv --output query_results.csv

Once logged in an authentication token has been received the user can hit any of the looker endpoints directly (Log in)