Content API
The AIHR Content API is a powerful RESTful interface that provides programmatic access to our entire library of learning content. It is designed for developers who need to integrate AIHR’s courses and programs into their own LMS, platforms, applications, and workflows.
Core Functionality
Section titled “Core Functionality”- Content Discovery: The API allows you to programmatically retrieve detailed information about all available courses and programs.
- Structured Data: Access a rich set of metadata for each learning resource, including titles, descriptions, and more, allowing for deep integration into your systems.
- Real-time Updates: Stay up to date with the latest additions and changes to the AIHR content catalog.
Use Cases
Section titled “Use Cases”- Build a Custom Content Catalog: Create and maintain a searchable, branded catalog of AIHR courses directly within your company’s internal learning portal or intranet.
- Sync with Internal Systems: Keep your internal systems up-to-date with the latest AIHR content offerings, ensuring your employees always have access to the most current training materials.
Key Data Points
Section titled “Key Data Points”The API provides access to the following key data points for each piece of content:
| Field | Description |
|---|---|
id | A unique identifier for each course or program. |
title | The name of the course or program. |
description | A brief summary of the content. |
url | The direct link to the content on the AIHR platform. |
type | A numerical value indicating the content type (e.g., 1 for a course). |
difficultyLevel | A numerical value representing the content’s difficulty (1 for Beginner, 2 for Intermediate, 3 for Advanced). |
durationInMinutes | The estimated time to complete the content, in minutes. |
thumbnailImageUrl | The URL for the thumbnail image of the course or program. |
publishedAt | The date and time the content was published, formatted in ISO 8601. |
label | An object containing information on a content label, such as Featured. |
categories | An array of objects, with each object containing the id, shortName, and fullName for a content category (e.g., “People Analytics”). |
Request/Response Schema
Section titled “Request/Response Schema”We use Scalar to provide interactive API documentation. Once authenticated, you can test the content API calls directly in your browser.
GET /external/api/v1/learningcatalog/search
- Description: Retrieves a paginated list of learning content items from the catalog.
- Authentication: Requires an API key.
- Parameters:
- Page (integer, query): The page number to retrieve.
- PageSize (integer, query): The number of items to return per page.
- X-AIHR-API-Key (string, header): API Key Header used for authentication. (Required)
Example Request (cURL)
Section titled “Example Request (cURL)”curl https://prod.burnwood.aihr.com/lms/external/api/v1/learningcatalog/search \ --header 'X-AIHR-API-Key: ' \Example Success Response (200 OK): SearchLearningCatalogDTO[] A successful response returns an array of learning content objects.
[ { "id": 1234, "title": "Strategic Workforce Planning", "url": "https://lms.aihr.com/course/strategic-workforce-planning", "type": 1, "thumbnailImageUrl": "https://lms.aihr.com/thumbnails/swp.jpg", "difficultyLevel": 2, "durationInMinutes": 180, "description": "Learn how to align your workforce with your business strategy...", "publishedAt": "2024-03-15T09:00:00Z", "label": { "id": 5, "name": "Certificate Program", "isDefault": false, "journeyLabelType": 1 }, "categories": [ { "id": 101, "shortName": "People Analytics", "fullName": "People Analytics" }, { "id": 102, "shortName": "HR Strategy", "fullName": "HR Strategy" } ] }]Error Responses:
Section titled “Error Responses:”- 400 Bad Request: The request parameters are invalid.
- 401 Unauthorized: Authentication failed (e.g., invalid API key).
Schema Definitions:
Section titled “Schema Definitions:”- SearchLearningCatalogDTO: Represents a single item of learning content with details such as title, URL, type, difficulty, duration, and associated categories.
- CategoryDTO: Defines a category with a unique ID, short name, and full name.
- DifficultyLevel: An enum representing the difficulty of the content (e.g., 0 for Beginner, 1 for Intermediate, 2 for Advanced, 3 for Expert).
- ProblemDetails: A standardized object for providing detailed error information for API clients.