Retrieve Enterprise Learning Activity Reports

Overview

LinkedIn Learning Reporting APIs provide key insights & engagement metrics such as course completions, hours of content viewed and learner days active. Insights can be aggregated by entities like individuals, groups and accounts or content objects like courses and videos. These insights can help organizations to measure effectiveness of learning and development initiatives.

You can find the full API reference for the learningActivityReports resource here

To review how to provision API keys for LinkedIn Learning Reporting APIs, click here

Note

Disclaimer: LinkedIn Learning is constantly investing in our reporting infrastructure. In the future, there may be changes to the Reporting API which can require adjustments to how the data is queried. These updates may require you to make some updates on your end. We intend to provide detailed guidance in advance of any potential changes to ensure that you have enough time to make necessary changes in your application.

Understanding the Endpoint

LinkedIn Learning Reporting APIs are designed to represent learner activity & content engagement in a unified & extensible format. This resource can be used to integrate LinkedIn Learning utilization metrics into your application. Using the reporting APIs you can:

  • Retrieve a list of popular courses for a given LinkedIn Learning account.
  • Retrieve a list of all course completions for a given LinkedIn Learning account.
  • Retrieve a list of learner activity like days active and video views.

Getting Started

The learningActivityReports API should be used when querying for insights & engagement metrics. This API supports a comprehensive set of URL parameters. When you call the endpoint to retrieve a page of learning activities you will get a response like the following:

{
    "elements": [
        {
            "activities": [ ... ],
            "learnerDetails": { ... },
            "contentDetails": { ... }
        }
    ],
    "paging": { ... }
}

The value of the elements array includes LearningActivityReport objects. Each LearningActivityReport object must include an activities array which contains engagement metrics. The LearningActivityReport object may also include learnerDetails and contentDetails. Both objects are optional and will only be included in the response when explicitly requested as aggregation criteria in the request.

For a comprehensive view of all supported properties review the reference. The value of the paging field is an object with paging metadata. For more information, review the pagination section in API Basics.

Use-cases

In this section we will review common API use-cases. The learningActivityReports API can be used to recreate reports available in the LinkedIn Learning administrative UI including:

Note

The learningActivityReports API is being updated to support more content types for Learning Hub. You can see more details in our release notes.

During the transition period to Learning Hub, these reports will still be available:

Organization Summary Report

This query returns a list of activities aggregated by a LinkedIn Learning Enterprise Account. The activities array includes engagement statistics for the entire account and the learnerDetails object includes account information instead of information about individual learners.

curl -X GET \
  'https://api.linkedin.com/v2/learningActivityReports?q=criteria&count=1&startedAt=1562699900247&timeOffset.unit=DAY&timeOffset.duration=7&aggregationCriteria.primary=ACCOUNT&contentSource=ALL_SOURCES' \
  -H 'Authorization: Bearer AQW...
{
    "elements": [
        {
            "latestDataAt": 1632207540000,
            "activities": [
                {
                    "engagementType": "DAYS_ACTIVE",
                    "engagementValue": 88,
                    "engagementMetricQualifier": "UNIQUE",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 12,
                    "engagementMetricQualifier": "UNIQUE",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "SECONDS_VIEWED",
                    "engagementValue": 2505,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "VIDEO",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "ARTICLE",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "ARTICLE",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "AUDIO",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "AUDIO",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "BOOK",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "BOOK",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "LEARNING_COLLECTION",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "LEARNING_COLLECTION",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 16,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "COURSE",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 1,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "COURSE",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "DOCUMENT",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "DOCUMENT",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "EVENT",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "EVENT",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 2,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "LEARNING_PATH",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "LEARNING_PATH",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 66,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "VIDEO",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 22,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "VIDEO",
                    "firstEngagedAt": 1627267600000,
                    "lastEngagedAt": 1627354000000
                }
            ],
            "learnerDetails": {
                "entity": {
                    "accountUrn": "urn:li:enterpriseAccount:99999"
                }
            }
        }
    ],
    "paging": {
        "total": 1,
        "count": 1,
        "start": 0,
        "links": [
            {
                "rel": "next",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=ACCOUNT&contentSource=ALL_SOURCES&count=1&q=criteria&start=1&startedAt=1562699900247&timeOffset.duration=7&timeOffset.unit=DAY",
                "type": "application/json"
            }
        ]
    }
}

