Criteria Finder API

Overview

The LinkedIn Learning criteria Finder API is a set of endpoints you can call to filter and search the catalog of LinkedIn Learning content. The main endpoint takes a request with filtering and relevance criteria criteria for LinkedIn Learning content and returns the content metadata in JSON format. Since this API uses the same filtering and search functionality as the LinkedIn Learning application, you can call the API to find the same results as you would find in LinkedIn Learning.

The LinkedIn Learning criteria Finder complements the LinkedIn Learning localeAndType Finder. The localeAndType API allows you to bulk import the entire catalog of LinkedIn Learning content, the criteria API allows you to discover a subset of LinkedIn Learning content based on filter parameters, sorted by relevance, popularity, or recency. As part of this use case, the criteria API also supports searching category and skill metadata.

The LinkedIn Learning criteria API and localeAndType API share the same key concepts, terminology, and data models. The criteria API builds on the localeAndType API to allow you to query the LinkedIn Learning content library and control how the results appear.

One important difference between the LinkedIn Learning criteria API and localeAndType API is how the APIs treat retired content. In the localeAndType API, you can specify a parameter to retrieve retired as well as active content. In the criteria API, you can retrieve only active content. This document explains how you can access and use the LinkedIn Learning criteria API.

Understanding the Endpoints

The LinkedIn Learning criteria API provides two endpoints - one for learning assets, and one for learning classifications. You can call these endpoints to:

  • Retrieve a page of learning assets, given some search and relevance criteria.
  • Retrieve a list of learning assets updated since a given date.
  • Retrieve a page of learning classifications, given a keyword.

Each API endpoint and its parameters are documented in the "API endpoints" section. First, a note about pagination, using learning assets as an example (the same applies for learning classifications).

When you call the endpoint that retrieves a page of learning assets, given some search and relevance criteria, you will get a response like the following:

 {
  "elements": [
    ...
  ],
  "metadata": {
    ...
  },
  "paging": {
    "total": 2179,
    "count": 20,
    "start": 100,
    "links": [
      {
        "rel": "prev",
        "href":
"/v2/learningAssets?assetFilteringCriteria.keyword=java&count=20&q=criteria&start=80",
        "type": "application/json"
      },
      {
        "rel": "next",
        "href":
"/v2/learningAssets?assetFilteringCriteria.keyword=java&count=20&q=criteria&start=220",
        "type": "application/json"
      }
    ]
  }
}

The value of the elements field is an array of learning assets for the requested page. The value of the metadata field, if present, is an object with metadata about the search results.

The value of the paging field is an object with paging metadata. In particular, if you wish to retrieve the next page of search results, you can use the "links" field in the paging metadata to help construct a request for the next page. The links field simplifies requests for additional pages because you will not need to track the page start and count yourself.

Pagination Reference Table

Field Description
total The total number of learning entities matching the requested criteria
count The requested number of learning entities for the page
start The requested start index of learning entities for the page
links An array of link objects. Each link object includes:
  • A "rel" field whose value can be prev or next.
  • An "href" field whose value is the link (relative to the base API URL) for the previous or next page of learning entities matching the requested criteria.
If the previous or next page does not exist, the corresponding link object will be omitted

Each LinkedIn Learning learningAssets criteria finder and learningClassifications keyword finders and supported parameters are documented below. Note that all parameter names and values (unless noted) are case-sensitive.

learningAssets Criteria Finder

This finder can be used to retrieve a page of learning assets, given some set of criteria. Using this endpoint you can:

  • Search for learning assets given some search and relevance criteria.
  • Retrieve a list of learning assets released, retired or modified since a given date.
  • Retrieve a list of learning assets the requester is licensed to access.
GET https://api.linkedin.com/v2/learningAssets?q=criteria

The parameters of this endpoint are grouped into three logical sets of criteria:

  • assetFilteringCriteria: criteria that narrows the content you wish to retrieve from the LinkedIn Learning catalog.
  • assetPresentationCriteria: criteria that controls how the search results appear.
  • assetRetrievalCriteria: criteria that controls how much information is retrieved for the search results.

Note

Some calls to the learningAssets criteria finder will only return 500 results rather than all the records in the entire catalog that match the query if the result size is greater than 500 records. The scenarios in which only 500 results are returned are documented in the API Reference section.

Parameters

