Skip to main content
Best Answer

API endpoint to add courses to a LP

  • December 28, 2023
  • 8 replies
  • 119 views

Is there an API end point to add courses to a learning plan?

Our vendor just sunset a bunch of courses and our learning plans need to be changed to add the new courses into the LP.

 

If one doesn’t exist, how difficult is it to ask Docebo to create one for us?

 

Best answer by Ian

Worry not, @jennyblevinsEKPC, an API endpoint already exists for this. It’s just a bit counter-intuitive, perhaps, in that you add the learning plan to the course rather than the other way around:

There also appears to be a typo in the endpoint description: “assigns LP *from* a course”?

This is part of the Courses service rather than the older Learn service.

8 replies

Ian
Guide I
  • Guide I
  • 190 replies
  • Answer
  • December 29, 2023

Worry not, @jennyblevinsEKPC, an API endpoint already exists for this. It’s just a bit counter-intuitive, perhaps, in that you add the learning plan to the course rather than the other way around:

There also appears to be a typo in the endpoint description: “assigns LP *from* a course”?

This is part of the Courses service rather than the older Learn service.


Thank you Ian!  I saw this endpoint but was expecting to see the learning plan as a variable in the end point, rather than in the body under the field courses_optional.   This is good news.

 


  • Author
  • Novice II
  • 7 replies
  • January 16, 2024

I was able to use the API to create the learning plans, and enrolled the courses in the newly created learning plans.  Then I went online and enrolled some users into the Learning Plans.

The issue:  Online the user sees the Learning Plan, but it has a huge “padlock” on the tile and it has the message “Learning Plan is under maintenance”.  The LP on the left was created manually.  the LP on the right was created via the API.

 

I’ve compared the JSON of the 2 learning plans and they look exactly the same.

 

Any ideas would be greatly appreciated!  We’ve come so far, and then hit this snag.


Ian
Guide I
  • Guide I
  • 190 replies
  • January 17, 2024

Bfarkas
Hero III
Forum|alt.badge.img+6
  • Hero III
  • 3596 replies
  • January 17, 2024

Yup, the creation of the LP is what is getting you, fix is apparently imminent, until then easiest thing to do is to create the LP some other way (UI probably) and then add the courses in. You could always make a bunch of simple LP just literally like 1-100, and then update them for details if you wanted. Annoying, but a bug. 


  • Author
  • Novice II
  • 7 replies
  • January 17, 2024

Thank you all!  Misery loves company.  We will create the LPs we must manually and hope the fix comes soon.


Bfarkas
Hero III
Forum|alt.badge.img+6
  • Hero III
  • 3596 replies
  • January 17, 2024

Hopefully getting status update today: 

 


Bfarkas
Hero III
Forum|alt.badge.img+6
  • Hero III
  • 3596 replies
  • January 17, 2024

Looks like the fix is deployed, just checked on my instance and works as expected now.