Learner Summary Report

This query returns a list of learners sorted by the total number of LinkedIn Learning days active in the last week. The primary aggregation criteria is INDIVIDUAL so the results are aggregated by individual learners and each LearningActivityReport object includes learnerDetails with additional information about the learner.

curl -X GET \
  'https://api.linkedin.com/v2/learningActivityReports?q=criteria&start=1&count=1&startedAt=1552652108993&timeOffset.duration=2&aggregationCriteria.primary=INDIVIDUAL&timeOffset.unit=WEEK&sortBy.engagementMetricType=DAYS_ACTIVE&contentSource=LINKEDIN_LEARNING' \
  -H 'Authorization: Bearer AQWm...'
{
    "elements": [
        {
            "activities": [
                {
                    "engagementType": "DAYS_ACTIVE",
                    "engagementValue": 3,
                    "engagementMetricQualifier": "UNIQUE"
                },
                {
                    "engagementType": "SECONDS_VIEWED",
                    "engagementValue": 8918,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "VIDEO"
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "ARTICLE"
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "ARTICLE"
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "AUDIO"
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "AUDIO"
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "BOOK"
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "BOOK"
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "LEARNING_COLLECTION"
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "LEARNING_COLLECTION"
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 2,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "COURSE"
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 1,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "COURSE"
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "DOCUMENT"
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "DOCUMENT"
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "EVENT"
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "EVENT"
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "LEARNING_PATH"
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "LEARNING_PATH"
                },
                {
                    "engagementType": "VIEWS",
                    "engagementValue": 25,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "VIDEO"
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 26,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "VIDEO"
                }
            ],
            "learnerDetails": {
                "enterpriseGroups": [
                    "Scranton Branch"
                ],
                "name": "Michael Scott",
                "entity": {
                    "profileUrn": "urn:li:enterpriseProfile:(urn:li:enterpriseAccount:999,1234567)"
                },
                "email": "mscott@dundermifflin.com",
                "customAttributes": {},
                "uniqueUserId": "mscott"
            }
        }
    ],
    "paging": {
        "total": 3416,
        "count": 1,
        "start": 1,
        "links": [
            {
                "rel": "prev",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=INDIVIDUAL&count=1&q=criteria&sortBy=DAYS_ACTIVE&start=0&startedAt=1552652108993&timeOffset.duration=1&timeOffset.unit=WEEK&contentSource=LINKEDIN_LEARNING",
                "type": "application/json"
            },
            {
                "rel": "next",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=INDIVIDUAL&count=1&q=criteria&sortBy=DAYS_ACTIVE&start=2&startedAt=1552652108993&timeOffset.duration=1&timeOffset.unit=WEEK&contentSource=LINKEDIN_LEARNING",
                "type": "application/json"
            }
        ]
    }
}

Learner Detail Report

Similar to the previous example, this query returns a list of activities aggregated by INDIVIDUAL and CONTENT. The only difference is assetType. In this case, we're using VIDEO instead of COURSE so the results are aggregated by video and the contentDetails object includes information about videos.

