3

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.
Martin Faucheux
  • 884
  • 9
  • 26

1 Answers1

1

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.

Martin Faucheux
  • 884
  • 9
  • 26