Parameter Description Required
q The value of this parameter should always be: criteria. Yes
assetFilteringCriteria.assetTypes An array of types of learning assets to search. The search results will include only learning assets of these types. The values of this parameter should be COURSE, LEARNING_PATH, or VIDEO. If omitted, the search results will include learning assets of any type. Since this parameter is an array, you will need to specify a zero-based index per value. No
assetFilteringCriteria.classifications An array of learning classification URNs to search learning assets. The search results will include only learning assets tagged with these classifications. The supported URN types are "urn:li:lyndaCategory" and "urn:li:skill". The URNs can be discovered using the /v2/learningClassifications endpoint. If omitted, the search results will include learning assets tagged with any classification. Since this parameter is an array, you will need to specify a zero-based index per value. No
assetFilteringCriteria.difficultyLevels An array of difficulty levels of learning assets to search. The search results will include only learning assets of these difficulty levels. The values of this parameter should be BEGINNER, INTERMEDIATE, or ADVANCED. If omitted, the search results will include learning assets of any difficulty level. Since this parameter is an array, you will need to specify a zero-based index per value. No
assetFilteringCriteria.keyword The keyword string to search learning assets. The search results will include only learning assets matching this keyword string, as determined by LinkedIn Learning's relevance algorithm. The value of this parameter is case-insensitive.If omitted, the search results will include learning assets matching any keyword string. No
assetFilteringCriteria.lastModifiedAfter The time after which the assets were changed i.e. released, modified or retired. Represented by number of milliseconds since midnight, January 1, 1970 UTC. No
assetFilteringCriteria.locales.language An array of languages from which results should be filtered on. The value of this parameter can be de, en, es, fr, in, it, ja, ko, nl, pl, pt, tr, or zh. Since this parameter is an array, you will need to specify a zero-based index per value. No (default=en)
assetFilteringCriteria.locales.country An array of locale countries/regions from which results should be filtered on. The value of this parameter can beDE, US, ES, FR, ID, IT, JP, KR, NL, PL, BR, TR or CN. Since this parameter is an array, you will need to specify a zero-based index per value. No (default=US)
assetFilteringCriteria.licensedOnly Boolean that indicates results should be filtered to only include learningAssets the caller is licensed to access. If this parameter is set to true and assetFilteringCriteria.locales parameter is omitted the locale values are implied by the callers licensed access. No
assetPresentationCriteria.sortBy How to sort the learning assets in the search results. The value of this parameter should be RELEVANCE, POPULARITY, or RECENCY. Relevance sorts the learning assets by LinkedIn Learning's relevance algorithm. Popularity sorts the learning assets by view count. Recency sorts the learning assets by publish date. No (default = RELEVANCE)
assetPresentationCriteria.targetLocale.language The locale language the API will use to try to localize the learning asset. The value of this parameter should be de, en, es, fr, in, it, ja, ko, nl, pl, pt, tr, or zh. These values correspond to the locales "de_DE", "en_US", "es_ES", "fr_FR", "id_ID", "it_IT", "ja_JP", "ko_KR", "pl_PL", "pt_BR", "tr_TR" and "zh_CN". If the learning asset cannot be localized or if the target locale is not set, the API will use the source locale of the learning asset. No
assetPresentationCriteria.targetLocale.country The locale country/region the API will use to try to localize the learning asset. The value of this parameter should beDE, US, ES, FR, ID, IT, JP, KR, NL, PL, BR, TR or CN. These values correspond to the locales "de_DE", "en_US", "es_ES", "fr_FR", "id_ID", "it_IT", "ja_JP", "ko_KR", "pl_PL", "pt_BR", "tr_TR" and "zh_CN".
If the learning asset cannot be localized or if the target locale is not set, the API will use the source locale of the learning asset.
No
assetRetrievalCriteria.expandDepth The number of levels in the learning asset hierarchy to include asset details. This parameter is optional; please see the Specifying the level of asset details section for an explanation with examples. No (default = 1)
assetRetrievalCriteria.includeRetired Whether to include retired learning assets. The value of this parameter should be true or false. To retrieve active and retired learning assets, set this parameter to true. No (default = false)
start The start index of learning assets for the page. No (default = 0)
count The number of learning assets to include in the page. The maximum count is 100 assets per page. No (default = 20)

API Use Cases

Retrieve learning assets based on modification date

