Skip to main content
Question

Get CLOR list via API?

  • May 3, 2024
  • 6 replies
  • 222 views

codywinchester
Contributor III

Hello, I was wondering if any has found a way to get a list of everything in the Central Repository via the API? I can’t seem to find anything relevant in the Docebo API Explorer. Thanks.

6 replies

KMallette
Hero II
Forum|alt.badge.img+9
  • Hero II
  • May 6, 2024

@codywinchester Hi Cody … I agree that there isn’t an endpoint specifically for the Central Repository/CLOR. However, if you dig deeply into the “View a Course” endpoint, there are some fields, such as ‘flat_los’ that look to me like they could be outta the CLOR. Looking at the Response Schema for View a Course, I also saw a couple of parameters that can hold a ‘centrarepo’ value.

You might be able to build a database of the LOs from that, but it would be course by course…


pmo
Docebian
Forum|alt.badge.img+4
  • Docebian
  • May 6, 2024

Hello, I was wondering if any has found a way to get a list of everything in the Central Repository via the API? I can’t seem to find anything relevant in the Docebo API Explorer. Thanks.




Sometimes there are apis that are “public” but not exposed in the API browser. I think if you inspect the network tab of your inspect tool while loading the central repository you might find the api you’re looking for. 

This API will return Training Material results.

https://[yoururl.com]/tmrepo/v1/folders/1/materials?page=1&page_size=17&sort_attr=created_on&sort_dir=desc&folder_filter_type=with_descendants


KMallette
Hero II
Forum|alt.badge.img+9
  • Hero II
  • May 6, 2024

@codywinchester This works … but it gives you only 20 items at a time (or the limit that you’d get through your browser.

Also, you need to use something like Postman to make the get  request.

 

@pmo THANK YOU!!!! very cool approach to getting info.


codywinchester
Contributor III
  • Author
  • Contributor III
  • May 10, 2024

Thanks for your responses. It sounds like work needs to be done to offer APIs to support CLOR management. It would be great to not only get the list but also manage settings of the content, apply to courses, etc. I will submit as an idea. What I’m seeing here is not going to work for me.


codywinchester
Contributor III
  • Author
  • Contributor III
  • May 20, 2024

@pmo , revisiting your example:

Hello, I was wondering if any has found a way to get a list of everything in the Central Repository via the API? I can’t seem to find anything relevant in the Docebo API Explorer. Thanks.




Sometimes there are apis that are “public” but not exposed in the API browser. I think if you inspect the network tab of your inspect tool while loading the central repository you might find the api you’re looking for. 

This API will return Training Material results.

https://[yoururl.com]/tmrepo/v1/folders/1/materials?page=1&page_size=17&sort_attr=created_on&sort_dir=desc&folder_filter_type=with_descendants

 

What authorization method is appropriate for this type of API access?


Ian
Guide I
  • Guide I
  • June 4, 2024

The page size is adjustable and appears within the URL parameters in the sample endpoint provided by @pmo:

GET https://[yoururl.com]/tmrepo/v1/folders/1/materials?page=1&page_size=17&sort_attr=created_on&sort_dir=desc&folder_filter_type=with_descendants

Change that to page_size=200 (I think that’s the effective maximum) to get many more results with a single call.

And if you still need more, just go to page=2 (and so on).

The authentication method should be the same as for any other API call, @codywinchester.