Skip to main content
Solved

Is there an API endpoint where you can get the Groups that have access to a Collection?

  • February 23, 2021
  • 4 replies
  • 80 views

Marcos Perez
Hi everyone! Anyone knows if there is an API endpoint where I can get the groups that have access to a collection? I tried all options on API reference page and the Guru SDK

Best answer by Dillon Head

I believe the easiest way to figure this out is to go the other way and check which collections a group has access to. If you looped over all of your groups, you could create a new collection object with the associated groups. Just guessing., but this might be similar to the way that the collection management page works. ```Get the IDs: https://api.getguru.com/api/v1/groups and then: https://api.getguru.com/api/v1/groups/groupID/collections``` Hope this helps!

4 replies

Dillon Head
  • Scholar
  • Answer
  • February 23, 2021
I believe the easiest way to figure this out is to go the other way and check which collections a group has access to. If you looped over all of your groups, you could create a new collection object with the associated groups. Just guessing., but this might be similar to the way that the collection management page works. ```Get the IDs: https://api.getguru.com/api/v1/groups and then: https://api.getguru.com/api/v1/groups/groupID/collections``` Hope this helps!

Mary Houston
Forum|alt.badge.img
  • Smart Cookie
  • February 23, 2021
Nailed it @dillon :thankyou:

Marcos Perez
  • Author
  • February 24, 2021
Dillon, you are the #1 thank you very much! Didn“t know of the existence of that last endpoint!

Marcos Perez
  • Author
  • February 24, 2021
And thank you Mary for being always there haha