You can use the criteria finder to retrieve a list of learning assets modified after a given date. To determine the type of modification made, compare created and retired dates to the lastModifiedAfter parameter.

  • Newly Released: publishedAt date is greater than the assetFilteringCriteria.lastModifiedAfter parameter value.
  • Modified: publishedAt date is less than the assetFilteringCriteria.lastModifiedAfter parameter value.
  • Retired: retiredAt date is present and greater than assetFilteringCriteria.lastModifiedAfter parameter value

In the example below, the result set contains learning assets modified after January 4th, 2018. A field projection is used to limit the response body to asset titles, URNs and key dates.

cURL Request

Note: Use the -g curl option to turn off globbing since the URL includes brackets.

curl -X GET -H 'Authorization: Bearer AQXX6Z....' -g \
  'https://api.linkedin.com/v2/learningAssets?assetFilteringCriteria.assetTypes[0]=COURSE&assetFilteringCriteria.lastModifiedAfter=1515097718000&assetRetrievalCriteria.expandDepth=1&assetRetrievalCriteria.includeRetired=true&count=1&q=criteria&start=20&fields=title:(value),details:(lastUpdatedAt,publishedAt,retiredAt,availability),urn'

Response

{
    "metadata": {
        "assetTypeFacetMetadata": [
            {
                "count": 83,
                "assetType": "VIDEO"
            },
            {
                "count": 40,
                "assetType": "COURSE"
            },
            {
                "count": 0,
                "assetType": "LEARNING_PATH"
            }
        ],
        "difficultyLevelFacetMetadata": [
            {
                "difficultyLevel": "INTERMEDIATE",
                "count": 10
            },
            {
                "difficultyLevel": "BEGINNER",
                "count": 8
            },
            {
                "difficultyLevel": "ADVANCED",
                "count": 4
            }
        ]
    },
    "elements": [
        {
            "urn": "urn:li:lyndaCourse:578072",
            "details": {
                "publishedAt": 1499644800000,
                "lastUpdatedAt": 1515184875057,
                "availability": "AVAILABLE"
            },
            "title": {
                "value": "The Essential Elements of Predictive Analytics and Data Mining"
            }
        }
    ],
    "paging": {
        "total": 40,
        "count": 1,
        "start": 20,
        "links": [
            {
                "rel": "prev",
                "href": "/v2/learningAssets?assetFilteringCriteria.assetTypes[0]=COURSE&assetFilteringCriteria.lastModifiedAfter=1515097718000&assetRetrievalCriteria.expandDepth=1&assetRetrievalCriteria.includeRetired=true&count=1&q=criteria&start=19",
                "type": "application/json"
            },
            {
                "rel": "next",
                "href": "/v2/learningAssets?assetFilteringCriteria.assetTypes[0]=COURSE&assetFilteringCriteria.lastModifiedAfter=1515097718000&assetRetrievalCriteria.expandDepth=1&assetRetrievalCriteria.includeRetired=true&count=1&q=criteria&start=21",
                "type": "application/json"
            }
        ]
    }
}

Querying an account's licensed assets

When assetFilteringCriteria.licensedOnly is set to true, only assets licensed to the caller will be returned in the result set based on context carried in the OAuth 2.0 bearer token. LinkedIn Learning content is licensed by locale and API keys are associated with a given LinkedIn Learning tenant. Since tenants are licensed to access any permutation of our English, French, German, Spanish and Japanese content libraries, OAuth 2.0 bearer tokens are used to infer assets licensed to a given account.

In the request below, the result set changes based on OAuth token used to authenticate the request. For example, if a tenant is licensed to access English content and you make a request with an OAuth 2.0 token generated from the tenant's API keys, the result set will only include English assets. If another tenant is licensed to access French and German content and you makes the same API request with an OAuth token generated from API keys associated with the French & German tenant you can page through the result set to access assets details from the French & German content libraries.

cURL Request

Note: Use the -g curl option to turn off globbing since the URL includes brackets.

curl -X GET 'https://api.linkedin.com/v2/learningAssets?q=criteria&assetFilteringCriteria.assetTypes[0]=COURSE&assetFilteringCriteria.licensedOnly=true&fields=urn,title:%28value%29,details:%28availableLocales%29&count=1' -H 'Authorization: Bearer AQXX..'

Tip

In most cases, you will want to set assetFilteringCriteria.licensedOnly to true to ensure only licensed assets are included in the result set. In the event assetFilteringCriteria.locales AND assetFilteringCriteria.licensedOnly are both included in a request, only learning assets that meet both criteria will be included in the response.

