Hi, It’s me again. 🤦♂️ Can someone please paste the code for adding LOs from the Central Repository to Courses? I’m using Postman. I have tried the /learn/v1/lo/batch endpoint, but I haven’t been successful.
And is there a way to do this in one POST:
Create the course
Add the LOs
Or, does it always have to be separate steps?
Thank you!!!
Mark
Best answer by rterakedis
@markbrumley - Looking at the api browser (and again, having not done this before), I’d give you my thoughts on this:
The API to create a course (POST /learn/v1/courses), which also looks like the only API to create a course, requires you specify a fairly long JSON body to describe all the parameters to create the course (such as code, name, description, type, etc). It does not however show any array key/value pair to allow you to specify LO’s from the central repository (or dynamically upload them). Additionally, the Response from this API contains the course_id of the newly created course.
The LO batch api you mentioned above (POST /learn/v1/lo/batch) require you to provide the course_id, which you get as a value in the JSON returned from the API in step 1. As such, I don’t believe this API creates courses dynamically on-the-fly.
It doesn’t look like the API is meant to create the entire course (including associated LO’s and LP’s) all in one step.
@markbrumley - Looking at the api browser (and again, having not done this before), I’d give you my thoughts on this:
The API to create a course (POST /learn/v1/courses), which also looks like the only API to create a course, requires you specify a fairly long JSON body to describe all the parameters to create the course (such as code, name, description, type, etc). It does not however show any array key/value pair to allow you to specify LO’s from the central repository (or dynamically upload them). Additionally, the Response from this API contains the course_id of the newly created course.
The LO batch api you mentioned above (POST /learn/v1/lo/batch) require you to provide the course_id, which you get as a value in the JSON returned from the API in step 1. As such, I don’t believe this API creates courses dynamically on-the-fly.
It doesn’t look like the API is meant to create the entire course (including associated LO’s and LP’s) all in one step.
Did you ever get any help on how to create the LO’s ? I’m really struggling to find a combination of parameters that will create an LO. We are just trying to create simple LO’s that are nothing more than references to an external system where lessons and quizzes will be housed. It’s not clear to me what “type” of LO I should be creating or what options/parameters are required. I’ve tried creating an HTML LO manually and then pulling that from the API to see what it looks like, but that has not been helpful in helping me create the LO through the API. Any advice, guidance, documentation would be greatly appreciated.