# Learning Object
Use this API to create, update, and fetch training details from Cornerstone Learning.
# Get LO
This endpoint allows you to retrieve details of a learning object (LO) available to an active user in your Cornerstone portal.
- The API only supports the following LO Types: Curriculum, Event, Session, Material, Test, Video, and Online Course.
- The API only returns details for a LO that is available to the user included in the
ActorID
query parameter. The user included in this query parameter must be an active user in your Cornerstone portal. If theActorID
query parameter is not included in your request, the API will check if the LO is available to the user associated with the OAuth 2.0 application. If you are not familiar with the concept of 'Availability' in Cornerstone Learning, please read through this help article. You must be logged into your Cornerstone portal to access this article. - The fields returned in the response will vary by LO type. Please click on the 'Explore TrainingItemResponse' button at the bottom of the page to see the list of fields returned.
OAuth 2.0 Scope: training:read
# Localization
None of the request fields support localization. The following response fields support localization. The API considers the language of the ActorID
passed in the request. If the ActorID
is not passed, the API considers the language of the user associated with the OAuth 2.0 application.
- Title
- Description
- SubjectDetail>Title
- SubjectDetail>TitleWithHierarchy
- Event>Event Number
- SessionDetail>SessionLocation
- PartDetail>PartName
- Material>MaterialType
- LoDetailsWithinCurriculum>LOTitleWithinCurriculum
- LoDetailsWithinCurriculum>LODescriptionWithinCurriculum
- SectionDetail>SectionTitle
- CustomFields (Short Textbox & Scroll Textbox)
# Error Descriptions
Error Types | Error Message |
---|---|
ObjectID | LO is not available to the user |
ObjectID | Invalid object id Guid |
# Create LO
This endpoint replicates the functionality of creating new learning objects in Cornerstone Learning. All business rules configured in the portal are observed for this call.
The endpoint supports creating learning objects of the following types: Event, Session, Online Course, and Material. The actual payload can vary depending on the type of the learning object.
# Create: Event
- Only one event can be created per API call. You cannot use this endpoint to update an event. There currently is no API to update an event once it has been created.
- Custom fields associated with the event can be loaded via this API.
- The API supports only Instructor-led training events (ILT). Virtual ILT (vILT) events are not supported.
Permission Required: Events - Create
OAuth 2.0 Scope: training:create
# Create: Session
Only one session can be created per API call.
You can only create a session using this API. To update an existing ILT Session, use the Update LO endpoint.
Custom fields associated with the Session will be inherited from the Session’s Event. The custom fields at the Session level cannot be updated using this API.
The API supports only Instructor-led training sessions (ILT). Virtual ILT (vILT) sessions are not supported.
Note :
If languages are not provided in Create Session request then the languages will be inherited from the parent event.
If the languages provided in Create Session request are invalid or does not exist at crop level then the languages will be inherited from the parent event.
Permission Required: Sessions - Create
OAuth 2.0 Scope: training:create
# Create: Online Course
Using this endpoint you can create a shell online course in Cornerstone Learning. Possible use cases include the course is created for historical training or is a course in a 3rd party LMS and needs to be created in Cornerstone so that it is properly synced (Cornerstone is the system of record).
- The online course created via this operation will be a shell course and will not be launchable in Cornerstone Learning.
- Custom fields can be populated using this endpoint.
Permissions Required:
- Course Catalog – Update
- LCMS Course Administrator
OAuth 2.0 Scope: training:create
# Create: Material
- Only one material can be created per API call.
- You can use this API to only create a new material, but not update it. There is currently no API to update existing materials in Cornerstone Learning.
- Custom fields can be populated using this API.
- This API only supports creating materials with a URL source. Creating materials with an actual file as the source isn't supported.
Permissions Required:
- Course Catalog – Update
- Materials Management
OAuth 2.0 Scope: training:create
# Error Descriptions
Handled Error List for Event
Error Types | Error Message |
---|---|
EventName | EventName is required. |
PrimaryProviderName | PrimaryProviderName is required. |
SubjectTitle | SubjectTitle is required. |
MinimumRegistration | MinimumRegistration cannot be negative. |
MaximumRegistration | MaximumRegistration cannot be negative |
PricingItems:PriceType | PricingItems:PriceType should be Unique |
TrainingUnitPriceType | TrainingUnitPricingItems:TrainingUnitPriceType should be Unique |
SubjectTitle | Invalid SubjectTitle data xyz |
Availability | OU Not Found. |
Availability | Invalid OU Type. |
Availability | Invalid Availability User. |
CustomFieldServiceItem | No Customfield exist. |
CustomFieldServiceItem | User doesn't have a access to custom fields: |
CustomFieldServiceItem | Failed: Invalid Value |
CustomFieldServiceItem | Failed: Duplicate values exist |
CustomFieldServiceItem | Failed: Invalid Title value |
CustomFieldServiceItem | Invalid custom field: |
CustomFieldServiceItem | Invalid custom field not supported by lo:xyz |
CustomFieldServiceItem | Invalid custom field value: |
Handled Error List for Session
Error Types | Error Message |
---|---|
EventID/ EventLoRef | EventID Or EventLoRef is required |
Parts | Parts missing |
Parts | One Part Needed |
PartName | PartName |
PartStartDateTime | PartStartDateTime |
PartEndDateTime | PartEndDateTime |
PartLocation | PartLocation |
PartEndDateTime | PartEndDateTime should be greater than PartStartDateTime |
PartBreak.Title | PartBreak.Title |
PartBreak | The break total must be less than the duration of the part |
PartEquipment.Name | PartEquipment.Name |
PartEquipment.Quantity | PartEquipment.Quantity is less than 1 |
MinimumRegistration | MinimumRegistration cannot be negative, |
MaximumRegistration | MaximumRegistration cannot be negative |
Parts | Two or more schedules overlap |
HomeLocation | Invalid instructor data |
Availability | OU Not Found. |
Availability | Invalid OU Type. |
Availability | Invalid Availability User. |
Handled Error List for Online Course
Error Types | Error Message |
---|---|
OnlineItem | OnlineItem missing |
OnlineTitle | OnlineTitle missing. |
Provider | Provider missing. |
Provider | Invalid ProviderName xyz |
AvailableLanguages | Invalid Language data xyz |
SubjectTitle | Invalid SubjectTitle data xyz |
SkillTitle | Invalid Skill Title data xyz |
Availability | OU Not Found. |
Availability | Invalid OU Type. |
Availability | Invalid Availability User. |
PreWork/PostWorks | Invalid xyz object Id PreWork/PostWork. |
PreRequisites | Invalid xyz object Id PreRequisite. |
Competencies | Invalid Competency. |
CustomFieldServiceItem | No Customfield exist. |
CustomFieldServiceItem | User doesn't have a access to custom fields: |
CustomFieldServiceItem | Failed: Invalid Value |
CustomFieldServiceItem | Failed: Duplicate values exist |
CustomFieldServiceItem | Failed: Invalid Title value |
CustomFieldServiceItem | Invalid custom field: |
CustomFieldServiceItem | Invalid custom field not supported by lo:xyz |
CustomFieldServiceItem | Invalid custom field value: |
Handled Error List for Material
Error Types | Error Message |
---|---|
MaterialTitle | MaterialTitle missing. |
MaterialType | MaterialType missing |
Provider | Provider missing. |
Active | Field Active missing |
AvailableLanguages | Invalid Language data xyz |
SubjectTitle | Invalid SubjectTitle data xyz |
SkillTitle | Invalid Skill Title data xyz |
Availability | OU Not Found. |
Availability | Invalid OU Type. |
Availability | Invalid Availability User. |
PreWork/PostWorks | Invalid xyz object Id PreWork/PostWork. |
PreRequisites | Invalid xyz object Id PreRequisite. |
Competencies | Invalid Competency. |
CustomFieldServiceItem | No Customfield exist. |
CustomFieldServiceItem | User doesn't have a access to custom fields: |
CustomFieldServiceItem | Failed: Invalid Value |
CustomFieldServiceItem | Failed: Duplicate values exist |
CustomFieldServiceItem | Failed: Invalid Title value |
CustomFieldServiceItem | Invalid custom field: |
CustomFieldServiceItem | Invalid custom field not supported by lo:xyz |
CustomFieldServiceItem | Invalid custom field value: |
# Update LO
Use this endpoint to update existing ILT Sessions in Cornerstone Learning. You cannot update learning objects of type other than ILT Sessions using this endpoint.
- Only one session can be updated per API call. However, multiple session parts within the session can be updated in a single call.
- You can use this endpoint to update specific fields at the session or part level. However, custom field updates are not supported by this API. Use the 'Custom Field' API to update custom fields in ILT Sessions.
- The API performs a wipe-and-replace with the data sent in the request. This means that you will need to send the entire payload each time you want to update a session.
- To update session parts details, the request would need to contain all mandatory fields in addition to full part details like instructor and equipment. This same rule applies to update availability details and session details.
Permission Required: Session - Edit
OAuth 2.0 Scope: training:updatefull
# Error Descriptions
Handled Error List
Error Types | Error Message |
---|---|
Locator/LoID | Locator or LoID is mandatory |
Locator | Invalid Locator Id |
LoID | Invalid LoID |
LoID | LoID not present in portal |
PartName | PartName |
PartStartDateTime | PartStartDateTime |
PartEndDateTime | PartEndDateTime |
PartLocation | PartLocation |
PartEndDateTime | PartEndDateTime should be greater than PartStartDateTime |
PartBreak.Title | PartBreak.Title |
PartBreak | The break total must be less than the duration of the part |
PartEquipment.Name | PartEquipment.Name |
PartEquipment.Quantity | PartEquipment.Quantity is less than 1 |
MinimumRegistration | MinimumRegistration cannot be negative, |
MaximumRegistration | MaximumRegistration cannot be negative |
Parts | Two or more schedules overlap |
HomeLocation | Invalid instructor data |
Availability | OU Not Found. |
Availability | Invalid OU Type. |
Availability | Invalid Availability User. |