Bulk importing a tenant's licensed assets

To replicate the LinkedIn Learning content catalog in an external system we recommend importing content in two phases:

1. Initial bulk asset import: To import all active assets licensed to a tenant, use the criteria finder API with licensedOnly parameter. The result set may exclude assets released in the last 48 hours.

Caution

Combining "empty" queries with the sortBy parameter can cause slow or degraded queries. Empty criteria queries are requests where there are no keyword, difficulty, skill, classification, or lastModifiedAfter filters. For the best bulk import performance, omit sortBy.

curl -X GET 'https://api.linkedin.com/v2/learningAssets?q=criteria&assetFilteringCriteria.assetTypes[0]=COURSE&assetFilteringCriteria.licensedOnly=true&assetRetrievalCriteria.includeRetired=false&count=75' -H 'Authorization: Bearer AQXX..'

2. Recently released asset import: Since the initial bulk import may exclude recently released assets, you can import the remaining assets by backdating assetFilteringCriteria.lastModifiedAfter 48 hours before the initial bulk asset import began.

curl -X GET -H 'Authorization: Bearer AQXX6Z....' -g 'https://api.linkedin.com/v2/learningAssets?assetFilteringCriteria.assetTypes[0]=COURSE&assetFilteringCriteria.lastModifiedAfter=1515097718000&assetRetrievalCriteria.expandDepth=1&assetRetrievalCriteria.includeRetired=true&count=1&q=criteria&start=20&fields=title:(value),details:(lastUpdatedAt,publishedAt,retiredAt,availability),urn'

Search for learning assets based on relevance criteria

In the example below, the result set contains learningAssets that meet the search and relevance criteria provided. A field projection is used to limit the response body to include asset titles, urns and levels.

cURL Request

Note: Use the -g curl option to turn off globbing since the URL includes brackets.

curl -H 'Authorization: Bearer AQXt…' -g \
'https://api.linkedin.com/v2/learningAssets?q=criteria&assetFilteringCriteria.assetTypes[0]=COURSE&assetFilteringCriteria.classifications[0]=urn:li:lyndaCategory:7164&assetFilteringCriteria.difficultyLevels[0]=BEGINNER&assetFilteringCriteria.difficultyLevels[1]=INTERMEDIATE&assetFilteringCriteria.difficultyLevels[2]=ADVANCED&assetFilteringCriteria.keyword=java&assetPresentationCriteria.sortBy=RELEVANCE&count=10&fields=urn,title:(value),details:(level)'

Response

  {
    "metadata": {
        "assetTypeFacetMetadata": [
            {
                "count": 1984,
                "assetType": "VIDEO"
            },
            {
                "count": 81,
                "assetType": "COURSE"
            },
            {
                "count": 0,
                "assetType": "LEARNING_PATH"
            }
        ],
        "difficultyLevelFacetMetadata": [
            {
                "difficultyLevel": "INTERMEDIATE",
                "count": 50
            },
            {
                "difficultyLevel": "BEGINNER",
                "count": 25
            },
            {
                "difficultyLevel": "ADVANCED",
                "count": 6
            }
        ]
    },
    "elements": [
        {
            "urn": "urn:li:lyndaCourse:375490",
            "details": {
                "level": "BEGINNER"
            },
            "title": {
                "value": "Java Essential Training for Students"
            }
        },
        {
            "urn": "urn:li:lyndaCourse:606088",
            "details": {
                "level": "INTERMEDIATE"
            },
            "title": {
                "value": "Spring: Framework In Depth"
            }
        },
        {
            "urn": "urn:li:lyndaCourse:636136",
            "details": {
                "level": "INTERMEDIATE"
            },
            "title": {
                "value": "Java EE: Servlets and JavaServer Pages (JSP)"
            }
        },
        {
            "urn": "urn:li:lyndaCourse:107061",
            "details": {
                "level": "ADVANCED"
            },
            "title": {
                "value": "Advanced Java Programming"
            }
        },
        {
            "urn": "urn:li:lyndaCourse:184457",
            "details": {
                "level": "BEGINNER"
            },
            "title": {
                "value": "Learning Java"
            }
        }
    ],
    "paging": {
        "total": 81,
        "count": 5,
        "start": 0,
        "links": [
            {
                "rel": "next",
                "href": "/v2/learningAssets?assetFilteringCriteria.assetTypes[0]=COURSE&assetFilteringCriteria.classifications[0]=urn%3Ali%3AlyndaCategory%3A7164&assetFilteringCriteria.difficultyLevels[0]=BEGINNER&assetFilteringCriteria.difficultyLevels[1]=INTERMEDIATE&assetFilteringCriteria.difficultyLevels[2]=ADVANCED&assetFilteringCriteria.keyword=java&assetPresentationCriteria.sortBy=RELEVANCE&count=5&q=criteria&start=5",
                "type": "application/json"
            }
        ]
    }
}

