Resource group API returns 404

According to Resource group API | GitLab, I am supposed to be able to acccess the resource groups of a project by a GET to https://git.MY-DOMAIN.com/api/v4/projects/PROJECT-ID/resource_groups .
How ever I only get a 404 response!
Calling https://git.MY-DOMAIN.com/api/v4/projects/PROJECT-ID works fine (returns a JSON document).
What am I missing?

We are running 14.03.2, according to Introducing: Resource groups | GitLab the resource_groups got added in 12.7.

I’m having the same issue on 14.9.4. I have a CI config with a parent pipeline running three child pipelines. I’ve put the resource_group tags in both the parent and child pipelines, but I still don’t see the resource group in the API for this project.

Is there a particular stage where the resource group is added to the API? Does there have to be a successful CI run, or some other housekeeping task performed before that information appears in the API?

I found the issue. The documentation at Resource group API | GitLab is incorrect; the “Get all resource groups for a project” endpoint does not yet exist. See [Resource group API] Get all resource groups in a project (#360619) · Issues · GitLab.org / GitLab · GitLab for more details.

If you know the name of your resource group, you can hit the endpoint for that specific resource group at /projects/project-id/resource_groups/resource-group-name .

Thanks for the note.

I tried it on my project, but it still throws a 404. Maybe because my resource has a dash in its name or my Gitlab (14.03.2) still is too old. I will check again once we updated Gitlab.