curl -X GET \
  'https://api.linkedin.com/v2/learningActivityReports?aggregationCriteria.primary=INDIVIDUAL&aggregationCriteria.secondary=CONTENT&q=criteria&start=0&count=1&contentSource=LINKEDIN_LEARNING&assetType=VIDEO&startedAt=1562699900247&timeOffset.duration=1&timeOffset.unit=DAY' \
  -H 'Authorization: Bearer AQW...'
  {
    "elements": [
        {
            "activities": [
                {
                    "engagementType": "SECONDS_VIEWED",
                    "engagementValue": 3,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "VIDEO",
                    "firstEngagedAt": 1598917945573,
                    "lastEngagedAt": 1627341660000
                },
                {
                    "engagementType": "PROGRESS_PERCENTAGE",
                    "engagementValue": 100,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "VIDEO",
                    "firstEngagedAt": 1598917945573,
                    "lastEngagedAt": 1627341660000
                },
                {
                    "engagementType": "COMPLETIONS",
                    "engagementValue": 1,
                    "engagementMetricQualifier": "TOTAL",
                    "assetType": "VIDEO",
                    "firstEngagedAt": 1598917945573,
                    "lastEngagedAt": 1598917985780
                }
            ],
            "learnerDetails": {
                "enterpriseGroups": [
                    "Scranton Branch"
                ],
                "name": "Creed Bratton",
                "entity": {
                    "profileUrn": "urn:li:enterpriseProfile:(urn:li:enterpriseAccount:9999,112346)"
                },
                "email": "cbratton@dundermifflin.com",
                "uniqueUserId": "cbratton"
            },
            "contentDetails": {
                "name": "What you should know",
                "contentProviderName": "LinkedIn",
                "locale": {
                    "country": "US",
                    "language": "en"
                },
                "contentUrn": "urn:li:lyndaVideo:(urn:li:lyndaCourse:612196,646883)"
            }
        }
    ],
    "paging": {
        "total": 708,
        "count": 1,
        "start": 0,
        "links": [
            {
                "rel": "next",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=INDIVIDUAL&aggregationCriteria.secondary=CONTENT&assetType=VIDEO&contentSource=LINKEDIN_LEARNING&count=1&q=criteria&sortBy.engagementMetricType=PROGRESS_PERCENTAGE&start=1&startedAt=1553222036382&timeOffset.duration=1&timeOffset.unit=DAY",
                "type": "application/json"
            }
        ]
    }
}

Content Summary Report

This query returns a list of the most popular content for an account based on number of viewers. The primary aggregation criteria is CONTENT so the results are aggregated by the selected content type and each LearningActivityReport object includes contentDetails with additional information about the content.

curl -X GET \
  'https://api.linkedin.com/v2/learningActivityReports?aggregationCriteria.primary=CONTENT&q=criteria&count=1&contentSource=ORGANIZATION&startedAt=1562699900247&timeOffset.unit=DAY&timeOffset.duration=14&sortBy.engagementMetricType=COMPLETIONS' \
  -H 'Authorization: Bearer AQW..'
  {
    "elements": [
        {
            "activities": [
                {
                    "engagementValue": 536,
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementType": "VIEWS",
                    "assetType": "ARTICLE"
                },
                {
                    "engagementValue": 285,
                    "engagementMetricQualifier": "TOTAL",
                    "engagementType": "COMPLETIONS",
                    "assetType": "ARTICLE"
                },
                {
                    "engagementMetricQualifier": "TOTAL",
                    "engagementValue": 60720,
                    "engagementType": "SECONDS_VIEWED",
                    "assetType": "ARTICLE"
                }
            ],
            "contentDetails": {
                "contentProviderName": "Dunder Mifflin, Inc.",
                "name": "Dunder Mifflin Infinity PowerPoint",
                "contentUrn": "urn:li:learningCustomContent:12340",
                "locale": {
                    "language": "NO LANGUAGE"
                }
            }
        }
    ],
    "paging": {
        "total": 546,
        "count": 1,
        "start": 0,
        "links": [
            {
                "rel": "next",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=CONTENT&contentSource=ORGANIZATION&count=1&q=criteria&sortBy.engagementMetricType=COMPLETIONS&start=1&startedAt=1562699900247&timeOffset.duration=14&timeOffset.unit=DAY",
                "type": "application/json"
            }
        ]
    }
}

This query returns a list of the most popular courses for an account based on total seconds viewed. The primary aggregation criteria is CONTENT so the results are aggregated by courses and each LearningActivityReport object includes contentDetails with additional information about the course.

curl -X GET \
'https://api.linkedin.com/v2/learningActivityReports?q=criteria&contentSource=EXTERNAL&timeOffset.unit=DAY&aggregationCriteria.primary=CONTENT&start=1&count=1&assetType=COURSE&startedAt=1552652108993&=&sortBy.engagementMetricQualifier=TOTAL&timeOffset.duration=1&sortBy.engagementMetricType=SECONDS_VIEWED' \
-H 'Authorization: Bearer AQW...'
{
    "elements": [
        {
            "activities": [
                {
                    "engagementValue": 10,
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementType": "VIEWS",
                    "assetType": "COURSE"
                },
                {
                    "engagementValue": 1177,
                    "engagementType": "SECONDS_VIEWED",
                    "assetType": "COURSE"
                },
                {
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementValue": 0,
                    "engagementType": "COMPLETIONS",
                    "assetType": "COURSE"
                }
            ],
            "contentDetails": {
                "name": "JavaScript Foundations",
                "contentUrn": "urn:li:lyndaCourse:156548"
            }
        }
    ],
    "paging": {
        "total": 390,
        "count": 1,
        "start": 1,
        "links": [
            {
                "rel": "prev",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=CONTENT&assetType=COURSE&contentSource=EXTERNAL&count=1&q=criteria&start=0&startedAt=1552652108993&timeOffset.duration=1&timeOffset.unit=DAY",
                "type": "application/json"
            },
            {
                "rel": "next",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=CONTENT&assetType=COURSE&contentSource=EXTERNAL&count=1&q=criteria&start=2&startedAt=1552652108993&timeOffset.duration=1&timeOffset.unit=DAY",
                "type": "application/json"
            }
        ]
    }
}

Learner Activity Summary Report

This query returns a list of learners sorted by the total number of LinkedIn Learning days active in the last week. The primary aggregation criteria is INDIVIDUAL so the results are aggregated by individual learners and each LearningActivityReport object includes learnerDetails with additional information about the learner.

curl -X GET \
  'https://api.linkedin.com/v2/learningActivityReports?q=criteria&start=1&count=1&startedAt=1552652108993&timeOffset.duration=2&aggregationCriteria.primary=INDIVIDUAL&timeOffset.unit=WEEK&sortBy.engagementMetricType=DAYS_ACTIVE' \
  -H 'Authorization: Bearer AQWm...'
{
    "elements": [
        {
            "activities": [
                {
                    "engagementValue": 31,
                    "engagementType": "DAYS_ACTIVE"
                },
                {
                    "engagementValue": 183,
                    "engagementType": "SECONDS_VIEWED"
                },
                {
                    "engagementValue": 5,
                    "engagementMetricQualifier": "TOTAL",
                    "engagementType": "VIEWS",
                    "assetType": "COURSE"
                },
                {
                    "engagementValue": 5,
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementType": "VIEWS",
                    "assetType": "COURSE"
                },
                {
                    "engagementValue": 0,
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementType": "COMPLETIONS",
                    "assetType": "COURSE"
                },
                {
                    "engagementValue": 2,
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementType": "COMPLETIONS",
                    "assetType": "VIDEO"
                },
                {
                    "engagementValue": 5,
                    "engagementMetricQualifier": "TOTAL",
                    "engagementType": "VIEWS",
                    "assetType": "VIDEO"
                },
                {
                    "engagementValue": 0,
                    "engagementMetricQualifier": "TOTAL",
                    "engagementType": "VIEWS"
                },
                {
                    "engagementValue": 0,
                    "engagementType": "SECONDS_VIEWED"
                }
            ],
            "learnerDetails": {
                "enterpriseGroups": [
                    "Scranton Branch"
                ],
                "name": "Michael Scott",
                "entity": {
                    "profileUrn": "urn:li:enterpriseProfile:(urn:li:enterpriseAccount:999,1234567)"
                },
                "email": "mscott@dundermifflin.com",
                "customAttributes": {},
                "uniqueUserId": "mscott"
            }
        }
    ],
    "paging": {
        "total": 3416,
        "count": 1,
        "start": 1,
        "links": [
            {
                "rel": "prev",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=INDIVIDUAL&count=1&q=criteria&sortBy=DAYS_ACTIVE&start=0&startedAt=1552652108993&timeOffset.duration=1&timeOffset.unit=WEEK",
                "type": "application/json"
            },
            {
                "rel": "next",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=INDIVIDUAL&count=1&q=criteria&sortBy=DAYS_ACTIVE&start=2&startedAt=1552652108993&timeOffset.duration=1&timeOffset.unit=WEEK",
                "type": "application/json"
            }
        ]
    }
}

Learner Course Activity Detail Report

Similar to the previous example, this query returns a list of activities aggregated by INDIVIDUAL and CONTENT. The only difference is assetType. In this case, we're using COURSE instead of VIDEO so the results are aggregated by course and the contentDetails object includes information about courses.

