Connecting Power BI to Learn Amp API

Connecting Power BI to Learn Amp API

Connecting Power BI to Learn Amp API

Overview

Connect Power BI to Learn Amp using our REST API for real-time access to your learning data. This method is available to all customers and is ideal for ad-hoc queries or when you need the most current data.

💡 Tip: If you have access to the Advanced Analytics Data Warehouse (Data Lake bolt-on or Advanced package), consider using the Data Lake connection method instead—it's simpler to set up using Power BI's native Amazon Redshift connector. See Getting Started with Data Lake for details.


Functionality Breakdown

Available API Endpoints

Endpoint

Description

Scope Required

Endpoint

Description

Scope Required

/v1/activities

Learning activities (completions, progress)

activities:read

/v1/users

User data and profiles

users:read

/v1/items

Content items

items:read

/v1/teams

Team structure

teams:read

/v1/events

Event data

events:read

/v1/enrollments

Enrolment records

enrollments:read

/v1/channels

Channel data

channels:read

/v1/learnlists

Learnlist data

learnlists:read

/v1/tasks

Task data

tasks:read

For full API documentation, visit developers.learnamp.com.

Authentication Flow

Learn Amp API uses OAuth 2.0 with the Client Credentials grant type:

  1. Exchange your Client ID and Secret for an access token

  2. Use the access token in API requests

  3. Tokens expire—refresh as needed


Pre-requisites

Role Requirements

Action

Required Role

Action

Required Role

Generate API credentials

Owner

View API credentials

Owner

Delete API credentials

Owner

⚠️ Important: Only the account Owner can manage API credentials. If you don't have Owner access, contact your Learn Amp administrator.

Technical Requirements

  • Power BI Desktop (version 2.85 or later recommended)

  • Network access to your Learn Amp API endpoint

  • A REST client tool for testing (e.g., Postman or Advanced REST Client)


Quick Start Guide

Step 1: Generate API Credentials

  1. Log in to Learn Amp as the Owner

  2. Click Settings in the left sidebar

  3. Navigate to IntegrationsAPI

  4. Click Add API Key

  5. Enter a name (e.g., "Power BI Integration")

  6. Select the required scopes (e.g., activities:read, users:read)

  7. Click Create

  8. Copy and securely store your Client ID and Client Secret

⚠️ Warning: The Client Secret is only shown once. Store it securely before closing the dialog.

Step 2: Retrieve Your Access Token

Use a REST client tool to retrieve your access token. This is described in our API authentication documentation.

Example request:

POST https://api.learnamp.com/oauth/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials &client_id=YOUR_CLIENT_ID &client_secret=YOUR_CLIENT_SECRET

The response will contain your access_token. Copy this for the next step.

💡 Tip: We recommend Postman or Advanced REST Client for retrieving your token.

Step 3: Add a Web Data Source in Power BI

  1. Open Power BI Desktop

  2. Click Get DataWeb

  3. Select Advanced

  4. Enter the API URL, for example:

    • https://api.learnamp.com/v1/activities

    • https://api.learnamp.com/v1/users

    • https://api.learnamp.com/v1/tasks

  5. Under HTTP request header parameters, add:

    • Name: Authorization

    • Value: Bearer YOUR_ACCESS_TOKEN

  6. Click OK to import data

Step 4: Transform and Load

  1. Power BI will display the JSON response

  2. Click Transform Data to open Power Query Editor

  3. Expand the JSON structure into columns

  4. Apply any required transformations

  5. Click Close & Apply to load the data


FAQs

Why can't I see the API settings?

Only the Owner role can access API settings. Contact your Learn Amp administrator to request credentials or Owner access.

How do I handle pagination?

The API returns paginated results. See our guide on Handling Paginated API responses for fetching all your data.

Can I filter activities by date?

Yes! Use the filters[date][from] and filters[date][to] parameters. For example:
https://api.learnamp.com/v1/activities?filters[date][from]=2024-01-01

How long do access tokens last?

Access tokens expire after a set period. When refreshing data, you may need to generate a new token.


Troubleshooting

Issue

Solution

Issue

Solution

401 Unauthorised

Token expired or invalid. Generate a new access token.

403 Forbidden

Missing required scope. Check your API key includes the necessary scopes.

Empty response

Check your filters and date ranges. Verify data exists in Learn Amp.

Cannot see API settings

Ensure you have the Owner role. Contact your administrator.


Video Walkthrough

Watch our step-by-step video guide for connecting Power BI to the Learn Amp API.


Next Steps