learningClassifications Keyword Finder

To retrieve a page of learning classifications, given a keyword, issue a GET call to the following endpoint:

GET https://api.linkedin.com/v2/learningClassifications?q=keyword

Parameters

Parameter Description Required
q The value of this parameter should always be: keyword. Yes
keyword The keyword string to search learning classifications. The search results will include only learning classifications matching this keyword string, as determined by LinkedIn Learning's relevance algorithm. The value of this parameter is case-insensitive. Yes
targetLocale.language The locale language the API will use to try to localize the learning classification. The value of this parameter should be de, en, es, fr, in, it, ja, ko, nl, pl, pt, tr, or zh. These values correspond to the locales "de_DE", "en_US", "es_ES", "fr_FR", "id_ID", "it_IT", "ja_JP", "ko_KR", "pl_PL", "pt_BR", "tr_TR" and "zh_CN". If the learning classification cannot be localized or if the target locale is not set, the API will use the source locale of the learning classification. No
targetLocale.country The locale country/region the API will use to try to localize the learning classification. The value of this parameter should be DE, US, ES, FR, ID, IT, JP, KR, NL, PL, BR, TR or CN. These values correspond to the locales "de_DE", "en_US", "es_ES", "fr_FR", "id_ID", "it_IT", "ja_JP", "ko_KR", "pl_PL", "pt_BR", "tr_TR" and "zh_CN". If the learning classification cannot be localized or if the target locale is not set, the API will use the source locale of the learning classification. No
start The start index of learning classifications for the page. No (default = 0)
count The number of learning classifications to include in the page. Please choose a reasonable value if overriding the default; the API will return an error if the requested page exceeds the 2 MB response size limit of the framework. No (default = 100)

Request

curl -H 'Authorization: Bearer AQXt…' \
'https://api.linkedin.com/v2/learningClassifications?q=keyword&keyword=software&targetLocale.language=en&targetLocale.country=US&start=0&count=20'

Response

{
  "elements": [
    {
      "urn": "urn:li:skill:242",
      "owner": {
        "urn": "urn:li:organization:0000",
        "name": {
          "locale": {
            "country": "US",
            "language": "en"
          },
          "value": "LinkedIn"
        }
      },
      "name": {
        "locale": {
          "country": "US",
          "language": "en"
        },
        "value": "Software"
      },
      "type": "SKILL"
    },
    {
      "urn": "urn:li:lyndaCategory:7186",
      "owner": {
        "urn": "urn:li:organization:0000",
        "name": {
          "locale": {
            "country": "US",
            "language": "en"
          },
          "value": "LinkedIn"
        }
      },
      "name": {
        "locale": {
          "country": "US",
          "language": "en"
        },
        "value": "Software Development"
      },
      "type": "SUBJECT"
    },
    ...
  ],
  "paging": {
    "total": 15,
    "count": 20,
    "start": 0,
    "links": []
  }
}

API Advanced Concepts

This section explains several advanced topics about the LinkedIn Learning APIs.

Specifying the level of asset details

When you call /v2/learningAssets to retrieve a page of learning assets, given some search and relevance criteria, you can optionally set an assetRetrievalCriteria.expandDepth parameter:

Request

curl -H 'Authorization: Bearer AQXt…' \
'https://api.linkedin.com/v2/learningAssets?q=criteria&assetFilteringCriteria.keyword=java&assetRetrievalCriteria.expandDepth=1'

This parameter (defaults to 1) tells the API how many levels in the learning asset hierarchy should include asset details. A detailed learning asset has the following structure:

{
  "urn": …,
  "type": …,
  "title": …,
  "details": {
    …
  },
  "contents": [
    …
  ]
}

The urn, type, and title fields are the basic metadata about the learning asset.