curl -X GET \
  'https://api.linkedin.com/v2/learningActivityReports?aggregationCriteria.primary=INDIVIDUAL&aggregationCriteria.secondary=CONTENT&q=criteria&start=0&count=1&contentSource=EXTERNAL&assetType=COURSE&startedAt=1562699900247&timeOffset.duration=1&timeOffset.unit=DAY' \
  -H 'Authorization: Bearer AQW...'
  {
    "elements": [
        {
            "activities": [
                {
                    "engagementValue": 2440,
                    "engagementMetricQualifier": "TOTAL",
                    "firstEngagedAt": 1553265900000,
                    "engagementType": "SECONDS_VIEWED",
                    "assetType": "COURSE",
                    "lastEngagedAt": 1553267700000
                },
                {
                    "engagementValue": 100,
                    "engagementType": "PROGRESS_PERCENTAGE",
                    "assetType": "COURSE",
                    "lastEngagedAt": 1553267700000
                }
            ],
            "learnerDetails": {
                "enterpriseGroups": [
                    "Scranton Branch"
                ],
                "name": "Creed Bratton",
                "entity": {
                    "profileUrn": "urn:li:enterpriseProfile:(urn:li:enterpriseAccount:9999,112346)"
                },
                "email": "cbratton@dundermifflin.com",
                "uniqueUserId": "cbratton"
            },
            "contentDetails": {
                "contentSource": "EXTERNAL",
                "name": "Becoming a Male Ally at Work",
                "locale": {
                    "country": "US",
                    "language": "en"
                },
                "contentUrn": "urn:li:lyndaCourse:5002835"
            }
        }
    ],
    "paging": {
        "total": 708,
        "count": 1,
        "start": 0,
        "links": [
            {
                "rel": "next",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=INDIVIDUAL&aggregationCriteria.secondary=CONTENT&assetType=COURSE&contentSource=EXTERNAL&count=1&q=criteria&sortBy.engagementMetricType=PROGRESS_PERCENTAGE&start=1&startedAt=1553222036382&timeOffset.duration=1&timeOffset.unit=DAY",
                "type": "application/json"
            }
        ]
    }
}

Account Total Activity Summary Report

This query returns a list of activities aggregated by a LinkedIn Learning Enterprise Account. The activities array includes engagement statistics for the entire account and the learnerDetails object includes account information instead of information about individual learners.

curl -X GET \
  'https://api.linkedin.com/v2/learningActivityReports?q=criteria&count=1&startedAt=1562699900247&timeOffset.unit=DAY&timeOffset.duration=7&aggregationCriteria.primary=ACCOUNT' \
  -H 'Authorization: Bearer AQW...
{
    "elements": [
        {
            "activities": [
                {
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementValue": 731,
                    "engagementType": "DAYS_ACTIVE"
                },
                {
                    "engagementMetricQualifier": "TOTAL",
                    "engagementValue": 434,
                    "engagementType": "DAYS_ACTIVE"
                },
                {
                    "engagementValue": 256,
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementType": "VIEWS"
                },
                {
                    "engagementValue": 105030,
                    "engagementType": "SECONDS_VIEWED"
                },
                {
                    "engagementValue": 112,
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementType": "VIEWS",
                    "assetType": "COURSE"
                },
                {
                    "engagementValue": 152,
                    "engagementMetricQualifier": "TOTAL",
                    "engagementType": "VIEWS",
                    "assetType": "COURSE"
                },
                {
                    "engagementValue": 12,
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementType": "COMPLETIONS",
                    "assetType": "COURSE"
                },
                {
                    "engagementValue": 212,
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementType": "ENGAGED_LEARNERS"
                }
            ],
            "learnerDetails": {
                "entity": {
                    "accountUrn": "urn:li:enterpriseAccount:99999"
                }
            }
        }
    ],
    "paging": {
        "total": 1,
        "count": 1,
        "start": 0,
        "links": [
            {
                "rel": "next",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=ACCOUNT&contentSource=EXTERNAL&count=1&q=criteria&start=1&startedAt=1562699900247&timeOffset.duration=7&timeOffset.unit=DAY",
                "type": "application/json"
            }
        ]
    }
}

Learner Custom Content Activity Detail Report

Some LinkedIn Learning subscriptions allow admins to upload organization specific learning resources like videos & documents known as custom content. This feature allows admins to distribute homegrown content to learners alongside LinkedIn Learning’s content.

This query lists the learners that have viewed custom content. You can query engagement data for custom content by setting content source to INTERNAL.

