Skip to main content
Best Answer

API: Add Course to Learning Plan - what is "assignment" parameter?


markbrumley
Novice II

Hi!

Using the API endpoint post   /course/v1/courses/{course_id}/lp  to add a learning plan to a course. Yes, that seems backwards. I am asked for the assignments parameter. I thought that was the course ID but that doesn’t work. Can someone help?
 


Thank you!

Mark

Best answer by rterakedis

@markbrumley - Not exactly familiar with this particular API, but looking at API browser I do see that the assignments are specified to be part of the body, and should be part of an array.  So, you need to remove that query param in Postman, and instead add the following JSON under the “body” tab (select the “raw” format):

{
  "assignments": [
    12
  ]
}

 

Hopefully that helps!

 

View original
Did this post help you find an answer to your question?

3 replies

  • Contributor I
  • 15 replies
  • Answer
  • April 10, 2025

@markbrumley - Not exactly familiar with this particular API, but looking at API browser I do see that the assignments are specified to be part of the body, and should be part of an array.  So, you need to remove that query param in Postman, and instead add the following JSON under the “body” tab (select the “raw” format):

{
  "assignments": [
    12
  ]
}

 

Hopefully that helps!

 


  • 13 replies
  • April 10, 2025

Hi Mark,

The assignment ID is the learning plan ID you want to add the course to. ​@rterakedis is correct that this needs to be included in the body, unlike the course_id which is included as a URL param. The assignments array in the body is required for this call.

 

 


markbrumley
Novice II
  • Author
  • Novice II
  • 5 replies
  • April 10, 2025

Thank you @rterakedis and @mstrom! Worked like a charm!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings