Best Answer

Course thumbnail via API

  • 25 March 2022
  • 8 replies
  • 171 views

Userlevel 3
Badge

Hi everyone,

is it possible to set the course thumbnail via API? I have been searching for a while now but I can only find different ways to get information about it.

icon

Best answer by Bfarkas 25 March 2022, 21:14

View original

8 replies

Userlevel 7
Badge +8

Hi @janina.zielecki this one would allow you to update your courses and I think it allows you to ad a thumbnail although the code just calls it “image”

https://doceboapi.docebosaas.com/api-browser/#!/learn/Course/Course_learn_v1_courses_id_0

Userlevel 7
Badge +4

I believe it is that update course api, but there is a thumbnail_id field that I use for this:

yoururl/api-browser/#!/learn/Course/Course_learn_v1_courses_id_0

Its a PUT /learn/v1/courses/{id}

Body:

{
  "thumbnail_id": 395
}

 

The tricky part is finding the thumbnail id, what I typically did was just look up a course that was using it using the View Course API and have a little database of the id’s:

GET /learn/v1/courses/{id}

Userlevel 3
Badge

Hi @lrnlab & @Bfarkas! Thanks for the help! I succesfully put a thumbnail into an existing course! 😀🙌 But collecting the IDs in advance is a bit annoying. I was hoping for an easier solution. 😉

Let’s see how I can use this for my automation.

Best,
Janina

Userlevel 7
Badge +4

Yeah, annoying, but you have to have the file loaded already anyways so I’ve gotten in the habit of just having an extra course, loading them and pulling their id and then I have a SharePoint list that acts as a lookup table for automations on it. 

Userlevel 7
Badge +4

Thinking about this now, and having just come from doing an update in a different platform that handles this better, I wonder if like an admin dashboard for IDs would be useful. Central spot that you flip through categories of items and find id’s. I’m gonna put up an idea and see if theres any support for it.

Userlevel 3
Badge

Perfect! I was thinking about something similar, too! 🤓

Userlevel 7
Badge +4

Perfect! I was thinking about something similar, too! 🤓

 

Userlevel 5
Badge +2

Any1 can help me with the thumbnail API? I’m doing this manually now & I’m beginner to the APIs feature. Could you please share me any documents you have used for API call?

Reply