Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitLab Self Hosted: Check plan from API

I want to check if I have access to premium features (such as group hooks) for my GitLab instance (self hosted) from the API. What endpoint should I call?

Notes:

  • I thought of checking the version and see if it is ending with -ee for Enterprise Edition or -ce for community edition but this is not enough since I can still have Enterprise Edition but not be subscribed (thus not having access to premium features).
  • In the context of group hooks, I also thought of checking the plan associated with the group in particular using the Namespace API but I get the value default which isn't really helpful (see related question)
  • I also thought about checking the license of the instance but it needs Administrator privileges and I can't assume the available token as such privileges.
like image 530
Martin Faucheux Avatar asked Sep 05 '26 12:09

Martin Faucheux


1 Answers

One solution is to make a call to a premium-only feature that doesn't need admin privileges and check if it doesn't return 403.

For example: listing epics of a group.

like image 161
Martin Faucheux Avatar answered Sep 10 '26 01:09

Martin Faucheux