Best Answer

API endpoint to add courses to a LP

  • 28 December 2023
  • 8 replies
  • 101 views

Userlevel 1

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?

 

icon

Best answer by Ian 29 December 2023, 05:16

View original

8 replies

Userlevel 4
Badge +1

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.

Userlevel 1

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.

 

Userlevel 1

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.

Userlevel 4
Badge +1

Sounds like this bug, @jennyblevinsEKPC:

https://community.docebo.com/known%2Dissues%2D52/learn%2Dlearning%2Dplans%2Dlocked%2D9913

Userlevel 7
Badge +3

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. 

Userlevel 1

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

Userlevel 7
Badge +3

Hopefully getting status update today: 

 

Userlevel 7
Badge +3

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

Reply