The details field is an object that includes detailed metadata about the learning asset - for example, its associated learning classifications, description, change timestamps, etc. (see the "Asset schema" section for the full schema reference).

The contents field is an array of sub-assets of the learning asset, each sub-asset of which is a learning asset itself. For example, a course contains chapters, and a chapter contains videos. The learning asset representing the course would look like the following (focusing on the nested structure and omitting other fields):

{
  "type": "COURSE",
  "contents": [
    {
      "asset": {
        "type": "CHAPTER",
        "contents": [
          {
            "asset": {
              "type": "VIDEO",
              "contents": [],
              …
            }
          },
  …
}

In this learning asset hierarchy, you can think of the course as the first level of learning assets. The chapters, which are sub-assets of the course, are the second level of learning assets. The videos, which are sub-assets of the chapters, are the third level of learning assets.

With this explanation of the learning asset hierarchy and the earlier explanation of asset details in mind, we can refer back to the request we started with:

curl -H 'Authorization: Bearer AQXt…' \
'https://api.linkedin.com/v2/learningAssets?q=criteria&assetFilteringCriteria.keyword=java&assetRetrievalCriteria.expandDepth=1'

Setting the assetRetrievalCriteria.expandDepth parameter to 1 tells the API to include asset details only for the first level of learning assets. Each learning asset in the elements array of the response would look like the following (assuming the learning asset is a course):

{
  "urn": …,
  "type": COURSE,
  "title": …,
  "details": {
    …
  },
  "contents": [
    {
      "asset": {
        "urn": …,
        "type": "CHAPTER",
        "title": …,
        "contents": [
          {
            "asset": {
              "urn": …,
              "type": "VIDEO",
              "title": …,
              "contents": []
            }
          },
  …
}

If you wish to include asset details for both the course and its chapters, you can tell the API to expand learning assets down to the second level:

curl -H 'Authorization: Bearer AQXt…' \
'https://api.linkedin.com/v2/learningAssets?q=criteria&assetFilteringCriteria.keyword=java&assetRetrievalCriteria.expandDepth=2'

With the assetRetrievalCriteria.expandDepth parameter set to 2, each learning asset in the elements array of the response would look like the following (assuming the learning asset is a course):

{
  "urn": …,
  "type": COURSE,
  "title": …,
  "details": {
    …
  },
  "contents": [
    {
      "asset": {
        "urn": …,
        "type": "CHAPTER",
        "title": …,
        "details": {
          …
        },
        "contents": [
          {
            "asset": {
              "urn": …,
              "type": "VIDEO",
              "title": …,
              "contents": []
            }
          },
  …
}

By setting the assetRetrievalCriteria.expandDepth parameter to 3 when calling the API, you can include asset details for all three levels - course, chapters, and videos.

When expanding learning assets down to deeper levels, take care that the larger responses do not exceed the 2 MB response size limit of the API framework. The assetRetrievalCriteria.expandDepth parameter is a convenience so that you can retrieve more information with fewer calls. But you can always retrieve the same nested information in multiple steps. For example, leaving the assetRetrievalCriteria.expandDepth parameter at its default value of 1, you can retrieve a page of learning assets representing courses, which will include asset details only for each course. Then for each chapter URN and video URN under the courses, you can call the endpoint that retrieves an individual learning asset, which will include asset details for the chapter or video.

Note that you can also set the assetRetrievalCriteria.expandDepth parameter to 0 when calling the API. This tells the API to omit all asset details:

curl -H 'Authorization: Bearer AQXt…' \
'https://api.linkedin.com/v2/learningAssets?q=criteria&assetFilteringCriteria.keyword=java&assetRetrievalCriteria.expandDepth=0'

With the assetRetrievalCriteria.expandDepth parameter set to 0, each learning asset in the "elements" array of the response would look like the following (no asset details at any level):

{
  "urn": …,
  "type": COURSE,
  "title": …,
  "contents": [
    {
      "asset": {
        "urn": …,
        "type": "CHAPTER",
        "title": …,
        "contents": [
          {
            "asset": {
              "urn": …,
              "type": "VIDEO",
              "title": …,
              "contents": []
            }
          },
  …
}

Rolling up sub-asset classifications

A learning asset may be tagged with one or more learning classifications. For example, a course or video may be tagged with category, skill, or continuing education metadata. These learning classifications are included in the asset details (see the Specifying the level of asset details section).

When retrieving a learning asset with sub-assets, all the learning classifications that the sub-assets are tagged with are rolled up into the asset details for the top-level learning asset. For example, when retrieving a learning asset representing a course, the asset details for the course include the learning classifications that the chapters and videos are tagged with. In this case, if you set the assetRetrievalCriteria.expandDepth parameter to include the asset details for the chapter and video sub-assets as well, the asset details for each sub-asset will not include its individual learning classifications.

The API rolls up sub-asset classifications for two reasons. First, it makes sense for a learning asset to inherit all the learning classifications of its sub-assets. Second, rolling up sub-asset classifications lets the API de-duplicate them, reducing the response size if multiple sub-assets are tagged with the same learning classification.

Specifying the response fields

When calling any of the API endpoints, you can include a special request parameter that specifies the fields that will be in the response. Note that if the response fields you wish to specify are part of the asset details (see the Specifying the level of asset details section), you will also need to set the assetRetrievalCriteria.expandDepth parameter so that the required level of asset details will be included.

Field Projection Reference

If you set the "fields" parameter when calling an endpoint that retrieves a page of learning entities, the previous and next links in the paging metadata in the response (see the "Understanding the endpoints" section) will not include the "fields" parameter.

Parameter Description Required
field A list of field projections that specify the fields that will be in the response. You will need to add the same "fields" parameter to the generated links yourself No

Field Projection Syntax

  • field_name to include the entire value of the field.
  • field_name:(sub_field_name) to include only the value of the sub-field if the parent field is an object.
  • field_name:($*:(sub_field_name)) to include only the value of the sub-field if the parent field is an array of objects.

Here are four sample requests showing an example of each kind of field projection:

cURL Request

curl -H 'Authorization: Bearer AQXt…' \
'https://api.linkedin.com/v2/learningAssets?q=criteria&assetFilteringCriteria.keyword=java&fields=title'

Response

{
  "elements": [
    {
      "title": {
        "locale": {
          "country": "US",
          "language": "en"
        },
        "value": "Java Essential Training for Students"
      }
    },
    {
      "title": {
        "locale": {
          "country": "US",
          "language": "en"
        },
        "value": "Scala Essential Training"
      }
    },
    ...
  ],
  "metadata": {
    ...
  },
  "paging": {
    ...
  }
}

cURL Request

curl -H 'Authorization: Bearer AQXt…' \
'https://api.linkedin.com/v2/learningAssets?q=criteria&assetFilteringCriteria.keyword=java&fields=title:(value)'

Response

{
  "elements": [
    {
      "title": {
        "value": "Java Essential Training for Students"
      }
    },
    {
      "title": {
        "value": "Scala Essential Training"
      }
    },
    ...
  ],
  "metadata": {
    ...
  },
  "paging": {
    ...
  }
}

cURL Request

curl -H 'Authorization: Bearer AQXt…' \
'https://api.linkedin.com/v2/learningAssets?q=criteria&assetFilteringCriteria.keyword=java&fields=contents:($*:(asset:(urn)))'

Response

{
  "elements": [
    {
      "contents": [
        {
          "asset": {
            "urn": "urn:li:lyndaChapter:(urn:li:lyndaCourse:375490,415232)"
          }
        },
        {
          "asset": {
            "urn": "urn:li:lyndaChapter:(urn:li:lyndaCourse:375490,415237)"
          }
        },
      ...
    },
    ...
  ],
  "metadata": {
    ...
  },
  "paging": {
    ...
  }
}

cURL Request

curl -H 'Authorization: Bearer AQXt…' \
'https://api.linkedin.com/v2/learningAssets?q=criteria&assetFilteringCriteria.keyword=java&fields=urn,type,contents:($*:(asset:(urn,type)))'

Response

{
  "elements": [
    {
      "urn": "urn:li:lyndaCourse:375490",
      "contents": [
        {
          "asset": {
            "urn": "urn:li:lyndaChapter:(urn:li:lyndaCourse:375490,415232)",
            "type": "CHAPTER"
          }
        },
        {
          "asset": {
            "urn": "urn:li:lyndaChapter:(urn:li:lyndaCourse:375490,415237)",
            "type": "CHAPTER"
          }
        },
        ...
      ],
      "type": "COURSE"
    },
    ...
  ],
  "metadata": {
    ...
  },
  "paging": {
    ...
  }
}