curl -X GET \
  'https://api.linkedin.com/v2/learningActivityReports?aggregationCriteria.secondary=CONTENT&q=criteria&count=1&contentSource=INTERNAL&startedAt=1562699900247&timeOffset.unit=DAY&timeOffset.duration=7&aggregationCriteria.primary=INDIVIDUAL&sortBy.engagementMetricType=MARKED_AS_DONE' \
  -H 'Authorization: Bearer AQW..'
  {
    "elements": [
        {
            "activities": [
                {
                    "engagementValue": 0,
                    "engagementType": "SECONDS_VIEWED",
                    "assetType": "ARTICLE",
                    "lastEngagedAt": 1562796900000
                },
                {
                    "engagementValue": 1,
                    "engagementType": "MARKED_AS_DONE",
                    "assetType": "ARTICLE"
                }
            ],
            "learnerDetails": {
                "enterpriseGroups": [
                    "Scranton Branch"
                ],
                "name": "Pam Beasley",
                "entity": {
                    "profileUrn": "urn:li:enterpriseProfile:(urn:li:enterpriseAccount:999,1345678)"
                },
                "email": "pbeasley@dundermifflin.com",
                "uniqueUserId": "pbeasley",
                "customAttributes": {}
            },
            "contentDetails": {
                "contentSource": "INTERNAL",
                "websiteUrl": "Unknown URL",
                "name": "Dunder Mifflin Infinity PowerPoint",
                "contentUrn": "urn:li:learningCustomContent:12340"
            }
        }
    ],
    "paging": {
        "total": 4697,
        "count": 1,
        "start": 0,
        "links": [
            {
                "rel": "next",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=INDIVIDUAL&aggregationCriteria.secondary=CONTENT&contentSource=INTERNAL&count=1&q=criteria&sortBy.engagementMetricType=MARKED_AS_DONE&start=1&startedAt=1562699900247&timeOffset.duration=7&timeOffset.unit=DAY",
                "type": "application/json"
            }
        ]
    }
}

Some LinkedIn Learning subscriptions allow admins to upload organization specific learning resources like videos & documents known as custom content. This feature allows admins to distribute homegrown content to learners alongside LinkedIn Learning’s content. This query lists the most popular custom content for an account.

curl -X GET \
  'https://api.linkedin.com/v2/learningActivityReports?aggregationCriteria.primary=CONTENT&q=criteria&count=1&contentSource=INTERNAL&startedAt=1562699900247&timeOffset.unit=DAY&timeOffset.duration=14&sortBy.engagementMetricType=COMPLETIONS' \
  -H 'Authorization: Bearer AQW..'
  {
    "elements": [
        {
            "activities": [
                {
                    "engagementValue": 536,
                    "engagementMetricQualifier": "UNIQUE",
                    "engagementType": "VIEWS",
                    "assetType": "ARTICLE"
                },
                {
                    "engagementValue": 285,
                    "engagementMetricQualifier": "TOTAL",
                    "engagementType": "COMPLETIONS",
                    "assetType": "ARTICLE"
                },
                {
                    "engagementMetricQualifier": "TOTAL",
                    "engagementValue": 60720,
                    "engagementType": "SECONDS_VIEWED",
                    "assetType": "ARTICLE"
                }
            ],
            "contentDetails": {
                "contentSource": "INTERNAL",
                "websiteUrl": "",
                "name": "Dunder Mifflin Infinity PowerPoint",
                "contentUrn": "urn:li:learningCustomContent:12340",
                "locale": {
                    "language": "NO LANGUAGE"
                }
            }
        }
    ],
    "paging": {
        "total": 546,
        "count": 1,
        "start": 0,
        "links": [
            {
                "rel": "next",
                "href": "/v2/learningActivityReports?aggregationCriteria.primary=CONTENT&contentSource=INTERNAL&count=1&q=criteria&sortBy.engagementMetricType=COMPLETIONS&start=1&startedAt=1562699900247&timeOffset.duration=14&timeOffset.unit=DAY",
                "type": "application/json"
            }
        ]
    }
}

Retrieving contentUrn Metadata

contentUrn values returned in the results for the Reporting API can be used to retrieve additional metadata about that content via the Learning Assets API. Consult the conceptual guide and API reference for the Learning Assets API for information on how to request this additional metadata. When calling the Learning Assets API, the contentUrn value is used as the asset URN.