Skip to main content

During a test of The API to create courses in bulk, we encountered an error 500 and noticed that one of the usual default fields (when creating a course manually), Catalog Enrollment Policy (seen below) was not being populated.

Strangely enough, when nothing is selected, it does allow self-enrolment

In order to correct this, you can add the following column to your input file and choose one of the 3 options as needed:

the column name is: "subscribe_method"

 and. your choses are:

1 = Pending Admin Approval

2 = Sef-enrollment

0 = Only Admin

 

New also noticed the thumbnail ID is also missing:

You can add this column to your input file to load the thumbnail ID:

thumbnail_ID

*you can find the thumbnail ID via the Get Course Info API

I was just re-reading this and I’m curious, you mention for using the API but then talk about column input files? Are you using a custom process for that file or are you talking about using uploading csv to make courses? Just trying to get which process you are doing clear in my head.


@Bfarkas we’re using a CSV file to create courses via the API and these columns are missing in the field list; one of which causes an error 500 each time it runs as the column that dictates the catalogue enrolment policy is missing.


Hmm interesting, I was doing some course creation via API and havn’t run into that, will need to go check on it, thanks!


This issues were found when using the API called, Create a new course, not the batch import courses 


Thanks, it seems I must have run into this a year ago and programmed in as I have those as required fields in my connector with choices, so safe!


@lrnlab 

We are testing using APIs for course, session and event creation but haven’t tried the csv with an API. Is there more information on that process? We are struggling to get an API that selects specific “navigation policy” and “allow self enrollment policy” for admin approval (should be “enable_waitinglist” = “true” or “pending admin approval”.

Are you saying there’s a way to get these settings on when using a csv table along with API? I don’t know of the csv for API usage.


@lrnlab

We are testing using APIs for course, session and event creation but haven’t tried the csv with an API. Is there more information on that process? We are struggling to get an API that selects specific “navigation policy” and “allow self enrollment policy” for admin approval (should be “enable_waitinglist” = “true” or “pending admin approval”.

Are you saying there’s a way to get these settings on when using a csv table along with API? I don’t know of the csv for API usage.

Not sure his exact process, but generally when using CSV’s with the API, it is just a data input type, so you use the CSV since it is easy for other systems and people to create (they might have an excel file that calculates some of the fields you are describing for instance) but eventually you have to parse the CSV file and convert it into the accepted JSON format for the API endpoint you are using, this is typically done programmatically.

The areas around Docebo that natively accept CSV’s either through upload or automation, usually handle this for you on the backend.

I would say for Sessions/Events API is 100% the way to go since you get the created and needed ID’s handed back in the responses. Any other way is a lot of manual overhead, worth the effort/cost to build a mechanism for it.


Hi @tararussell unfortunately I did not run it myself so I would need to  reach out to out IT resource to know more...was @Bfarkas able to provide with you with some answers? 


Thank you, I am checking with our salesforce developer to see if he is able to use this suggestion of a csv file. Appreciate the direction.

 


Reply